Memory unit size in GUI

mir

Famous Member
Apr 14, 2012
3,568
127
133
Copenhagen, Denmark
Hi all,

According to the GUI memory sizes should be in GiB (GibiBytes) but seems to actually be in GB (GigaBytes)?
It is correct for disks (GiB as in GibiBytes)
pve manager: 5.4-13

I have and example:
/etc/pve/qemu-server/128.conf
agent: 1
balloon: 2048
bootdisk: scsi0
cores: 2
cpu: Opteron_G5
ide2: none,media=cdrom
memory: 4096
name: mastodon
net0: virtio=3A:FC:D6:09:A1:37,bridge=vmbr10
numa: 0
onboot: 1
ostype: l26
scsi0: omnios_ib:vm-128-disk-0,size=50G
scsihw: virtio-scsi-pci
smbios1: uuid=ae6b6c26-82d8-42b5-92fb-d4702023c5eb
sockets: 1
vga: qxl
vmgenid: 841002d9-710f-4acf-98be-2529b5fdfdba

From inside the vm:
free -h
total used free shared buff/cache available
Mem: 3.8G 1.0G 275M 140M 2.6G 2.4G
Swap: 0B 0B 0B

free --giga
total used free shared buff/cache available
Mem: 4 1 0 0 2 2
Swap: 0 0 0
 
Last edited:
during boot of the vm, the kernel reserves some memory regions that are not accessible for the other processes
see the dmesg output of the vm
e.g. with 'dmesg | grep -i memory'

also doing 'free --mega' shows 4126 megabyte
 
Are you referring to this line?
Memory: 3960588K/4193764K available (14339K kernel code, 2370K rwdata, 4684K rodata, 2660K init, 5076K bss, 233176K reserved, 0K cma-reserved)

Looking at that line I cannot make that be 4 GiB?

Using free with default (free) shows total memory as 4030596 KiB
4030596 KiB is 3.84387588500977 GiB so this means the kernel should have reserved approx. 21MB unaddressable memory?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!