Tag Archives: mebibyte

Money Mangled the Megabyte

Say What?!?

Some time ago, I was in an engineering meeting and we were discussing bandwidth and data rates.  I was waxing eloquent about how various IP blocks could deliver data at a rate of such and such megabytes per second.  I had just started my discourse and was building up to a full head of steam to deliver my prima facie case when one of the engineers in the room interrupted me and said “You mean mebibytes per second?”  I stopped for a moment squinted and wrinkled up my face and said to him whilst giving my very best ‘snooty waiter’ impression, “Excuse me?” He then demurely repeated himself because I was giving him ‘that look’ that bespoke me thinking quite loudly “Seriously?!? You just interrupted me when I was about to deliver a masterful and insightful comment?” Those of you who know me know ‘the look’ I am referring to that precedes me sucking all the air out of the room, but I digress – He said again “You mean mebibytes per second…you know…power of two and all that?”  Everyone in the meeting then turned to look at me, and not unlike watching a tennis tournament, waited to see how I was going to return the rather clumsily served ball.  I did what every well heeled, hot-blooded engineer would do in that case and  simply volleyed with a “Yeah…” and continued on my merry way with my brilliant, although now somewhat tarnished, point.

Elmer_FuddNow, two things were running through my head during this rather odd exchange.  Either this engineer had just said the word ‘megabytes’ twice the way Elmer Fudd would say it and therefore he had a speech impediment that I had never noticed before, and it was therefore prudent of me to not mock him and say very slowly and distinctly “yes…
M E G A B Y T E S” with the emphasis on the ‘G’ –or- perhaps I had no idea what the heck he was talking about and it was best to just nod and move on, because after all whilst unlikely it was possible that…well, you know.

I went back to my office and promptly decided to “research” this complete mispronunciation of the word ‘megabytes’.  Most of you probably thought I ran to Google as fast as frat boys to a keg – admit it…there’s no shame in that…but I say ‘nay nay’ (RIP John Pinette). Instead I went to the place that I always go to when I want ‘real’ answers – not answers ‘paid for’ by the highest bidder (ouch…too soon?)  Yes folks…I went to the ‘Dark Web’ which filled the void when Silk Road was “shut down”.

Accessing the Dark Web

Accessing the Dark Web

The answer to “are mebibytes a real thing?” came back very slowly and with a deet deet deet sound, you know the way computers work in the movies (because of the Matrix, Hollywood directors still think REAL computers connect to each other through telephone hard lines and run at 1200 baud (n,8,1)) but surprisingly my answer from the Dark Web did come back at like two characters per second and in green text– I guess it took that long because the folks running the dark web can’t see what the heck they are doing and are always running around looking for a flashlight.  Here is the answer – are you ready? NO – it was not 42 – stop that!  It was “B L A M E  T H E  I E C”.  Ooh…now I was getting somewhere!

So, what is this IEC…this oozing behemoth, this fibrous tumor, this monster of power and expense hatched from the simple human desire for engineering order? How did allegedly smart people spawn a vast, rampant cuttlefish of dominion with its tentacles in every orifice of the body of engineering policy? (my apologies to P.J. O’Rourke)

OK…so the International Electrotechnical (not a real word I fear) Commission, or IEC as they like to be called (because they are tired of people telling them that Electrotechnical is not a real word) have been around for 108 years (by way of contrast my Uncle Milton was around for 100 years and he always left “well enough alone” – which is probably why he was around for 100 years) and is comprised of 10,000+ engineers from 82 countries and they historically gave us the SI units from which such illustrious units as meter, kilogram, second, Kelvin, and candela were derived.  OK…so they also gave us radian, hertz, newton, pascal, joule, watt, volt, farad, Celsius, lumen, and… (I GET IT…they are smart people) – but THIS TIME they have gone TOO FAR I tell you!!!  The megabyte is sacrosanct.  How in the world did this happen? WHAT IN THE NAME OF ALL THINGS BINARY HAPPENED?

Blame the Hard Drive

Flux Capacitor

Flux Capacitor

There is a very famous saying that I applied liberally here to this tragedy. “Follow the money…”  Yep…in this case it absolutely turns out to be true – “Money Mangled the Megabyte”.  So…let’s just hop into our “way back” machine and head to the heady days of PCs when people bought hard drives to upgrade their computers.  Yes…a time of flux capacitors, proton packs (don’t cross the proton streams), Donkey Kong and Teddy Ruxpin (don’t judge).

 

It is the good old 80s and hard drive sizes were measured in mere megabytes…amazingly enough there was at one time a 32MB hard drive size limit ‘barrier’ in MS-DOS 3.x. I won’t go into a long winded discussion about this barrier – because someone else has already done so – click here for more info on this mind numbingly fascinating subject. Users had a huge hunger for bigger hard drives and they could buy them from peddlers advertising in Byte or PC Magazine and they often found when their hard drives arrived that they had to concern themselves with a dizzying array of complications like the fact that their new hard drives were physically organized into things like cylinders, heads, and sectors.  Now, I know that this is a bit difficult, but try to imagine such a thing as a 40MB hard drive (which cost ~$1000 at the time).

Cylinder Head Sector

Cylinder Head Sector

An example 40MB hard drive could have a ‘physical’ layout of 640 cylinders, 8 heads and 17 sectors per track with 512 bytes per sector. So that means that this hard drive had 4 “platters” with eight ‘heads’ that would rotate itself into and out of the gap between the cylinders and “fly” just above the magnetic field stored on the platters (top and bottom) – kind of like an old phonograph but without physically touching the media.  The data was stored in concentric circles and each of these concentric circles was called a ‘track’ – So if you had 640 ‘cylinders’ – the heads could seek discretely to one of the 640 concentric tracks on the platter. Each ‘track’ was further subdivided into 17 sectors – with each sector storing 512 bytes.

So, let’s do the math…640 cylinders x 8 heads x 17 sectors x 512 bytes per sector = 44,564,480 bytes.  Now…stay with me here…because this is the important bit.  The hard drive manufacturers would divide 44,564,480 by 1,048,576 (which in my book is a MB) because it is a power of two – 220 – which is what we computer folks like to think in when we think of computery types of numbers and this results in a product of ~42MB – which is what the hard drive manufacturers would then claim was the capacity of the hard drive. I am now climbing up onto my soapbox – so beware.

In the world that I come from it is quite simple.

1KB = 1,024 bytes or 2^10 bytes
1MB = 1,048,576 bytes or 2^20 bytes
1 GB = 1,073,741,824 bytes or 2^30 bytes
1TB = 1,099,511,627,776 bytes or 2^40 bytes

I don’t want to argue about this because this is the way it was from the beginning, is now and should be until we no longer need these units. I am now climbing off of my soapbox.

OK…back to our regularly scheduled programming.  The only rub was that in the good old days hard drives were fairly non-intelligent and they had to be ‘physically’ formatted by the hard disk controller. This little gem of technology was typically sold separately or already pre-installed in the computer (in the case of an upgrade).  Again…I won’t go into the lengthy discussion surrounding this but you can find out more here should you so choose. Once the physical format was completed it was up to the user to then apply the operating system’s file system to the hard drive in a process called ‘logical’ formatting – those of you who are over forty and used to use DOS surely remember the venerable fdisk and format utilities right?  During this logical formatting process, bad sectors might be found on the hard drive because hard drives are notorious for having some contaminants or imperfections on the platters that prevent data from being read or written to a particular physical location.  In this case, these bad spots were simply marked ‘bad’ by the logical formatting utility and the file system just worked around them.  Yes – this process resulted in ‘diminished’ storage capacity – but the amount of space reduction was miniscule because it represented the actual physical bad spots on the disk at the time – which were typically negligible in a brand new hard drive.  OK…got all that?

Now…another KEY thing to note here is that DOS and Windows reports (and likely always will??) storage device capacities as a “power of two” – which means 1MB = 1,048,576 bytes and so on…see and remember my ‘soapbox’ list above.  This is a VERY important piece of information to remember.

 

Furby

Furby

Time passes and hard drive technology advances at an almost breakneck pace.  Now we are in the 90s.  A time of Furbys, Beanie Babies, Pokémon and the rise of the hipster and the swelling of the dot com bubble.   Hard drives have become more and more intelligent until eventually – they start handling their OWN bad sectors instead of having to rely on the operating system to ‘work around’ bad sectors.  So in short, the hard drive simply reports back to the operating system how much storage is on the hard drive and there is no longer any tedious mucking about in hyperspace with cylinders, heads and sectors.

So – how was this accomplished? Several ways actually, but the practical upshot is that the hard drive simply ‘reserves’ sectors that are good – taking them away from the true physical storage capacity of the device – and makes them available for bad sector ‘remapping’ meaning that a few sectors of each track are reserved for the remapping of bad blocks.  Now…another interesting thing about hard drives is that bad spots on a hard drive can begin to ‘grow’ and start showing up in places where they weren’t detected before. That means that you can’t just reserve a fixed number of good sectors ahead of time to replace the actual number of bad sectors on the hard drive.  Instead, you have to come up with a very good estimate of how many sectors are likely to go bad over the life of the drive and reserve enough good sectors for those “sure to appear” bad spots as well.  Ah…did the light bulb come on?  NOW we start getting a glimpse of the crux of the problem…right?

hard_disk_drive1This reservation of sectors on every track to handle bad block remapping obviously results in a reduction of the actual usable space on the hard drive.  These new more intelligent hard drives report how much ‘real’ storage space is on the hard drive taking into account the reserved blocks for error handling.   So, once you connect the hard drive to your computer, your 100MB hard drive that you paid so much money for now actually shows up to the operating system as 93MB because ~7MB was reserved for bad block handling. Your 100GB hard drive suddenly becomes a 93GB hard drive and your 1TB hard drive becomes a 931GB hard drive.  Are you mad yet?  Well you might not have been – but a whole LOT of people were HOPPING mad.  Mad enough to actually file a lawsuit against Western Digital (a leading hard drive manufacturer) over this very issue.  Click here to add a little additional color to the matter.

So, the whole thing kind of went down like this. The hard drive engineers went to marketing and said “We have good news and bad news…”
Marketing folks said, “Good news first…” (They are always the optimists)
Engineers: “Our customers will never see bad blocks ever again on our hard drives…we fixed that.”
Marketing: “Great!!! What is the bad news?”
Engineers: “The hard drives are going to show up to the operating system smaller then you want them to be.”
Marketing – now furrowing their brows: “How much smaller?”
Engineers: “Small enough that you better not go out there saying that they are 512MB hard drives any more. They will be more like 498MB hard drives.”
Marketing: “Seriously?! We can’t do that…we can’t say 498 we have to say 500…we ALWAYS round up…it’s the way of our people.”
Engineers: “Well…don’t say we didn’t warn you…”
Marketing: “Fine…we will figure it out.” (which is code for “we are going to round up anyway” – but they  still round down the price from $800 to $799.99 which makes the consumer think it’s really only $700…right?)

However, somewhere on this long dusty road of storage technology a very smart marketing person figured out that a megabyte doesn’t really HAVE to be 1,048,576 bytes…what if it was…say…1,000,000 bytes?  Now the logic behind this is “if we say 100MB then since the hard drive thinks in power of two which means 104,857,600 bytes it should give us enough room factoring in bad block handling to say…” Well Mr. or Ms. Customer – you DO actually have an effective 100,000,000 bytes of storage which is in our book 100MB!” and therefore they just went ahead and stuck 100MB in the ads and on the box.  In effect the marketing folks simply just changed the definition of a megabyte from 1,048,576 bytes to 1,000,000 bytes.  Voila – problem solved and off to lunch.

Now those of you who are ‘engineering minded’ will do the math and say…wait 104,857,600 bytes is still less than the 7MB delta in your previous paragraph – so you STILL would have less than 100,000,000 actual usable bytes.  Clever catch…I kinda hoped you wouldn’t notice that – but since you did…I would like to point out that the ACTUAL physical storage is still based on cylinders, heads and sectors even though they are no longer exposed to the user.  Based on this method of storage organization a 100MB hard drive would usually have more storage capacity then a perfect 100MB and often times would hold 107MB or more once the numbers were run – so redefining 100MB to mean 100,000,000 bytes held sway – this is particularly true as you get to bigger drive sizes.  Now…enter REALLY big hard drives and the problem compounds.  Like I mentioned above – with a 1TB hard drive – when you factor in error handling and improper definitions – you might actually end up with a 1,000,000,000 byte drive (Terabyte) instead of a 1,099,511,627,776 byte drive (which you might have been expecting).  Worse still Windows is going to tell you that the drive you just hooked up to your PC is actually a 953MB hard drive…and well ain’t that special? That is a delta of almost 100 billion bytes that you thought you bought no matter HOW you slice it (assuming you think 1TB is a power of two…which it is).  This is a pretty big flippin’ deal and the proverbial fur started flying.

The IEC??

Now…enter the IEC.

IEC Headquarters in Geneva

IEC Headquarters in Geneva

In 1998 – this issue was somehow brought to their attention.  Perhaps they could smell this issue coming from 5823 miles away.  At any rate…I suspect that some rather high paid lawyer was looking for some legal justification to use at trial to defend the hard drive marketing folks’ declaration that they unilaterally changed the term MB from what we ALL know to be 1,048,576 bytes to 1,000,000 bytes.They searched high and low and came across the IEC and dared to ask THEIR opinion (this of course, after asking everyone from the plumber’s union to their favorite chefs in San Francisco what they thought).  After some highfalutin debate by the appropriately ordained IEC committee, I am quite sure that some engineer (NOT a computer programmer mind you) – said – “Well y’all…like we HAVE defined kilo to mean 10^3 and mega to mean 10^6 and giga to mean 10^9 for like something like 100 years give or take – like you know…the kilometer, kilogram, and so on…you feel me here?”  I imagine the debate went something exactly like that…led by a quite brilliant California valley girl who went to a very nice engineering college in Alabama and has hip hop leanings (the girl…not the college).

Officious IEC Meeting

Officious IEC Meeting

At this point, I am sure the illustrious committee handling this weighty matter agreed and said unanimously “yep…you are exactly right our brilliant fearless leader and your logic is flawless. A megabyte is now hereby and forever 1,000,000 bytes (and at that somebody then banged a gavel to add weightiness to the proceeding)…now that THAT is settled…what’s for lunch?”  Someone else at this point must have spoken up and said “Wait!!! We have to come up with a unit that the computery minded people can use to mean 1,048,576 bytes…after all…we just took away their precious megabyte.” Anxious to get to their buffet they must have not spent too much discussing this particular point because what they came up with was…and it is hard to type this with a straight face, much less SAY it with a straight face…the MEBIBYTE which they also cleverly abbreviated as ‘MiB’ (which silly me…I always thought was an abbreviation for ‘Men in Black’).

So what was the rationale for the made up word mebibyte? The IEC folks just took the starting letter of the word ‘binary’ and jammed it into the word megabyte replacing the ‘g’ with the ‘b’ and inexplicably replacing the ‘a’ with an ‘i’ apparently for some feeble attempt at engineering humor.  I mean…perhaps ‘mebabyte’ would have been better than ‘mebibyte’…it’s arguable – but any improvement in the term would have been…well…an improvement. As an aside…I am using Microsoft Word to write this tome and it keeps telling me that ‘mebibyte’ isn’t actually a word…the spell checker is having fits so that tells you how well accepted this silly unit is.  But…the IEC didn’t stop there…oh no…they went “all in” and just went ahead and messed up the REST of our venerable units.

So…what did our friends at the IEC come up with?  Here is the table:

IEC Unit Table

IEC Unit Table

Want to know my take on all this nonsense? ‘Kibibyte’ sounds like a treat for dogs.  ‘Yobibyte’ sounds like a cartoon character. ‘Mebibyte’ and ‘Tebibyte’ sounds like a cartoon character trying to say megabyte and terabyte.  ‘Gibibyte’ and ‘Zebibyte’ sound like folks who used to mess with the twelve tribes of Israel from the Bible.  Don’t get me started on what ‘pebibyte’ sounds like…

So…there we have it.  That is the story of how “Money Mangled the Megabyte”…I was going to call this “How I Met Your Mebibyte”…but for some reason an alliterative title appealed to me more.  Now we have this “official” silly sounding set of units that more and more computery people are thinking we have to use.  Worse still there is an increasing number of people who think a megabyte is 1,000,000 bytes.  It maketh me sad.  I say “Viva La Megabyte!!!!” -the power of 2 megabyte…you know…1,048,576 bytes…oh..never mind-.