Bug 1103893

Summary: RFE: use binary prefixes for units where appropriate
Product: [Community] Virtualization Tools Reporter: Cristian Ciupitu <cristian.ciupitu>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED UPSTREAM QA Contact:
Severity: low Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: acathrow, berrange, crobinso, gscrivan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-16 15:57:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Cristian Ciupitu 2014-06-02 19:44:02 UTC
Description of problem:
virt-manager displays and uses unit prefixes for various parameters like
disk size (MB) or disk speed (KBytes/Sec). It's not clear to the user if
the prefixes are decimal or binary. For example K could mean either 1000
(10^3) or 1024 (2^10). If it's the latter, it should actually be Ki to
avoid any confusion.

Version-Release number of selected component (if applicable):
virt-manager-1.0.1-3.fc20.noarch

How reproducible:
Every time

Steps to Reproduce:
1. Open virtual machine
2. View -> Details
3. Select a virtual disk

Actual results:
Storage size: 256.00 MB
IO Tuning: KBytes/Sec

Expected results:
Storage size: 256.00 MiB (file has 268435456 bytes)
IO Tuning: KiBytes/Sec (although I'm not sure about this one)

Additional info:
Quoting from the dd(1) man page:
> N and BYTES may be followed by the following multiplicative suffixes:
> c =1, w =2, b =512, kB =1000, K =1024, MB =1000*1000, M =1024*1024,
> xM =M GB =1000*1000*1000, G =1024*1024*1024, and so on for T, P, E, Z,
> Y.

An interesting read:
 - http://en.wikipedia.org/wiki/Binary_prefix
 - http://blog.codinghorror.com/gigabyte-decimal-vs-binary/

Comment 1 Cole Robinson 2014-06-16 15:57:33 UTC
Upstream now:

commit 2f4a424521ef16de9a1051ad7b6a1337a7d22bfc
Author: Chen Hanxiao <chenhanxiao.com>
Date:   Mon Jun 16 11:56:02 2014 +0800

    use binary prefixes for units where appropriate
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1103893
    
    Signed-off-by: Chen Hanxiao <chenhanxiao.com>