2012-09-25
In discussing storage today we got asked ...
Attention: this item is more than 5 years old, links can be broken and information can have been updated.
In discussing storage today we got asked how many I/O operations per second (IOPS) we see. An interesting question, but how do you measure this. One google search later the answer is easy: iostat as explained at Measuring Disk Usage In Linux (%iowait vs IOPS). First answer from iostat is average since boot, answers after that (given interval and count) are for the measured interval. A sample from the home server greenblatt:koos@greenblatt:~$ iostat 60 2 Linux 2.6.24-31-server (greenblatt) 09/25/2012 avg-cpu: %user %nice %system %iowait %steal %idle 3.37 0.01 1.95 0.49 0.00 94.19 Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn sda 9.01 87.69 113.18 1181728477 1525265504 sdb 0.96 122.82 98.99 1655093714 1334086098 sdc 0.28 2.29 34.46 30809884 464336050 dm-0 0.52 39.04 1.27 526178078 17057856 dm-1 14.35 84.95 98.70 1144861524 1330106690 avg-cpu: %user %nice %system %iowait %steal %idle 0.78 0.00 2.86 0.22 0.00 96.14 Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn sda 7.87 16.40 98.93 984 5936 sdb 0.00 0.00 0.00 0 0 sdc 0.00 0.00 0.00 0 0 dm-0 0.00 0.00 0.00 0 0 dm-1 0.00 0.00 0.00 0 0To resolve the dm- names, list the device files in /dev/mapper:koos@greenblatt:~$ ls -l /dev/mapper total 0 crw-rw---- 1 root root 10, 63 2012-04-22 20:58 control brw-rw---- 1 root disk 254, 0 2012-09-23 12:41 vgsw-camera brw-rw---- 1 root disk 254, 1 2012-09-25 16:22 vgsw-scratchWhich shows that dm-0 is the /dev/mapper/vgsw-camera filesystem. This will help us get an idea how many iops systems have in our setup.