[Gllug] Bytes to Megabytes

Liam Smit liam.smit at gmail.com
Fri Aug 26 16:09:34 UTC 2005


> > > Can anyone confirm for me a definition of a Megabyte that is correct for
> > > measuring volumes of traffic?
> > >
> > > I am doing a script that reports the number of Meagbytes transferred
> > > during a VPN session. I collect data in bytes.
> > >
> > > I have always used ( bytes / 1024 ) / 1024 to calculate file sizes in MB
> > > (1MB = 1,048,576 bytes). But having read the three definitions of a
> > > Megabyte here -- http://en.wikipedia.org/wiki/Megabyte -- I believe I
> > > should be using 1MB = 1,000,000 bytes in this case.
> >
> > Yup. I'm afraid this is what happen when marketing types pull a fast
> > one and get away with it. But luckily this mostly apply to HDD's i.e.
> > 1GB = 10^9 and not 2^30.
> >
> > Although I see BT is carrying on as if 10^3 is a megabit...
> >
> > Seeing as how it used to be 1024^2 I'd stick with that. Either way
> > it's a 7% difference so maybe you should document whatever you decide
> > on?
> 7% difference: how do you get that figure? I make it 4.8%.

Sorry I was working in GB to get ~7%, MB is ~5% and KB is ~2%.
I'd worked it out earlier today for another reason and jsut resused
the stat without thinking it through.

It's a cumulative problem, imagine how bad it gets when you start
using TB and PB. <g>

cheers
Liam
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list