Linux下如何測試讀寫效能
hdparm -Tt /dev/hda
/dev/hda:
Timing buffer-cache reads: 128 MB in 0.73 seconds =175.34 MB/sec (顯示快取資料取的能力)
Timing buffered disk reads: 64 MB in 1.13 seconds = 56.64 MB/sec (硬碟資料的讀取能力)
取得硬碟的最大同步存取 sector 值與目前的 UDMA 模式
[root@chcmis2 root]# hdparm -i /dev/hda
/dev/hda:
Model=HDT722516DLAT80, FwRev=V43OA70A, SerialNo=VD071BTCCUZUSF
Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=51
BuffType=DualPortCache, BuffSize=7674kB, MaxMultSect=16, MultSect=16
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455
IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: mdma0 mdma1 mdma2 udma0 udma1 *udma2 udma3 udma4 udma5 udma6
AdvancedPM=yes: disabled (255) WriteCache=enabled
Drive Supports : slowATA-2 ATA-3 ATA-4 ATA-5 ATA-6 ATA-7
監視主機LIUX硬碟狀態指令
hdparm -Tt /dev/hda
參數說明
-t perform device read timings
-T perform cache read timings
-i display drive identification
/dev/hda:
Timing cached reads: 1828 MB in 2.00 seconds = 913.08 MB/sec (顯示快取資料取的能力)
Timing buffered disk reads: 164 MB in 3.00 seconds = 54.64 MB/sec(硬碟資料的讀取能力)
hdparm /dev/hda (不加任何參數可以列出系統對硬碟的支援)
[root@chcmis2 root]# hdparm /dev/hda
/dev/hda:
multcount = 16 (on)
I/O support = 1 (32-bit)
unmaskirq = 1 (on)
using_dma = 1 (on)
keepsettings = 0 (off)
nowerr = 0 (off)
readonly = 0 (off)
readahead = 8 (on)
geometry = 319120/255/63, sectors = 321672960, start = 0
busstate = 1 (on)
若DMA功能未開啟,可下指令開啟DMA功能(要注意硬碟本身需要有支援,不然可能會造成硬碟資料損毀)
指令: hdparm -d1 /dev/hda (1表示開啟,0表示關閉)
0 意見:
張貼留言