본문 바로가기

Computer/LINUX

HDD 속도측정 for linux : dd, hdparm

/// dd 를 이용한 속도 측정

[root@KTIDC22 ~]$ dd bs=1k count=1000000 if=/dev/zero of=hdd
1000000+0 records in
1000000+0 records out
1024000000 bytes (1.0 GB) copied, 19.2714 s, 53.1 MB/s

/// disk 에 생긴 테스트용 파일 삭제
[root@KTIDC22 ~]$ rm -f hdd



/// 연결된 디스크 정보보기
[root@localhost pub]# df -k
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      19552940  11996244   6547444  65% /
/dev/sda1               194442     28489    155914  16% /boot
tmpfs                   192552        12    192540   1% /dev/shm

/// 도움말 보기
/// 원래는 hard disk parameters를 변경해주는 유틸인듯 한데 속도측정기능이 있다.
/// 단, Read 성능만 측정가능
# hdparm -h
hdparm - get/set hard disk parameters - version v7.7
Usage:  hdparm  [options] [device] ..

Options:
 -a   get/set fs readahead
 -A   get/set the drive look-ahead flag (0/1)
 -b   get/set bus state (0 == off, 1 == on, 2 == tristate)
 -B   set Advanced Power Management setting (1-255)
 -c   get/set IDE 32-bit IO setting
 -C   check drive power mode status
 -d   get/set using_dma flag
 -D   enable/disable drive defect management
 -E   set cd-rom drive speed
 -f   flush buffer cache for device on exit
 -F   flush drive write cache
 -g   display drive geometry
 -h   display terse usage information
 -H   read temperature from drive (Hitachi only)
 -i   display drive identification
 -I   detailed/current information directly from drive
 -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)
 -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 device  readonly flag (DANGEROUS to set)
 -R   register an IDE interface (DANGEROUS)
 -s   set power-up in standby flag (0/1) (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 -acdgkmur for IDE drives
 -V   display program version and exit immediately
 -w   perform device reset (DANGEROUS)
 -W   get/set drive write-caching flag (0/1)
 -x   tristate device for hotswap (0/1) (DANGEROUS)
 -X   set IDE xfer mode (DANGEROUS)
 -y   put drive in standby mode
 -Y   put drive to sleep
 -Z   disable Seagate auto-powersaving mode
 -z   re-read partition table
 --direct         use O_DIRECT to bypass page cache for timings
 --Istdin         read identify data from stdin as ASCII hex
 --Istdout        write identify data to stdout as ASCII hex
 --verbose        display extra diagnostics from some commands
 --security-help  display help for ATA security commands
 --drq-hsm-error  crash system with a "stuck DRQ" error (VERY DANGEROUS)

/// 속도측정
[root@localhost pub]# hdparm -tT /dev/sda1


/dev/sda1:
 Timing cached reads:   6194 MB in  2.00 seconds = 3101.96 MB/sec
 Timing buffered disk reads:  196 MB in  2.33 seconds =  84.09 MB/sec
[root@localhost pub]#



Download: http://sourceforge.net/projects/hdparm/