選對你要測試的Device,然後執行類似下面的指令,你就可以得到目前HD的速度
hdparm -Tt /dev/hda
會出現兩個數據,一個是有透過cache的,速度會比較快,另外一個是沒有的
另外可以執行指令
hdparam -i /dev/hda
就可以看到device的相關訊息,至於訊息的內容,可以參考我下面網路找到的資料
至於要如何設定DMA,可以參考鳥哥的網站,有比較詳細的介紹,在Ubuntu底下,只要透過修改/etc/hdparm.conf就可以了
使用
Usage: hdparm [options] [device] ..
Options:
-a get/set fs readahead
-A set drive read-lookahead flag (0/1)
-b get/set bus state (0 == off, 1 == on, 2 == tristate)
-B set Advanced Power Management setting (1-255)
-c 設定 IDE 32-bit I/O 模式
-C 檢查 IDE 電源模式狀態
-d 設定 開啟 DMA 模式
-D enable/disable drive defect-mgmt
-E set cd-rom drive speed
-f flush buffer cache for device on exit
-g display drive geometry
-h display terse usage information
-i 顯示磁碟識別資料
-I detailed/current information directly from drive
-Istdin similar to -I, but wants /proc/ide/*/hd?/identify as input
-k get/set keep_settings_over_reset flag (0/1)
-K set drive keep_features_over_reset flag (0/1)
-L set drive doorlock (0/1) (removable harddisks only)
-M get/set acoustic management (0-254, 128: quiet, 254: fast) (EXPERIMENTAL)
-m get/set multiple sector count
-n get/set ignore-write-errors flag (0/1)
-p set PIO mode on IDE interface chipset (0,1,2,3,4,...)
-P set drive prefetch count
-q change next setting quietly
-Q get/set DMA tagged-queuing depth (if supported)
-r get/set readonly flag (DANGEROUS to set)
-R register an IDE interface (DANGEROUS)
-S set standby (spindown) timeout
-t perform device read timings
-T perform cache read timings
-u get/set unmaskirq flag (0/1)
-U un-register an IDE interface (DANGEROUS)
-v defaults; same as -mcudkrag for IDE drives
-V display program version and exit immediately
-w perform device reset (DANGEROUS)
-W set drive write-caching flag (0/1) (DANGEROUS)
-x tristate device for hotswap (0/1) (DANGEROUS)
-X 設定 IDE xfer 工作模式 (DANGEROUS)
-y put IDE drive in standby mode
-Y put IDE drive to sleep
-Z disable Seagate auto-powersaving mode
-z re-read partition table
開啟 32 bit I/O, UDMA100 模式, 例:
[root]# hdparm -d1 -c1 -X69 -m16 /dev/hda其中的 -X69 代表 UDMA100, UDMA66 請設 -X68
詳細參考 IDE modes for hdparm -X parameters:
- PIO mode
- 0 -X08 3.3MB/sec
- 1 -X09 5.2MB/sec
- 2 -X10 8.3MB/sec NEC PC-98*1
- 3 -X11 11.1MB/sec
- 4 -X12 16.7MB/sec
- Singleword DMA mode
- 0 2.1MB/sec
- 1 4.2MB/sec
- 2 8.3MB/sec
- Multiword DMA mode
- 0 -X32 4.2MB/sec
- 1 -X33 13.3MB/sec
- 2 -X34 16.6MB/sec
- Ultra DMA mode
- 0 16MB/sec
- 1 25MB/sec
- 2 -X66 33MB/sec UDMA33
- 3 50MB/sec
- 4 -X68 66MB/sec UDMA66
- 5 -x69 100MB/sec UDMA100
測試硬碟的速度, 例:
hdparm -Tt /dev/hda上面是測試 /dev/hda 硬碟的傳輸速度
沒有留言:
張貼留言