Jephe Wu - http://linuxtechres.blogspot.com
Objective: understanding IOPS
When we talk about performance of a system, we refer to CPU, Memory, network bandwidth and disk IO (IOPS).
What's IOPS?
IOPS - I/O operation per second, also can be transaction per second(tps) - http://en.wikipedia.org/wiki/IOPS
Based on http://vmtoday.com/2009/12/storage-basics-part-ii-iops/,
IOPS = 1000/(seek latency + rotational latency)
How to calculate?
IOPS = 1/(seek time + latency of a single disk)
One I/O might consist of a read or a write. the size of one IO is determined by the application.
The IO unit size is decided by application, not storage itself.
Normally, the IO unit size will be 4k or 8k, but can be up to 64k.
The default db_block_size for Oracle on Linux is 8K
Total IOPS = IOPS * Total number of drives
e.g. (the following example is from https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/5/pdf/Configuration_Example_-_Oracle_HA_on_Cluster_Suite/Red_Hat_Enterprise_Linux-5-Configuration_Example_-_Oracle_HA_on_Cluster_Suite-en-US.pdf)
There are 3 main factors in calculating IOPS or I/O's Per Second:
• Rotational Speed – AKA spindle speed (RPM)
• Average Latency – Time for sector being accessed to be under a r/w head
• Average Seek – Time it takes for hard drive's r/w head to position itself over the track to be
read or written.
4 X 1TB 10kRPM SAS (RAID 0)
Avg. Latency = 3ms
Avg. Seek = 4.45ms
1/(.003 + .0045)= 133 IOPS
Total IOPS = 4 * 133 IOPS = 532 IOPS
A high-performance disk is capable of about 50 to 70 random or up to 160 sequential I/O operations per second
How to choose better Disk to achieve high IOPS
- 15k RPM (spindle)
- NCQ (Native Command Queuing) - SATA or Tagged Queuing (FCP/SAS)
In general a 15K 72GB drive has better performance than a 10K
300GB drive
How to know IO wait (in vmstat) is suitable or not?
vmstat iowait percentage is close to 1/(the number of cpu cores).
How to Check Filesystem Block Size on Linux? -
http://www.planetmy.com/blog/how-to-check-filesystem-block-size-on-linux/
Basically, they are tune2fs, dumpe2fs, blockdev, create a real file and du -sm.
References:
- http://www.linuxtoday.com/it_management/2010042400235OSHW
- http://networkadminkb.com/KB/a7/disk-io-tutorial-part-1-basic-concepts-of-disk-io.aspx - good explaination about IOPS
- http://www.wmarow.com/strcalc/ - iops calculator
- Data Rate Units - http://en.wikipedia.org/wiki/Data_rate_units#Examples
- Calculate IOPS: - http://www.techrepublic.com/blog/datacenter/calculate-iops-in-a-storage-array/2182
- http://communities.vmware.com/message/1589042 - what's iops
- http://www.scribd.com/doc/53197944/28/Changing-I-O-unit-size-on-FusionIO