Friday, April 13, 2012

Linux disk performance benchmark

Suppose you have local and shared disks mounted on your box. You want to find out their relative performance, to assess for instance the performance loss in case you locate your WebLogic files (logs, filestores...) on one or the other.

$ df -kP

Filesystem 1024-blocks Used Available Capacity Mounted on
/dev/mapper/rootvg-rootlv 8125880 1953072 5753380 26% /
/dev/mapper/rootvg-optlv 30472188 24894656 4005004 87% /opt
/dev/mapper/rootvg-homelv 2031440 1939192 0 100% /home
/dev/mapper/rootvg-tmplv 3047184 161068 2728832 6% /tmp
/dev/mapper/rootvg-varlv 9141624 687588 7982244 8% /var
/dev/cciss/c0d0p1 497829 31487 440640 7% /boot
tmpfs 12342596 0 12342596 0% /dev/shm



$ /sbin/hdparm /dev/mapper/rootvg-optlv

/dev/mapper/rootvg-optlv: Permission denied

(hdparm has to be run with root privileges!)


iostat
Linux 2.6.18-308.1.1.el5 (myhostname)         04/13/2012

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           2.03    0.01    0.20    0.01    0.00   97.76

Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
cciss/c0d0       10.14         8.85       305.48   16119821  556372354
cciss/c0d0p1      0.00         0.00         0.00       2351        156
cciss/c0d0p2     10.14         8.85       305.48   16117198  556372198
dm-0              4.94         0.63        38.96    1148082   70960475
dm-1             13.75         6.45       108.96   11742082  198439411
dm-2              5.78         1.29        45.76    2341482   83332872
dm-3              2.51         0.01        20.04      12186   36492920
dm-4             11.49         0.48        91.77     871650  167146504
dm-5              0.00         0.00         0.00       1072          0


You can also use Bonnie++ but I don't want to install any module.

No comments: