Databases Reference
In-Depth Information
A sequential read consists of a head movement followed by the sequential reading or writing of
data. When data is not sequentially located, the disk drive executes a series of random operations.
Random access patterns are much slower because the head needs to physically move between tracks.
Drive manufacturers provide a measurement called maximum seek time that rel ects how long it
will take for the drive head to move from the innermost tracks to the outermost tracks. The manu-
facturer also provides what is known as average seek time , the average time it will take to move the
drive head to any location on the disk.
Disk Drive Latency
You can calculate the time it takes to move the head to a location on the disk mathematically. The
number of times a disk can rotate in a millisecond limits the amount of data the drive can generate,
a limitation called rotational latency . To calculate how many random I/Os a hard disk can perform,
the following equation is used:
IOPS = 1,000 ÷ (Seek Time + ((60,000 ÷ RPM) ÷ 2)
This equation works by normalizing all calculations to milliseconds. To i nd IOPS, you start by divid-
ing 60,000 (because there are 60,000 milliseconds in a minute) by the hard disk rotations per minute.
Dividing the revolutions per millisecond by 2 accounts for the fact that the head needs to exit the i rst
track and enter the second track at specii c points, requiring about two rotations. You add the revolu-
tions result to the seek time and convert the result back to seconds by dividing 1,000 by this sum.
For example, consider a 10,000-RPM disk. This drive will rotate about 6 times per second. You
account for the fact that it will take your drive two rotations to move between tracks and then add
the seek time. This drive has a read seek time of 4 milliseconds. Dividing 1,000 by 7 results in
143 I/Os per second:
143 = 1000 ÷ (4 + ((60,000 ÷ 10,000) ÷ 2))
We have tested many drives over the years and this formula has proven reliable. Remember that
each individual model of disk drive varies. Having said that, you can calculate IOPS for the most
frequently used disk drives:
7,500 RPM SATA: 80 = 1,000 ÷ (8.5 + ((60,000 ÷ 7,500) ÷ 2))
15,000 RPM SAS: 185 = 1,000 ÷ (3.4 + ((60,000 ÷ 15,000) ÷ 2))
If you need more IOPS, then simply add more disks. If one disk will perform 150 IOPS, then two
will perform 300. When you need 10,000 IOPS, you only need 54 physical disks. If you actually
want to keep the data when one of the drives fails, then you need 108 disks. Those 108 disks will
provide 10,000 IOPS when the database needs to read, but only 5,000 IOPS for writes. RAID causes
overhead for both space and performance. RAID 1+0 is fairly easy to calculate. You will receive N
number of reads and N divided by 2 writes. RAID 5 is much trickier to calculate.
NOTE For more information on how SQL Server actions translate into IOPS
please visit http://Sqlvelocity.typepad.com .
Search WWH ::




Custom Search