lkml.org 
[lkml]   [1996]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: GB vs. MB
Date

Albert Cahalan Wrote ...
>
> I would like to see the drives sold with MB=2^20.
> Since that is not so and nothing will change that,
> I would at least like Linux to agree with the drive label.

Then report it as: 'Drive may be (mis)labeled 2.1gig as a marketing ploy'
:-)

> It does not really matter if the drive companies decide
> that a MB will be 937201 bytes. I'll buy "more" disk then.
> Most of all, I'd like everything to agree.

Yeah, ram, disk, sectors, disk blocks, page sizes, address spaces, process
size limits. Yep, let's make them all multiples of 1000. NOT!

Computers work in powers of two for a reason. Memory and process space and
disk space are all interrelated, especially in a Unix system. They may not
be in Word for Windows but this isn't W4W. If I need to work out how many
i-nodes I'm going to get, I want the right answer. I want to know what df
will report. etc etc etc

A typical example of all this is as follows. I've done this about half a
dozen times in the last few weeks as a customer of mine upgrades disks:

- Buy 2 gig disk
- Partition disk into 511 meg partitions (because you lose about 25% of
your diskspace when DOS bumps the allocation unit size up at 512MB if you
have lots of small files - which most business users do).
- End up with 3 511MB partitions and a 371MB partition. And those are FDISK
figures. Why? Because it's _NOT_ a 2 gig disk and EVERYTHING else
(including DOS and WINDOWS) uses real megs when doing calculations.

> The traditional MB is also hard to deal with unless you
> write everything in hex. How many GB is 1900000000 bytes?

I don't usually care. I don't often see disk space reported in that
fashion. Not even GNU df will report bytes. du will but when last were
bytes relevant?

> It is obviously 1.9 cheap GB, but it is 1.77 traditional GB.
> I do not wish to do that calculation ever.

But you have to in one direction or the other sometime no matter which
choice you make. If you report everything in 'decimal' KB and MB in the
kernel then you have to convert when you see output from apps.

> This is 1996, and a disk MB is 10^6, like it or not.

No, a disk marketing MB is 10^6. The MB actually stores on the disk are
still 2^20. The filesystems, utilities, everything treats them that way
(and not just in linux).

And if you think I'm not talking about the 'real world', I just looked at
Win95. It _CONSISTENTLY_ uses 2^20 MB for its measurements. When you open a
folder, the properties page, on files _and_ disks.

> Linux should be compatible with the rest of the world.

It is. It's just incompatible with the labels on the disks. That's ALL.

--
[======================================================================]
[ Kevin Lentin Email: K.Lentin@cs.monash.edu.au ]
[ finger kevinl@fangorn.cs.monash.edu.au for PGP public key block. ]
[ KeyId: 06808EED FingerPrint: 6024308DE1F84314 811B511DBA6FD596 ]
[======================================================================]

\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.065 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site