The following is the first tip in a series on the different aspects of disk I/O performance and optimization for Oracle databases. Each tip is excerpted from the not-yet-released Rampant TechPress book, "Oracle disk I/O tuning," by Mike Ault. Check back to the main series page for upcoming installments.
General disk architecture
Disk architecture hasn't changed in the general sense in the last 17 or so years. Disks have gotten smaller and faster but their general features have not changed that much. Disks are physical entities consisting of some dimensionally stable substrate overlayed (usually aluminum alloys but now magnesium and even glass or ceramics are being considered) with a thin layer of material that can take and hold a magnetic charge. Optical media uses laser gouged pits to indicate zero or one rather than the presence or lack of magnetic signals; the mechanical technology is essentially the same in either magnetic or optical media. This general magnetic disk structure is shown in figure 1-1.
Figure 1-1: General magnetic disk structure
For a magnetic disk an electromagnet is used to place or remove magnetic charges to the magnetically sensitive coating. These magnetic charges are later read by a read head that senses the magnetic charge. Naturally the closer to the disk that the head fly the weaker, and thus more dense, the signals can be.
On an optical disk the substrate is usually an optically clear plastic with one side coated in a material that is photosensitive to a particular wavelength of light (like that given off by the laser used to encode it). The laser burns small pits in the photosensitive material that corresponds to the digital signal provided to drive the laser. Later a laser that is non-harmful to the photosensitive material is used to read the pits. Figure 1-2 shows the general structure for optical media.
Figure 1-2: Optical media structure
In both magnetic and optical technologies the read-write heads are usually combined into one device which is mounted on a mechanical assembly that moves the read-write heads back and forth above the media as the media rotates at high speed. In a 10,000 rpm magnetic disk, the disk edge is moving at over 100 mph for a three-and-a-half inch drive. On high volume drives there may be several platters that have magnetic media on both sides as well as dual read/write heads. The magnetic material is applied using a vacuum deposition method allowing for a very thin and uniform layer. The magnetic media is then overlayed with a thin carbon and a lubricating layer.
On a magnetic drive the read-write head moves on an actuator arm that actually makes an arc as it reads from the inner to outer edge of the disk. On an optical disk the read-write head moves in a track and moves linearly from the inner to the outer edge. This is demonstrated in figure 1-3.
Figure 1-3: Magnetic verses optical head movement
Read and write times for magnetic drives are usually an order of magnitude faster than for optical drives. This speed difference indicates that optical drives are good for archival but not for live data.
Since disks are mechanical devices they are subject to the laws of physics. The laws of physics determine how fast things can move in relation to each other and also determine how the air flows over and around a rotating object. All of these factors combine to limit the upper speed that a disk can rotate as well as how fast the actuator can move the heads back and forth over the disk surface. The rotational speed and arm or track speed determine the various latencies associated with either a magnetic or optical disk drive. The rotational latency is related to the speed at which the disk rotates. There is also the positional latency which is mostly determined by how fast the disk actuator can move. These combined latencies form the basis for the seek times for the drives. Seek times generally determine how fast data can be retrieved from a specific disk.
With a magnetic drive the read/write head(s) float over the disk surface on the long actuator arm. Sudden physical shocks can cause the actuator arm to flex causing the read-write heads to momentarily make contact with the disk surface. The effects of the read-write heads coming in contact with the surface of a disk vary from little damage and no loss of data to a severe disk crash with loss of all data unless sophisticated and expensive disk recovery processes are used. I have seen disk failures (head crashes) where the magnetic media was gouged off down to the aluminum substrate.
In optical drives the distance between the read/write laser and the disk must be held fairly fixed, thus the disk is locked into a drive mechanism and the laser is rigidly mounted in a head that travels by way of a track mechanism. The chances of a head crash in a laser disk system are virtually nil. Obviously any scratches in the optically clear plastic substrate may result in the data on the photosensitive substrate becoming unreadable. Likewise any scratches that remove the optical media also result in data loss. As long as the recording media is unharmed, an optical disk can be re-polished to remove surface scratches or blemishes on the optically clear plastic side, there is no way to repair the disk if the photosensitive media side is damaged.
Click to buy the book, "Oracle disk I/O tuning," by Mike Ault.
About the author
Mike Ault is a SearchOracle.com expert and a senior Oracle consultant with Burleson Consulting, and one of the leading names in Oracle technology. The author of more than 20 Oracle books and hundreds of articles in national publications, Mike Ault has five Oracle Masters Certificates and was the first popular Oracle author with his landmark book "Oracle7 administration and management." Mike also wrote several of the "Exam Cram" books, and enjoys a reputation as a leading author and Oracle consultant. Ask Mike a question today!