# Drive - Hard (disk|drive) (HDD)

## 1 - Definitions

A disk refers to magnetic media, such as:

• a floppy disk,
• the disk in your computer's hard drive,
• an external hard drive.

Disks are always rewritable unless intentionally locked or write-protected. You can easily partition a disk into several smaller volumes, too.

Disks are usually sealed inside a metal or plastic casing (often, a disk and its enclosing mechanism are collectively known as a “hard drive”).

A disk is not a disc (optical media).

A disk drive is a series of stacked platters with very small heads that read and write the data to the various platters. These platters rotate or spin at very high speeds, currently up to 10,000 rpm (revolution per minute). As disk requests come down from NT Server, the heads move accordingly over the platters to obtain the requested data.

• Cylinders
• Platter

## 3 - Disk Operations

The performance of the disk are really depend of the access mode (random or sequential)

When data are requested by a process which is identified on the disk drive:

• the disk head seeks to the appropriate track.
• the platter spins until the proper sector of data is under the waiting disk head.

The combination of the seek and rotational time associated with obtaining the data is the access time.

• the data is then transferred to the embedded disk controller that is physically located on the disk drive unit.

The most costly portions of this process is the time it takes for the head to move to the correct track, for example, seek time and the rotation time of the disks platters (latency). Cost here is referenced in time. The longer it takes for the physical activity to be completed, the longer the server process must wait for its data. To get an understanding of what contributes to the relative time required to get data from the disk subsystem up to the PCI bus, look at the pie chart.

Then from the embedded disk controller, the data is send to the host system (the computer) with one of this type of transport:

### 3.2 - Write

During the write operation, the host issue a write command chipset (write command), then this command will be sent to the hard disk.

1. The Host send an order (write 4 blocks from 1000).
2. The hard disk after receiving the order ask the the host to send the data.
3. The Data are placed into the write buffer.
4. The Hard disk find the corresponding blocks in the physical sectors and the data are written to disc.
5. The Hard disk return information indicating that the write operation is complete.

## 4 - Counter / Metrics

### 4.1 - Density

The key counter relating to density per platter are:

• Tracks Per Inch (TPI): the number of tracks that can fit in a given area (inch).
• and Bits Per Inch (BPI): the number which defines how many bits can be written onto one inch of a track on a disk surface.

With fdisk, you can get this information by using the p command.

[[email protected] ~]# fdisk /dev/sda2
Command (m for help): p
Disk /dev/sda2: 21.3 GB, 21361052160 bytes
255 heads, 63 sectors/track, 2597 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

### 4.2 - Others metrics

• % Disk time: the percentage of elapsed time that the disk drive is busy servicing read or write requests.