Saturday, November 7, 2009


A "Ki", or kibi, is the prefix for 1024, or a KiB, if we're talking about bytes. The KiB symbol corresponds to a kibibyte whereas a GiB corresponds to a gibibyte. The new prefixes are contractions of two words: kilo binary and giga binary.
This distinction between byte and binary bite is the reason why sometimes my posts have GiB instead of the more common GB, especially when referring to the systems or graphics card memory, where they are indeed MiB or GiB and not MB or GB. While I try to keep things right, I do sometimes interchange between the two.
Typically, hard disks come with capacities of multiples of 10 while anything with RAM or Flash related comes with capacities that are always multiples of 2 - like most everything in a computer, including
3 bits per cell NAND, which will yield a power of 2 number of values, 8 different values per cell.
Back in late 90s, I thought hard drive manufacturers were ripping me off by stating less actual capacity then what they were selling, these new suffixes didn't even exist but nowadays that situation hasn't changed, the world around it has. HDDs still come with base 10 SI prefix but manufacturers are being just plain honest, it's the rest of the world has still not woken up to the new reality of binary prefixes.
Let's have a look at a modern SSD, a new and mostly unused OCZ Solid with 30GB:

~ $ sudo fdisk /dev/sdcCommand (m for help): p Disk /dev/sdc: 32.0 GB, 32044482560 bytes
As we can see, the device actually has 32GB of FLASH memory inside. The label should have read "OCZ Solid 30GiB", right? Almost: 32044482560/1024/1024/1024 = 29.84375 GiB (the real) or 30*1024*1024*1024 = 32212254720 = 30GiB (the ideal)
One can't complain can it? While OCZ is selling the drive as 30GB unit, it actually has 32.044GB, or 29.84GiB.
It was nice of OCZ to do this and they also sell both Vertex and Agility models the same way.
When it comes to RAM, you're actually always getting something with MiB or GiB of memory and not MB or GB. Much of the data that gets stored on RAM is a multiple of 32bit (4 bytes) that gets written in memory, be it either the system's memory or the graphics' card memory. Information that is not, typically text, that is counted in characters each taking up one byte, is usually not.
So, much information is packed in multiples of two: textures in games are 512x512, 1024x1024, 2048x2048, etc. This is useful because pages in memory also are store in multiples of 1024, 4KiB and 2 or 4MiB. If you're not using a size that fit pages in an efficient way, then you're wasting space that could have gone better used but there are also other reasons for this.




 
One of the more common misconceptions on the IT and consumer electronics market is that there's only one measure of how a computer can store information. In fact, there are two: the SI prefix and the SI binary prefix. This new designation was standardized ten years ago, in 1999.


Flash is an example of a storage technology that should always come be counted with binary prefixes and not regular base 10 prefixes. Flash can either store 2 bits per cell, 4 bits peer cell or 8 bits per cell, in the above mentioned upcoming MLC chips. How can you then sell a device with precisely a GB when it's flashed based? It's not easy, hence the "not a Gigabyte nor a Gibibyte" actual measure of the OCZ Solid* storage capacity.

Operating systems, most notably Linux, have been counting information on binary bytes for some time and I've stumbled with ever increasing exposure to the new SI also on web applications. It's still too little but there's some adoption.

Starting today, Silicon Madness will also take that route and will only mention capacity by it's right SI. Even while as strange as a Gibibyte might sound, we won't restrain ourselves from using that term.

* The device hasn't got enough usage that I can believe the lack of space to make up 30GiB is due to lost space in damaged flash cells but more this actual inability to produce a capacity in base 10 from a base 2 type of device. Notice the last 4 numbers of the actual size of the device: 2560. 2560 is 1024*2+512.



No comments: