linux磁碟效能測試

2021-06-04 03:13:48 字數 2371 閱讀 8422

120-test:/# apt-get install hdparm

真實機器120上測試結果:

測試磁碟效能(不cache)

120-test:/home/lai# hdparm -t /dev/sda

/dev/sda:

timing buffered disk reads:  346 mb in  3.02 seconds = 114.65 mb/sec

測試磁碟效能(帶cache)

120-test:/home/lai# hdparm -t /dev/sda

/dev/sda:

timing cached reads:   2786 mb in  2.00 seconds = 1393.80 mb/sec

真實機器121上測試結果:

121:~# hdparm -t /dev/sda

/dev/sda:

timing buffered disk reads:  310 mb in  3.01 seconds = 102.89 mb/sec

121:~# hdparm -t /dev/sda

/dev/sda:

timing cached reads:   2578 mb in  2.00 seconds = 1289.01 mb/sec

伺服器sas硬碟測試結果:

lai@*:~$ sudo hdparm -t /dev/sda

/dev/sda:

timing buffered disk reads:  442 mb in  3.01 seconds = 146.89 mb/sec

lai@*:~$ sudo hdparm -t /dev/sda

/dev/sda:

timing cached reads:   8306 mb in  2.00 seconds = 4162.04 mb/sec

虛擬機器的測試結果1:

ha:/home/lai# hdparm -t /dev/sda

/dev/sda:

timing buffered disk reads:  176 mb in  3.01 seconds =  58.51 mb/sec

ha:/home/lai# hdparm -t /dev/sda

/dev/sda:

timing cached reads:   2966 mb in  2.00 seconds = 1483.26 mb/sec

虛擬機器的測試結果2:

153:/home/lai# hdparm -t /dev/sda

/dev/sda:

timing buffered disk reads:  186 mb in  3.00 seconds =  61.93 mb/sec

153:/home/lai# hdparm -t /dev/sda

/dev/sda:

timing cached reads:   3012 mb in  2.00 seconds = 1505.78 mb/sec

hdparm優化硬碟

hdparm -tt /dev/hda 測試硬碟速度

hdparm -a1 /dev/hda 開啟硬碟預讀取功能

hdparm -c3 /dev/hda 開啟硬碟32位

hdparm -d1 /dev/hda 開啟dma

-d 和 -a 引數對ide硬碟讀寫效能影響最大(尤 -d)

關閉預讀

121:~# hdparm -a 0 /dev/sda

/dev/sda:

setting drive read-lookahead to 0 (off)

look-ahead    =  0 (off)

121:~# hdparm -tt /dev/sda

/dev/sda:

timing cached reads:   2454 mb in  2.00 seconds = 1227.17 mb/sec

timing buffered disk reads:   26 mb in  3.02 seconds =   8.60 mb/sec

開啟預讀

121:~# hdparm -a 1 /dev/sda

/dev/sda:

setting drive read-lookahead to 1 (on)

look-ahead    =  1 (on)

121:~# hdparm -tt /dev/sda

/dev/sda:

timing cached reads:   2586 mb in  2.00 seconds = 1293.30 mb/sec

timing buffered disk reads:  312 mb in  3.00 seconds = 103.93 mb/sec

LINUX下測試磁碟效能

硬體環境 ibm 3650 m3 7945o75機架式伺服器,主要硬體引數 intel xeon processor x5675 6c 3.06ghz 12mb cache 1333mhz x 2 4gb pc3l 10600 cl9 ecc ddr3 1333mhz lp rdimm x 4 30...

磁碟效能測試

有時候我們對乙個新的磁碟陣列進行簡單測試,但是又不知道用什麼的工具合適,其實linux unix本身已經提供了這樣的工具 dd 1.測試磁碟寫能力 time dd if dev zero of opt test.db bs 1m count 3000 3000 0 records in 3000 0...

FIO磁碟效能測試

一,fio安裝 wget yum install libaio devel tar zxvf fio 2.0.7.tar.gz cd fio 2.0.7 make make install fio用法 fio分順序讀,隨機讀,順序寫,隨機寫,混合隨機讀寫模式。filename 指定檔案 裝置 的名稱...