1K is 1000 or 1024?

                One of the ambiguous things a software engineer encounters is the usage of K(ilo)/M(ega)/G(iga). In the software engineers world, they are interpreted in powers of 2 (1024, 1024*1024 and so on). Surprisingly, the usage/interpretation varies even within various software products. (Internet speed is measured in 1000s, RAM size is measured in 1024s). In the networking world, we ask the customer to configure 9K (as MTU) while the customer configures it as 9000. I came across an elegant solution to this MTU problem by AWS. Before that, I want to share a funny story with the 1000/1024 confusion.

                This was before a couple of decades in my undergrad school. Internet was luxury, and google was not in the dictionary yet. My parents approved of purchasing a computer for my studies.  There was a lot of debate to buy a 64MB RAM or 128 MB RAM, 4GB Hard disk or 8GB hard disk and so on. If you think these were a very small footprint, my cousin was recommending me a 32MB RAM & 2GB hard disk for my usage. I decided on 128MB RAM and 4GB hard disk and went to Ritchie street(Madras) and got all the parts. Then I came back to the room and assembled the parts, and booted the system with Windows OS. When the OS came up, the first thing I did was to check the RAM really was 128MB and the hard disk was really 4GB. To my shock, hard disk size was only 3.7GB, which was 7% lesser than I planned for. Actually, I was thinking I could store 100 MP3 songs lesser now ;-). I was under shock and took the hard disk back to Ritchie street, and was sleeving up for a fight!  The dude in the shop was cool and explained to us the problem; when the Windows reports it, represents in 1024*1024*1024 notation, while the hardware manufacture represents it in 1000*1000*1000, and it satisfied the customer. Now looking back, this is one of the stupidest things I have done as a computer science grad!

                    Now coming back to AWS: When we recommend the customer to configure 9K as MTU, we mean 9*1024, but most likely the customer configures 9000. To avoid this confusion, AWS has eliminated the ambiguity by recommending 9001 as the MTU size (for jumbo frames). So, when the MTU is communicated in the field, there is no confusion of 9*1000 or 9*1024! Simple right?

Stay tuned!

Comments

Popular posts from this blog

Being a startup guy!