Wednesday, April 21, 2010

Capacity measurements

A disassembled and labeled 1997 hard drive. All major components were placed on a mirror, which created the symmetrical reflections.

Raw unformatted capacity of a hard disk drive is usually quoted with SI prefixes (metric system prefixes), incrementing by powers of 1000; today that usually means gigabytes (GB) and terabytes (TB). This is conventional for data speeds and memory sizes which are not inherently manufactured in power of two sizes, as RAM and Flash memory are. Hard disks by contrast have no inherent binary size as capacity is determined by number of heads, tracks and sectors.

This can cause some confusion because some operating systems may report the formatted capacity of a hard drive usingbinary prefix units which increment by powers of 1024.

A one terabyte (1 TB) disk drive would be expected to hold around 1 trillion bytes (1,000,000,000,000) or 1000 GB; and indeed most 1 TB hard drives will contain slightly more than this number. However some operating system utilities would report this as around 931 GB or 953,674 MB, whereas the correct units would be 931 GiB or 953,674 MiB. (The actual number for a formatted capacity will be somewhat smaller still, depending on the file system). Following are the correct ways of reporting one Terabyte.

SI prefixes (Hard Drive)equivalentBinary prefixes (OS)equivalent
1 TB (Terabyte)1 * 10004 B0.9095 TiB (Tebibyte)0.9095 * 10244 B
1000 GB (Gigabyte)1000 * 10003 B931.3 GiB (Gibibyte)931.3 * 10243 B
1,000,000 MB (Megabyte)1,000,000 * 10002 B953,674.3 MiB (Mebibyte)953,674.3 * 10242 B
1,000,000,000 KB (Kilobyte)1,000,000,000 * 1000 B976,562,500 KiB (Kibibyte)976,562,500 * 1024 B
1,000,000,000,000 B (byte)-1,000,000,000,000 B (byte)-

Microsoft Windows reports disk capacity both in a decimal integer to 12 or more digits and in binary prefix units to three significant digits.

The capacity of an HDD can be calculated by multiplying the number of cylinders by the number of heads by the number of sectors by the number of bytes/sector (most commonly 512). Drives with the ATA interface and a capacity of eight gigabytes or more behave as if they were structured into 16383 cylinders, 16 heads, and 63 sectors, for compatibility with older operating systems. Unlike in the 1980s, the cylinder, head, sector (C/H/S) counts reported to the CPU by a modern ATA drive are no longer actual physical parameters since the reported numbers are constrained by historic operating-system interfaces and with zone bit recording the actual number of sectors varies by zone. Disks with SCSI interface address each sector with a unique integer number; the operating system remains ignorant of their head or cylinder count.

The old C/H/S scheme has been replaced by logical block addressing. In some cases, to try to "force-fit" the C/H/S scheme to large-capacity drives, the number of heads was given as 64, although no modern drive has anywhere near 32 platters.

For a formatted drive, the operating system's file system internal usage is another, although minor, reason why a computer hard drive or storage device's capacity may show its capacity as different from its theoretical capacity. This would include storage for, as examples, a file allocation table (FAT) or inodes, as well as other operating system data structures. This file system overhead is usually less than 1% on drives larger than 100 MB. For RAID drives, data integrity and fault-tolerance requirements also reduce the realized capacity. For example, a RAID1 drive will be about half the total capacity as a result of data mirroring. For RAID5 drives with x drives you would lose 1/x of your space to parity. RAID drives are multiple drives that appear to be one drive to the user, but provides some fault-tolerance.

A general rule of thumb to quickly convert the manufacturer's hard disk capacity to the standard Microsoft Windows formatted capacity is 0.93*capacity of HDD from manufacturer for HDDs less than a terabyte and 0.91*capacity of HDD from manufacturer for HDDs equal to or greater than 1 terabyte.

No comments:

Post a Comment