File Sizes and Network Speeds - Get Your Units Right

Ever thought that your internet isn't as fast as you had expected, or that your hard drive was "missing" space. Chances are that you have misunderstood the units that are being used when performing measurements. For example, most people I meet think that a Gigabyte is 1024 Megabytes, but this is incorrect. A Gibibyte is 1024 Mebibytes whilst a Gigabyte is only 1000 Megabytes.

The Three Size Types

Network Speeds

Network speeds are measured in thousands of bits and are denoted with a lowercase 'b'. E.g the Megabit (Mb) and the Gigabit (Gb). You can think of a network port as physically blinking on and off really quickly, with each blink representing a bit. To easily compare speeds, its easist to just take the number and shift the decimal place by 3 at a time. E.g 19243532 times a second would be 19243.532 kb/s or 19.243532 mb/s. The rate can often be shown as kbps or mbps.

Disk Drives

Disk Drives are much like Network speeds in that they are measured in the thousands, but measured in thousands of bytes instead of bits. Each byte represents 8 bits. They are written with an uppercase 'B' such as KB, MB, GB, TB etc. So a KB is actually 1000 bytes or 1000 * 8 bits. This trickles down to a single 1 TB drive being equal to 1000 * 1000 * 1000 * 8 bytes (8 * 10^9 bytes).

It's very easy to switch between network speeds and hard disk capactity by simply multiplying or dividing by 8.

Computers And Filesystems

Your computer works in binary, and chances are that your filesystem also shows file sizes in binary, which uses base 2 (hence binary) instead of base 10 like the previous two units of measurement. This means that instead of being increments of 1000, it uses increments of 1024, so 1 KiB = 1024 bytes, and 1 MiB = 1024 * 1024 bytes etc.

This unit should be represented by using a small 'i' with an uppercase 'B', however a lot of the time it will be misrepresented as MB, GB etc. Thus, I am not surprised that so many people get confused.

A Network Example

If you are maxing out your gigabit network link to transfer some files, you should see a transfer rate of 125MB/s which equates to 119.209289551 MiB/s. Your computer may display 119.202 MB/s and you will be wondering where your missing 5.8 MB are because you just divided 1000Mb/s by 8 to work out 125MB/s.

"Missing" Hard Drive Space

People who buy large harddrives sometimes feel like they have "lost" space somewhere because it shows a larger number on the box than what appears on their computer, not realizing that two different units are in play. For example a 3TB drive actually equates to 2.728484105 TiB. This problem only gets more aparent as hard drives get larger. For example, I combined two 3TB drives into a single 6TB volume, but my computer shows a unit of 5.4T.

I have heard user's say that it was lost in formatting, creating partition tables, or reserved by the operating system. This is all nonsense because everyone is taught to say Terabyte instead of Tebibyte and don't realize that they did indeed buy a 3 Terabyte drive, but their operating system is showing them units of Tebibytes.

Online Conversion Tool

Here is the only converter I could find that will convert network speeds to filesystem units (Mb to MiB) and vice-versa. Most other converters only transfer from network speeds to drive capacity units, or drive capacity units to filesystem units.

The tool uses commas to represent a decimal place rather than the full-stop/period.

No comments:

Post a Comment