12

What are the correct usage guidelines for SI and IEC binary prefixes when using decimal (power of 10) units of measurement relating to computer networking and binary (power of 2) units of measurement (data transfer in particular, but also file size) ?

This Wiki page gives a detailed description of the problem and different solutions. I find that Wiki paged linked above a bit confusing.

I always use the SI (decimal) units for data throughput and IEC values (binary prefixes of 2^) for file sizes. From time to time however, I do see people calculating speed using a multiple of 1024 in their sums.

I have always used multiples of 1000 for speed measurement, such as 1Kbps = 1000Bps;

  • 100 bps == 100bps (bit per second)
  • 100 000 bps == 100Kbps (kilo bits per second)
  • 100 000 000 bps == 100Mbps (mega bits per second)
  • and so on...

With measurements of file size or memory I have always used multiples of 1024 (binary prefixes) such as 1KB file is 1024 bytes in size;

  • 100Bs == 100B (byte) file
  • 100 000Bs == 100KB (kilobyte) file
  • 100 000 000Bs == 100MB (megabyte) file
  • and so on...

There is some room for discrepancy to arise here between networks and customers. A standard billing issue example is that a customer of an ISP has a 50GB per month bandwidth allowance. Different operating systems use difference units of measurement for both speed and memory and display this using the different IEC and SI prefixes. This section of the same Wiki page on Operating Systems and Software lists the discrepancies between operating systems and software packages that mix and match different prefixes with units of measurement.

It is possible for an ISP to measure 50GBs of data transfered as (1024^3) bytes * 50 == 50GBs (1GB == 1073741824 bytes). and the user may disagree when the 50GB limit is reached. A users who's machine displays Gibibytes for example would show 46.57 Gibibytes transfered.

From the network's perspective

  • 50GBs in bits: ((((50GBs*1000)*1000)*1000)*8)=400000000000 bits
  • Bps to copy 50GBs in one hour: (((400000000000/60)/60)/24)/24=192901.23
  • This speed in Mbps: ((192901.23/1000)/1000)*24*24 = 111.11Mbps

A Gibibyte is this many bits: ((((50GiB*1024)*1024)*1024)*8)=429496729600 which is more. So a link that runs at 111.11Mbps for 1 hour hasn't transfered a Gibibyte.

Purely from a networking and technical view point here (not legal regarding fair usage policies or T&Cs etc), what is a best practice, always used mega/giga/tera or mibi/gibi, IEC or SI notation for measurements and monitoring etc? How do you keep everything uniform?

4
  • 2
    FYI if you're also asking about file sizes the question is a better fit on Server Fault... if it's strictly data transfers, then multiples of 1000 (instead of 1024) are correct per IEC 60027-2. BTW, TY for your comment on my pppoe answer and I updated the units accordingly Oct 17, 2013 at 15:06
  • Just for the record: the IEC recommends the standard use of SI decimal prefixes. They have created additional, unambiguous, binary prefixes kibi-, mebi-, gibi- etc. but they in no way define or recommend notations like KB=1024 bytes or MB=1024 KB. Those uses are extremely common, esp. due to the display of file sizes in various OSes/GUIs, but they are utterly and entirely non official (and mostly unpractical or plainly weird).
    – Zac67
    Mar 23, 2023 at 12:35
  • @Zac67 Do you have a source for the "IEC recommends" claim? Would be interesting to read more. Oct 19, 2023 at 7:36
  • Those prefixes were defined in IEC 60027-2 (2000-11) Ed. 2.0 - sadly not freely available.
    – Zac67
    Oct 19, 2023 at 8:46

1 Answer 1

13

The difference in prefixes usually comes from the professional background of the people doing the counting.

Electrical engineers's professional background is in physics which uses powers of ten. On the other hand, software professionals tend to count everything in powers of two since it makes more sense in their context.

Because the standards for the bottom two OSI layers (Physical, Data-Link) are (mostly) written by electrical engineers ( e.g. IEEE / ITU-T), the standard units of measurements in these layers are usually powers of ten. This is why gigabit Ethernet works at a nominal rate of 1*10^9 bps, not 2^30bps.

Higher layers are standardized by software people (e.g. IETF) who like to measure things in Bytes (2^3 bits). This is where powers of two start coming in.

The same conversion problem happens in storage devices. Electrical engineers build storage devices that stores 1,000,000,000,000 bytes and call them Terabyte drives, while the operating system, written by software engineers, reports their capacity as only 931 Gigabytes.

I hope this somewhat clears the picture.

To avoid confusion, I recommend using binary prefixes for units that are power of two and not overloading the term "Kilo" to mean both 1000 and 1024, especially in contexts in which both meanings can appear.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.