After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 301838 - gnome_vfs_format_file_size_for_display should use SI units
gnome_vfs_format_file_size_for_display should use SI units
Status: RESOLVED WONTFIX
Product: gnome-vfs
Classification: Deprecated
Component: Other
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
Depends on:
Blocks:
 
 
Reported: 2005-04-24 22:09 UTC by Benoît Dejean
Modified: 2008-08-21 14:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
SI (1.04 KB, patch)
2005-04-24 22:09 UTC, Benoît Dejean
none Details | Review

Description Benoît Dejean 2005-04-24 22:09:27 UTC
The BIPM brochure says:

"These SI prefixes refer strictly to powers of 10. They should not be used to
indicate powers of 2 (for example, one kilobit represents 1000 bits and not 1024
bits)"

http://www1.bipm.org/utils/en/pdf/si-brochure.pdf §3.1

Please consider using [KMG]iB instead of [kMG]B

http://physics.nist.gov/cuu/Units/binary.html
Comment 1 Benoît Dejean 2005-04-24 22:09:52 UTC
Created attachment 45630 [details] [review]
SI
Comment 2 Allison Karlitskaya (desrt) 2005-04-24 22:26:32 UTC
On computers, k/M/G etc are known to mean kilo/mega/gigabyte.

I really don't like seeing Ki/Mi/Gi and friends because it doesn't help anything
at all.

When you buy memory, you don't buy 512Mibibytes of it.  You buy 512 megabytes. 
No need to create a weird new unit for something that already exists.
Comment 3 Benoît Dejean 2005-04-24 22:34:11 UTC
It's not a weird unit, it's THE SI unit, just like meter.

k/M/G mean power of 10. On computers we use power of 2, so the correct prefix
are KiB, MiB and GiB.
Comment 4 Christophe Fergeau 2005-04-25 07:49:41 UTC
IIrc there's already such a bug, I don't remember if it was kept open or if it
was close as invalid though.
Comment 5 Christophe Fergeau 2005-04-25 08:34:45 UTC
The bug is #127175
Comment 6 Christian Kellner 2005-05-02 10:07:29 UTC
I don't think there is any need to change this at the moment. If you really are
wanna have that changed, bring some discussion up on d-d-l. If we then could
agree on using that *i* units I am going to apply this in no time! Thanks. 
Comment 7 Magnus Holmgren 2005-12-17 00:22:56 UTC
I request that this bug be reopened and possibly moved to general (as it's a
Gnome-wide policy desicion). I've noticed that there are a number of bugs
concerning this issue (bug #71003, bug #110800, ...), but all have been resolved
so I just picked one.

As an academic and Gnome user like you I prefer consistency over ambiguity. The
discussion has already been had. In summary:
* IEC 60027-2 solves a real problem, removing real ambiguity and confusion
(contrary to what Ryan Lortie thinks), in a way that is as simple as possible.
* The fact that it has not yet gained widespread use is not an argument. It will
never gain widespread use if noone at least *tries* to spread it! Someone has to
lead the way! (Arguably, Microsoft implementing it in Windows is a necessary and
sufficient requirement for widespread use.)
* If the users at all notice, they will at least be less confused by a new set
of prefixes than by the current dual meaning of the SI prefixes.
* Nautilus and the rest of Gnome doesn't have to use the binary prefixes; the
other option is to use the ordinary SI prefixes with their ordinary meaning. It
is a reasonable alternative, as binary multiples aren't that useful except when
calculating how many disk blocks a file occupies. In any case, neither k nor K
must be used to mean 1024.
* KDE did it.

Discussion from 2003:
http://mail.gnome.org/archives/gnome-doc-list/2003-December/thread.html

Corresponding KDE bug with discussion: 
http://bugs.kde.org/show_bug.cgi?id=57240

IEC has roughly the same information as NIST, but more:
http://www.iec.ch/zone/si/si_bytes.htm

Please note that the new prefixes don't have anything to do with SI. This is an
IEC standard.
Comment 8 Olivier Ripoll 2006-01-04 12:32:13 UTC
Just a few points to contribute to educate people on the general status:

Binary units are used in:
- CD
- computer memories

Decimal units are used in:
- Hard drives
- DVD
- HD-DVD and blu-ray
- USB memory sticks
- memory cards (such as memory sticks, compact flash, etc.)
- processor frequencies (in Hz) and computing power (in Flops)
- networking (Megabit/s, Gigabit/s)

A mix is used for floppy discs.

As for the operating systems, the linux kernel strictly follows the SI units (see dmesg). On the other hand, Windows uses binary units.
Comment 9 Behdad Esfahbod 2007-05-28 22:12:13 UTC
In most cases, users don't care about which definition is used.  A user is most interested to know if a file is about 10k, or 10M.  1000 bytes vs 1024 bytes is simply not interesting information.
Comment 10 Benoît Dejean 2007-05-29 16:19:36 UTC
I totally disagree. There is a big difference and that's why ncb were the first to switch. Try to put 4.7GiB on a 4.7GB DVD ...

(And as we are getting tools for disk/lvm/raid administration, it's even more important to understand which unit is used.)
Comment 11 Shaun McCance 2007-05-29 19:03:37 UTC
Behdad, a different of 24 bytes on a 10kB file might not seem like much.  But what if I'm checking the size of a hard disk?  1GB = 1,000,000,000B but 1GiB = 1,073,741,824B.  That's a difference of over 70MiB.

The dual meaning is confusing.  Furthermore, I don't think just using decimal units properly is a viable solution at this point.  The meaning of the decimal prefixes has been irrevocably damaged in the computer industry.  People won't know if you're using them correctly or not.
Comment 12 Olivier Ripoll 2007-05-29 19:17:54 UTC
Absolutely correct. At present, when selecting files in Nautilus to write to a DVD (or to move to a USB stick, a CF card, etc.), the user at present can encounter the situation where the computer complains that it cannot fit the "x GB" reported by Nautilus onto its "x GB" medium because Gnome-VFS is wrong on the unit and it reports x GiB = 1.07*x GB as x GB. That is very user-unfriendly.

I would like to see one argument for the use of powers of two. I can think of one, but it is very very weak (speed of division by 1024 by bit shifting compared to division by 1000). I would like to understand the rationale for using powers of two.
Comment 13 Olivier Ripoll 2007-05-29 19:21:06 UTC
My previous comment was responding to comment #10, not to #11.

The dual meaning is confusing, that is why the powers of two should not be used anymore. All hardware manufacturers are using decimal units. The whole world has used decimal units for centuries, and that will not change. Power of two multiples have to either totally disappear (they are useless, anyway) or they have to use their own units, the "i" ones.
Comment 14 shirish agarwal 2007-07-21 03:41:34 UTC
 4.38 GiB of data = 4.7 DVD while this will take some time that is the correct way, if the hard disk industries have used marketing speak to give incorrect messages is it right to be using them all the time. And the confusion is only gonna increase. 2 yrs. down the line when formats like blue layer & HD-DVD become prevalent enough its gonna be a massacre. I for one am in favor of using the 'i' notation as much as possible. Atleast I'm clear as to what and how much I'm seeing stuff. 
         Users are & always can be educated about the correct understandings, usage etc.[rant~troll] If people think that the majority is right, then why use GNU/Linux or any of the free OSes, use windows. Just being majority doesn't mean you are right all the time. [/rant~troll] . Sorry just couldn't help it :)
    
Comment 15 Joel Parker 2007-08-03 16:15:21 UTC
I would also like to see this bug reopened.

It is not worthwhile to avoid the issue by calling the SI scheme incorrect - it is Nautilus itself that is incorrect.

International standard states that 1 GB == 1000^3 bytes, and 1 GiB == 1024^3 bytes. Nautilus should pick either one, but its usage now is inconsistent and wrong. I personally prefer using GB in Nautilus, since it is a viewer for storage, and nearly all storage mechanisms use GB.
Comment 16 shirish agarwal 2007-08-03 18:05:33 UTC
(In reply to comment #15)
> I would also like to see this bug reopened.
> 
> It is not worthwhile to avoid the issue by calling the SI scheme incorrect - it
> is Nautilus itself that is incorrect.
> 
> International standard states that 1 GB == 1000^3 bytes, and 1 GiB == 1024^3
> bytes. Nautilus should pick either one, but its usage now is inconsistent and
> wrong. I personally prefer using GB in Nautilus, since it is a viewer for
> storage, and nearly all storage mechanisms use GB.

The point is are you going to have all your data on the hdd only or are you going to put it into newer higher configuration devices & are you gonna be happy with the inconsistency that GB brings in. 
           See the differences  yourself between GB & GiB & going forward as each yr. the differences are just going to get larger & the confusion would be that much. 

http://en.wikipedia.org/wiki/Binary_prefix#Approximate_ratios_between_binary_and_decimal_prefixes

I guess you have never downloaded a .torrent file or any media for that matter from the Internet & never going to . The other way would be so that each app. hides the confusion from the user & does its calculations. 

[rant] maybe somebody remembers the Mars Mission when something similar happened, some 2 units issue , but oh wait, we are not going to trash a mission perhaps a DVD, HD-DVD  disc, Blue laser & whatever other media consumable comes out next. [/rant]

Further more , I guess there is no more need to read either 

http://en.wikipedia.org/wiki/Binary_prefix#Legal_disputes or

http://en.wikipedia.org/wiki/Binary_prefix#References or

http://en.wikipedia.org/wiki/Binary_prefix#Further_reading or 

http://en.wikipedia.org/wiki/Binary_prefix#External_links

 I might as well be blind & do not have to use computers at all. If I have always to second-guess what my hdd is telling me or media burning app. told me. 

That's all for now . 





Comment 17 Joel Parker 2007-08-03 19:05:57 UTC
Bittorrent sizes are specified in GiB, MiB, kiB, etc., so there is no confusion there, as the units are different. Likewise, USB drives, flash memory, DVDs, HD-DVD, and Blu-Ray are all specified in SI-compatible GB units.

As Nautilus deals with file storage on hard drives (also SI-specified), removable storage, and optical discs, it should also use SI notation.

An error message like "This file will not fit on a 4.7 GB DVD+R disc" (when Nautilus shows the size as 4.5 GB) is unacceptable. Literally any other combination would be clearer to the user, as either the numbers would indicate the problem, or the unit specifiers would indicate a mismatch.
Comment 18 bi2h5da02 2007-08-11 17:51:37 UTC
I would also like to see this reopened.  Please stop using Microsoft units and follow the standards of the IEEE, IEC, NIST, SI, etc..  This is the usage recommended in the Linux Programmer's Manual (man 7 units)
Comment 19 Joel Parker 2007-08-13 17:24:45 UTC
Note that binary prefixes (KiB, MiB, etc.) are used in GNOME already in GParted, System Monitor, and CD/DVD Creator. Internal consistency seems to mandate that we change all those, or change Nautilus to agree.
Comment 20 bi2h5da02 2007-12-04 15:38:23 UTC
(In reply to comment #7)
> Please note that the new prefixes don't have anything to do with SI. This is an
> IEC standard.

Yes, the new prefixes are an IEC standard, but SI is involved too.  SI explicitly says: "These SI prefixes refer strictly to powers of 10. They should not be used to indicate powers of 2 (for example, one kilobit represents 1000 bits and not 1024 bits)."

They also endorse the IEC standard: "Although these prefixes are not part of the SI, they should be used in the field of information technology to avoid the incorrect usage of the SI prefixes."

http://www.bipm.org/en/si/si_brochure/chapter3/prefixes.html

The current usage in GNOME is both confusing and officially prohibited by international standards.