Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

base1: Use IEC names for binary unit prefixes #3944

Closed

Conversation

Projects
None yet
5 participants
@mvollmer
Copy link
Member

commented Mar 8, 2016

No description provided.

@stefwalter

This comment has been minimized.

Copy link
Contributor

commented Mar 8, 2016

What does this do?

@mvollmer

This comment has been minimized.

Copy link
Member Author

commented Mar 8, 2016

Right now we use "MB" for both 10^6 bytes and 2^20 bytes.

After this change, the storage UI will start talking in "MiB", "GiB", etc. If we don't like this, we can go further with #3945, which changes the storage UI to talk in "MB", "GB", etc, by making it use decimal prefixes.

@mvollmer

This comment has been minimized.

Copy link
Member Author

commented Mar 8, 2016

I quite strongly believe that the status quo is not acceptable. We should merge either this or #3945.

@stefwalter

This comment has been minimized.

Copy link
Contributor

commented Mar 8, 2016

@dperpeet

This comment has been minimized.

Copy link
Member

commented Mar 8, 2016

I agree with @mvollmer on this. Either we use SI units or we don't, but using the same label for different numbers is just plain confusing.

@mvollmer

This comment has been minimized.

Copy link
Member Author

commented Mar 8, 2016

@vpodzime @julienlim @cmurf, there are three choices:

  • Use binary prefixes in the storage UI, and say things like "2 GiB" for 2199023255552 bytes.
  • Use decimal prefixes in the storage UI, and say things like "2.2 GB" for 2199023255552 bytes.
  • Ignore SI and IEC and say things like "2 GB" for 2199023255552 bytes.

Which one shall it be?

@mvollmer

This comment has been minimized.

Copy link
Member Author

commented Mar 8, 2016

My personal opinions about the choices:

Use binary prefixes in the UI, and say things like "2 GiB" for 2199023255552 bytes.

This is viable, and the more we show the silly "GiB" units the more people will get used to them.

Use decimal prefixes in the storage UI, and say things like "2.2 GB" for 2199023255552 bytes.

This is also viable and I think most common in the storage domain. I prefer this.

Ignore SI and IEC and say things like "2 GB" for 2199023255552 bytes.

Not viable and makes us look stupid.

@mvollmer mvollmer added the needswork label Mar 8, 2016

@mvollmer

This comment has been minimized.

Copy link
Member Author

commented Mar 8, 2016

I didn't yet catch all necessary places.

@mvollmer

This comment has been minimized.

Copy link
Member Author

commented Mar 8, 2016

I didn't yet catch all necessary places.

Done.

@mvollmer mvollmer removed the needswork label Mar 8, 2016

@dperpeet

This comment has been minimized.

Copy link
Member

commented Mar 8, 2016

not yet all:
http://files.cockpit-project.org/logs/pull-3944-bf171a62-verify-fedora-23/log.html#12

 File "./verify/check-storage-used", line 76, in testUsed
     b.wait_in_text("#content", "50 MB Free Space")

Either change it to 50 MiB Free Space (screenshot) or change the amount to 50 MB and change the code to use base 10.

@dperpeet dperpeet added the needswork label Mar 8, 2016

@mvollmer mvollmer force-pushed the mvollmer:storage-iec-unit-names branch from bf171a6 to e9f6b65 Mar 8, 2016

@mvollmer

This comment has been minimized.

Copy link
Member Author

commented Mar 8, 2016

Either change it to 50 MiB Free Space

Done.

@mvollmer mvollmer removed the needswork label Mar 8, 2016

@dperpeet

This comment has been minimized.

Copy link
Member

commented Mar 8, 2016

it seems there is one more...

File "/tmp/avocado_tests/selenium-login.py", line 123, in test60ChangeTabStorage
    self.wait_text("1000 MB", element="td")

@dperpeet dperpeet added the needswork label Mar 8, 2016

@cmurf

This comment has been minimized.

Copy link

commented Mar 9, 2016

My suggestion for cockpit going forward:

  • Networking, use SI.
  • Physical drives, report both SI/IEC or flip coin. Products still prominently use SI units but increasingly also include IEC units.
  • Everything else (PV, VG, LV, pools, arrays, filesystem volumes), use IEC.

GUI behaviors:

  • Windows 10 uses IEC values with SI unit labels.
  • OS X 10.11 uses SI values and labels.
  • Gnome uses neither, it starts with 1024-byte blocks (1KiB) but then to get larger units it uses base10, so it's a mix of both IEC and SI. Ick.

Fedora 23 behaviors^:

  • parted > SI
  • fdisk > IEC
  • gdisk > IEC
  • lvm tools > IEC
  • mdadm > IEC
  • btrfs > IEC
  • df -h > IEC
  • du -sh > IEC

^ Where IEC means it reports IEC values. But often the label is messed up; uses either SI unit labels, or a single letter M, G, T, or even lowercase m, g, t.

Summary: Messy. But trend appears to be moving toward IEC, so go ahead and use IEC. The SI unit label is ambiguous because it's misused; whereas IEC unit is generally trustworthy. Since consumption of storage is only in IEC units (minimum practical consumption size is 4096 bytes which is an IEC unit), it doesn't make much sense referring to whole devices or free space with SI units.

@vpodzime

This comment has been minimized.

Copy link

commented Mar 9, 2016

We switched to binary units in the Anaconda installer's UI with the UI rewrite and I still consider that a good decision. Thus I can only suggest the same for Cockpit.

@mvollmer mvollmer force-pushed the mvollmer:storage-iec-unit-names branch from e9f6b65 to dd0282d Mar 10, 2016

@mvollmer

This comment has been minimized.

Copy link
Member Author

commented Mar 10, 2016

it seems there is one more...

Fixed.

@mvollmer

This comment has been minimized.

Copy link
Member Author

commented Mar 10, 2016

My suggestion for cockpit going forward:

Networking, use SI.
Physical drives, report both SI/IEC or flip coin. Products still prominently use SI units but increasingly also include IEC units.
Everything else (PV, VG, LV, pools, arrays, filesystem volumes), use IEC.

Thanks a lot! We will go with IEC for storage (including memory) and SI for networking.

I will go over our code and make sure it is consistent.

@mvollmer

This comment has been minimized.

Copy link
Member Author

commented Mar 10, 2016

We switched to binary units in the Anaconda installer's UI with the UI rewrite and I still consider that a good decision. Thus I can only suggest the same for Cockpit.

Thanks for the input!

@mvollmer mvollmer force-pushed the mvollmer:storage-iec-unit-names branch from dd0282d to 1aa0252 Mar 10, 2016

@mvollmer mvollmer removed the needswork label Mar 10, 2016

@dperpeet dperpeet closed this in e0a0617 Mar 10, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.