Greetings! A server which is equipped with 512GB RAM(16 slots * 32GB) which OS is Ubuntu 22.04. During boot up, server reserving 16259356K(15GB) RAM showed in dmesg that resulted only 498GB is available for the OS. I was unable to identify where 15GB is allocated. Could you please help me.
1.) Dmidecode for RAM.
root@apac2-prd241:~# dmidecode -t memory |grep Size
Size: 32 GB
Size: 32 GB
Size: 32 GB
Size: 32 GB
Size: 32 GB
Size: 32 GB
Size: 32 GB
Size: 32 GB
Size: 32 GB
Size: 32 GB
Size: 32 GB
Size: 32 GB
Size: 32 GB
Size: 32 GB
Size: 32 GB
Size: 32 GB
2.) dmesg log.
root@apac2-prd241:~# grep Memory /var/log/dmesg
[ 3.919928] kernel: Memory: 520513460K/536773076K available (16393K kernel code, 4395K rwdata, 10908K rodata, 3360K init, 18708K bss, 16259356K reserved, 0K cma-reserved)
[ 8.227673] kernel: x86/mm: Memory block size: 2048MB
3.) System RAM.
root@apac2-prd241:~# free -g
total used free shared buff/cache available
Mem: 497 39 439 17 18 438
Swap: 0 0 0
Each 4K memory page commands a 64B
struct page
overhead, meaning 8 GB of unavailable memory for 512 GB of RAM. Adding some reserved memory due tocrashkernel
, memory mapped devices (ie: graphics adapter) and similar ends with ~15 GB unavailable on your server.EDIT: you have 6 GB allocated for
crashkernel
(which does not show as visible OS allocated memory viafree
), so 8+6=14 GB reserved just by the OS for its own.dmesg | grep -i reserved
shows hardware reserved ranges, which you can compare with the output ofcat /proc/iomap
(note: the latter shows all ranges, even if they do not really use any physical memory).