Computer Disk
Computer Disk
Disks are divided into zones, with fewer sector at the inner side, gradually progressing to
more on the outer side. It creates more space on disk.
SATA has its roots in the low end of the computing market such as desktop PCs and laptops.
In enterprise tech, SATA drives are synonymous with cheap, low performance, and high capacity.
The major reason for this is that the ATA command set is not as rich as the SCSI command set,
and as a result not as well suited to high-performance workloads.
However, the enterprise tech world is not all about high performance. There is absolutely
a place for low-cost, low-performance, high-capacity disk drives. Some examples are backup
and archiving appliances, as well as occupying the lower tiers of auto-tiering solutions in
storage arrays. However, most of these requirements are now satisfied by NL-SAS drives
rather than SATA.
SAS is, as the name suggests, a serial point-to-point protocol that uses the SCSI command set
and the SCSI advanced queuing mechanism. SCSI has its roots firmly in the high-end enterprise
tech world, leading to it have a richer command set, better queuing system, and often better
physical component quality than SATA drives. All this tends to make SCSI-based drives, such as
SAS and FC, the best choice for high-performance, mission-critical workloads. SAS drives can be
formatted with arbitrary sector sizes, allowing them to easily implement EDP (sometimes called
DIF). With EDP, 520-bye sectors are used instead of 512-bye sectors. The additional 8 bytes per
sector are used to store metadata that can ensure the integrity of the data, making sure that it
hasn’t become corrupted.
FC drives implement the SCSI command set and queuing just like SAS, but have dual FC-AL or
dual FC point-to-point interfaces. They too are suited to high-performance requirements and
come at a relatively high cost per gigabyte, but are very much being superseded by SAS drives.
Near line SAS (NL-SAS) drives are a hybrid of SAS and SATA drives. They have a SAS interface
and speak the SAS protocol, but also have the platters and RPM of a SATA drive.
What’s the point? Well, they slot easily onto a SAS backplane or connector and provide
the benefits of the SCSI command set and advanced queuing, while at the same time
offering the large capacities common to SATA. All in all, it is a nice blend of SAS and
SATA qualities.
All disk drives implement a technique known as queuing. Queuing has a positive impact on
performance. Queuing allows the drive to reorder I/O operations so that the read and write
commands are executed in an order optimized for the layout of the disk. This usually results
in I/O operations being reordered so that the read and write commands can be as sequential
as possible so as to inflict the least head movement and rotational latency as possible.
The ATA command set implements Native Command Queuing (NCQ). This improves
the performance of the SATA drive, especially in concurrent IOPS, but is not as powerful
as its cousin Command Tag Queuing in the SCSI world.
IOPS is an acronym for input/output operations per second and is pronounced eye-ops.
There are several types of I/O operations. Here are the most important:
• Read
• Write
• Random
• Sequential
• Read and Write IOPS
Read and write IOPS should be simple to understand. You click Save on the document you
are working on, and your computer saves that file to disk via one or more write IOPS. Later
when you want to open that document to print it, your computer reads it back from disk via
one or more read IOPS.
Mechanical disk drives thrive on sequential workloads but hunt like a lame dog when it comes
random workloads. There isn’t much you can do about that without getting into complicated
configurations that are pointless in a world where solid state is so prevalent.
Cache-hit IOPS, sometimes referred to as cached IOPS¸ are IOPS that are satisfied from cache
rather than from disk. Because cache is usually DRAM, I/O operations serviced by cache are
like greased lightning compared to I/O operations that have to be serviced from disk.
The overall response time is the sum of the seek time, rotational delay, transfer time, and
overhead.
Assume a disk has the following specifications.
An average seek time of 9ms,A 5400 RPM rotational speed, A 10MB/s average transfer rate,2ms
of overheads.
The average rotational delay is 5.55ms. (0.5 rotations / (5400 rotations/minute) = 5.55ms)
One possible measure of throughput would be the number of random sectors that can be read
in one second.
(1 sector / 16.7ms) x (1000ms / 1s) = 60 sectors/second
Calculating Disk Drive IOPS
A quick and easy way to estimate how many IOPS a disk drive should be able to service is
to use this formula:
1 / (x + y) × 1,000
where x = average seek time, and y = average rotational latency
A quick example of a drive with an average seek time of 3.5 ms and an average rotational
latency of 2 ms gives us an IOPS value of 181 IOPS:
1 / (3.5 + 2) × 1,000 = 181.81
This works only for spinning disks and not for solid-state media or disk arrays with large caches.
Maximum transfer rate : It is usually used to express the absolute highest possible transfer rate
of a disk drive (throughput or MBps) under optimal conditions. It often refers to burst rates that
cannot be sustained by the drive. Take these numbers with a pinch of salt. A better metric is
sustained transfer rate (STR). STR is the rate at which a disk drive can read or write sequential
data spread over multiple tracks. Because it includes data spread over multiple tracks, it
incorporates some fairly realistic overheads, such as R/W head switching and track switching.
This makes it one of the most useful metrics for measuring disk drive performance.
The following is an example of the differences between maximum transfer rate and
sustained transfer rate from a real-world disk drive spec sheet for a 15K drive:
• Maximum: 600 MBps
• Sustained: 198 MBps
Consider a 5.25 inch disk with 16 double-surfaced platters rotating at 5280 rpm. It has a usable
capacity of 16 gigabytes (2**34 bytes) stored on 1024 cylinders. Assume 12% of each track is
used as overhead.
1. What is the sustained bandwidth this disk could support reading an entire track?
#Bytes/Track = Capacity / (#cylinders * #platters * 2)
= 2**34 / (2**10 * 2**4 * 2)
= 2**19 Bytes
Time/revolution = 1/5280 minute
= 1/88 second
SB = bytes per track / time per revolution
= 2**19 bytes / (1/88) seconds
= 2**19 * 88 B/s
= (2**19 * 88) / (2**20) MB/s
= 44 MB/s
2. What is the average rotational latency, assuming it is not necessary to start about the
beginning of the track?
Avg. rotational latency = 0.5 * time per revolution
= 0.5 * (1/88) seconds
= 5.68ms
3. Assuming the average seek time is 10 ms, what is the average time to fetch a 4-Kbyte (2**12
bytes) sector?
Transfer time = (2**12)*1000/(88* 2**19) ms = 0.089 ms
Fetch time = seek time + avg. rotational time + transfer time
= 10 + 5.68 + 0.089 = 15.769 ms