2009年10月19日 星期一

quota無法正常在ubuntu 9.04上的ext4運作


這是ubuntu 9.04上package的bug,下載9.10的套件裝就好啦,here
brook@ubuntu1:~$ wget http://kr.archive.ubuntu.com/ubuntu/pool/main/q/quota/quota_3.17-3ubuntu1_i386.deb
--2009-10-19 16:09:14--  http://kr.archive.ubuntu.com/ubuntu/pool/main/q/quota/quota_3.17-3ubuntu1_i386.deb
Resolving kr.archive.ubuntu.com... 143.248.234.110
Connecting to kr.archive.ubuntu.com|143.248.234.110|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 473516 (462K) [application/x-debian-package]
Saving to: `quota_3.17-3ubuntu1_i386.deb'

100%[======================================>] 473,516      490K/s   in 0.9s

2009-10-19 16:09:17 (490 KB/s) - `quota_3.17-3ubuntu1_i386.deb' saved [473516/473516]

brook@ubuntu1:~$ sudo dpkg --purge quota
(Reading database ... 112680 files and directories currently installed.)
Removing quota ...
 * Turning off quotas...                                                 [ OK ]
 * Stopping quota service rpc.rquotad                                    [ OK ]
Purging configuration files for quota ...
Processing triggers for man-db ...
brook@ubuntu1:~$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
brook@ubuntu1:~$ sudo dpkg -i quota_3.17-3ubuntu1_i386.deb
Selecting previously deselected package quota.
(Reading database ... 112624 files and directories currently installed.)
Unpacking quota (from quota_3.17-3ubuntu1_i386.deb) ...
Setting up quota (3.17-3ubuntu1) ...
 * Checking quotas...
                                                                         [ OK ]
 * Turning on quotas...                                                  [ OK ]
 * Starting quota service rpc.rquotad                                    [ OK ]

Processing triggers for man-db ...
brook@ubuntu1:~$ sudo mount -o remount /home
[sudo] password for brook:

2009年10月18日 星期日

32位元的compiler在32bit與64bit ubuntu下效能比較


繼之前的效能比較後(64bit與32bit應用程式在64位元ubuntu下之效能比較),我們面對比較實際的問題,因為開發用的compiler為32-bit之montavista,那麼到底是32位元的ubuntu效能好還是64位元的ubuntu好,所以我們決定直接將專案分別在32bit和64bit的ubuntu下compiler 10次,最後,發現在32bit底下有較好的效能。

圖為montavista 32bit compiler分別在32bit與64bit ubuntu下,compile專案所需的時間,以及所設定的make之job數比較圖,很明顯的,當job數越多,效能越好,而且32bit效能一直好過64bit。
JOBS 64-bit(sec) 32-bit(sec)
default(4) 479.567 451.847
6 426.922 400.545
8 400.724 370.174
10 393.842 363.798
12 391.594 361.957

這邊的結論不是想說32bit或是64bit的ubuntu哪個好,而是得到在我們的編譯環境下,32bit的ubuntu是比較適合我們的

2009年10月17日 星期六

64bit與32bit應用程式在64位元ubuntu下之效能比較


手邊最近剛好進來了一台i7搭配6G的PC,雖然裝了ubuntu 64bit-server的OS,但是我們的應用程式很多都還是32位元的,而且很好奇到底是64bit的application快,還是32bit的application快,於是我分別將unixbench編譯成32-bit和64-bit進行測試。
結果發現,即便是在64bit的OS下執行程式,32bit的效能不見得比64bit來的差,不是單純的將OS和硬體升級成64位元,電腦就會變快了,應用程式有沒有對64做最佳化也是非常重要的關鍵。

在讀寫方面,64位元小勝32位元。圖表為讀寫10sec所讀寫到的資料量,file system為ext3。

在一些演算法的運算下,各有小勝的項目。

在process的處理上,32bit勝出。


至於system call和pipe則64bit勝出。


檔案複製上,32bit勝出。(這點感覺還挺那悶的)

數值運算上,64bit小勝。

所有數據資料
  64-bit 32-bit  
Dhrystone 2 without register variables 22989948.3 15872890.4 lps
Dhrystone 2 using register variables 23031345.5 15525587.1 lps
Arithmetic Test (type = register) 3795084.9 3800669.2 lps
Arithmetic Test (type = short) 3792994 3475120.4 lps
Arithmetic Test (type = int) 3798887.6 3795243.4 lps
Arithmetic Test (type = long) 1361641.8 3797989.6 lps
Arithmetic Test (type = float) 2999814.7 1755172.6 lps
Arithmetic Test (type = double) 1908910.6 1755790.4 lps
System Call Overhead Test 5310434.8 4194268.7 lps
Pipe Throughput Test 2713396.7 2364773.8 lps
Pipe-based Context Switching Test N/A 421790.3  
Process Creation Test 13766.1 14274.1 lps
Execl Throughput Test 4028.2 4128.9 lps
File Read  (10 seconds) 8619286 7545589 KBps
File Write (10 seconds) 1519095 1453324 KBps
File Copy  (10 seconds) 79768 91090 KBps
File Write (30 seconds) 1515752 N/A KBps
File Copy  (30 seconds) 89420 N/A KBps
C Compiler Test 1826.8 1863 lpm
Shell scripts (1 concurrent) 8495.3 15928.3 lpm
Shell scripts (2 concurrent) 6293.3 12343.3 lpm
Shell scripts (4 concurrent) 4276.7 7584.6 lpm
Shell scripts (8 concurrent) 2818 5387 lpm
Dc: sqrt(2) to 99 decimal places 593737.4 625083.3 lpm
Recursion Test--Tower of Hanoi 244750.3 168275.4 lps
Arithmetic Test (type = double)         751 690.8  
Dhrystone 2 without register variables  1027.9 709.7  
Execl Throughput Test                   244.1 250.2  
File Copy  (30 seconds) 499.6 N/A  
Pipe-based Context Switching Test       0 319.9  
Shell scripts (8 concurrent)            704.5 1346.8  
下載unixbench:
http://www.tux.org/pub/tux/benchmarks/System/unixbench

熱門文章