Why is there a difference between the RAM set for VPS in SolusVM and actual RAM inside VPS?
After setting RAM to a SolusVM VPS, then checking it from inside the VPS directly with the commands:
free
cat /proc/meminfo
It does not correspond to the allocated value - there is a slight difference in values.
This behavior is expected because the modern kernels reserve an amount of RAM for kernel exclusive use. The output of the above commands will only indicate how much userspace RAM is available for the Operating System minus the kernel reserved memory. The missing amount should be equal to the amount of reserved by the kernel memory during boot, see it in the dmesg logs on the Host Node:
dmesg | grep Memory
The following command inside the VPS shows the real installed physical memory size:
lshw -class memory -short
Find below an example for the VPS with 16 GB allocated to RAM:
free -g
total used free shared buff/cache available
Mem: 15 3 2 1 9 10
Swap: 0 0 0
lshw -class memory -short
H/W path Device Class Description
===============================================================
/0/0 memory 96KiB BIOS
/0/1000 memory 16GiB System Memory
/0/1000/0 memory 16GiB DIMM RAM
Please sign in to leave a comment.
Comments
0 comments