-
Remember Amdahl's Law:
-
Speeding up part of the problem while largely ignoring the rest leads to diminishing returns.
-
This means that focusing on the CPU will result in larger fractions of time spent on I/O.
-
Response time
versus
throughput
-
It can be argued that I/O speed does not matter in a multiprogrammed environment.
-
If a process waits for a peripheral, run another task.
-
This is an argument that performance is measured as throughput and response time does not matter.
-
This is hardly the case today with desktop computers running interactive software.
-
Response time is directly related to productivity.
-
Storage devices are
mechanical
, so they are subject to real physical limitations.
-
For example, it is not possible to spin a disk at 100,000 RPM.
-
A disk made of any material that we know of today would fly apart.
-
These mechanical delays are far more difficult to eliminate than electronic delays.
-
Reducing the size of mechanical devices is more difficult than reducing the size of electronic circuits.
-
We will focus on storage devices of highest capacity:
-
Magnetic disks.
-
Magnetic tapes.
-
CD-ROMS.
-
Automated tape libraries.
-
Magnetic disks have dominated
secondary storage
since 1965.
-
Magnetic disks are used for two main purposes.
-
They provide the lower level of the virtual memory system.
-
They provide long-term, nonvolatile storage for files.
-
Disks are usually the highest level of the storage pyramid that is non-volatile.
-
Important terms associated with disks:
-
Platter
-
Disks are built from several metal platters (1 to 20) covered with metal oxides or other magnetic recording media.
-
Platters are 1 - 8 inches wide.
-
Surface
-
Each platter has two surfaces, both of which may be used for recording.
-
Important terms associated with disks:
-
Track
-
A surface is divided into tracks, which are concentric circles containing data.
-
There are 500 - 2500+ tracks per surface.
-
The set of tracks at corresponding locations on all of the surfaces is called a cylinder.
-
Sector
-
A track is divided into sectors each of which holds a fixed amount of data, usually 512 - 4096 bytes.
-
Older disks have a constant number of sectors per track.
-
Newer disks record more sectors on the outer tracks using a
constant bit density
.
-
Important terms associated with disks:
-
Disk arm/head
-
Each surface is read and written by its own head.
-
All of the heads in a drive are connected together and move as a single unit.
-
Most disks have just one such unit.
-
However, more expensive drives may have two or more assemblies to increase the I/O rate.
-
Performance
-
There are three main components of each disk access:
-
Seek time.
-
Rotational delay.
-
Transfer time.
-
Seek time
-
The seek time is the time necessary to move the arm from its previous location to the correct track for the current I/O request.
-
The industry standard is to use
average seek time
.
-
This is computed by averaging the time necessary for all possible seeks.
-
This tends to
overestimate
actual average seek time because of locality of disk references.
-
Advertised average seek times of 8 ms to 12 ms may be smaller by 25% to 33%.
-
Rotational delay
-
The time necessary for the requested sector to rotate under the head.
-
Most disks rotate at 3600 - 7200 RPM (note that disks rotated at 3600 RPM in 1975!).
-
On average, the disk must rotate
halfway
around to get to a desired sector.
-
On a disk rotating at 6000 RPM, this delay is 0.5 / (6000 RPM / 60,000 ms/min) = 5 ms.
-
Therefore, the two mechanical components, moving the disk arm and waiting for the data to rotate under the head, add to the latency.
-
Some disks can
read data out of order
into a buffer, reducing rotational delay for a large transfer.
-
A full track can be transferred in one rotation regardless of where the I/O actually starts.
-
Transfer time
-
The transfer time is the time it takes to read or write a sector.
-
For the disk, this is approximately equal to the time it takes for the sector to
pass fully
under the read/write head.
-
It is a function of the block size, rotation speed, recording density and the speed of the electronics.
-
Typical rates in 1995 were 2 to 8 MB/sec.
-
A disk rotating at 6000 RPM with 64 sectors per track and 512 bytes per sector can read a
sector
in 10 ms/64 = 0.156 ms.
-
Since 0.5 KB are transferred in this time, bandwidth is 3.2 KB/ms, or 3.2 MB/s.
-
Note that the transfer rate is higher for sectors on outside tracks (on disks that have variable number of sectors per track.)
-
Other components to latency
-
Note, too, that other parts of the system can add delays.
-
Controllers and I/O buses can add their own delays, possibly decreasing bandwidth and increasing latency.
-
For example:
-
Suppose we have a new disk and want to see how quickly we can read a single sector.
-
Each sector is 1 KB long, tracks have 32 sectors each, average seek time is 8 ms, and the disk rotates at 7200 RPM.
-
The controller adds 2 ms overhead to each request.
-
Density
-
Disk capacity is measured in
areal density
(the number of bits per square inch).
-
This is the product of tracks per inch on a surface and bits per inch on a track.
-
Density has recently improved at a rate of 60% per year, matching density increases of DRAM.
-
Transfer rate
-
Since transfer rate is proportional to bits per track, improvements in density usually lead to higher bandwidth.
-
This increase is usually the
square root
of overall density increase.
-
Seek time is reduced by smaller disks and lighter heads.
-
However, seek time is still limited by mechanical considerations.
-
In 1995, the price/megabyte of Disk is about 100 times cheaper than the price/megabyte of DRAM.
-
However, DRAM is about 100,000 time faster.
-
Many have tried to fill the Access Time Gap with a new technology.
-
So far, nobody has succeeded.
-
Technologies such as bubble memory and flash RAM have been proposed, but usually end up being "taken over" by either memory or disk
.