Confused about GB, GiB

pixelwave

New Member
Jan 26, 2023
18
2
3
Hi,

I am a bit confused about the unit display in Proxmox (7.4).

I have a system with 64GB RAM. In Proxmox it is shown as 62,69 GiB:

Bildschirmfoto 2023-04-12 um 09.33.48.png

62,69 GiB woud add up to 67,31 GB which is actually more then I have so that can not be right?

I dove a bit deeper into that rabbit hole:
https://history-computer.com/gb-vs-gib-the-difference-in-bytes/

So do I understand correctly my 64 "GB" RAM are actually 64 GiB of RAM? So Proxmox displays correctly with 62.69 GiB because I would assume the rest 1,31 GiB is reserved for the hypervisor itself?

So now when I want to give a VM 16 "GB" RAM I set it up as 14,91 GiB or 16 GiB?

Bildschirmfoto 2023-04-12 um 09.43.21.png
 
Last edited:
I have a system with 64GB RAM. In Proxmox it is shown as 62,69 GiB:
You probably have 64 GiB as memory/RAM is normally measured in base 2, i.e., GiB – even if a lot of vendors do not use the correct unit prefix..

So do I understand correctly my 64 "GB" RAM are actually 64 GiB of RAM? So Proxmox displays correctly with 62.69 GiB because I would assume the rest 1,31 GiB is reserved for the hypervisor itself?
The hyper-visor itself uses some ram, but that is normally not hidden from the system, i.e., shows up as being there.
But yes, not all memory is available for most systems. Some is possibly reserved for some iGPU, other PCIe device, the firmware or possibly even broken.
1.3 GiB is a bit much for just EFI/Firmware, so I'd think rather at some iGPU memory – see the start of the kernel message log (e.g., dmesg or the slightly nicer journalctl -k) for the memory ranges the kernel detects.
 
Oh, and in general the following bases are used:
  • memory -> base two bytes, i.e., KiB (210), MiB (220) GiB (230), and so on.
  • storage -> base 10 bytes, i.e., KB (103), MB (106), GB (109), and so on.
  • network transfer/bandwidth -> base 10 bits/second Kb/s or Kbps (103 bits/second, with 8 bit = 1 byte that then equals to 1.25 KB/s, which is the same as 1.25 * 103 Bytes/second), ...
In practice this is not always enforced, or shown that way 100% of the time, rather one finds a wild mix, often even wrongly mapped – but after a while one gets used to that and one's brain translates it correctly to the right one most of the time, at least in my experience.
 
  • Like
Reactions: marcadam
64 gb is actually 65,536 mb
because its not *1000, its *1024
No, GB is always base 10, for base 2 (e.g., 210 == 1024) the KiB (Kibibyte) et al. units are the right ones.
https://en.wikipedia.org/wiki/Binary_prefix

But yes, for memory one can assume that GB also means GiB most of the time, due to the main memory consortium (JEDEC) having some other (confusing!) view in contrast to the IEC, and also odd history reasons.
 
Last edited:
  • Like
Reactions: LnxBil
The hyper-visor itself uses some ram, but that is normally not hidden from the system, i.e., shows up as being there.
But yes, not all memory is available for most systems. Some is possibly reserved for some iGPU, other PCIe device, the firmware or possibly even broken.
1.3 GiB is a bit much for just EFI/Firmware, so I'd think rather at some iGPU memory – see the start of the kernel message log (e.g., dmesg or the slightly nicer journalctl -k) for the memory ranges the kernel detects.
I can also think of e.g. crashkernel, which normally also reserves some space.

You can look at those numbers in dmesg:

Code:
[    0.283247] Memory: 65584720K/66949452K available (16393K kernel code, 4343K rwdata, 10240K rodata, 3204K init, 18916K bss, 1364472K reserved, 0K cma-reserved)