These days I’m busy helping one of our clients build a data platform for their renewable energy project in their own data center using Nutanix. I requested from their tech support a RAM and CPU cores upgrade for one of the virtual machines that was already running Debian GNU/Linux.
When they informed me that they increased the number of CPU cores and the amount RAM from the Nutanix side, I proceeded to reboot the server: To my surprise, even though I was able to see the correct number of CPU cores in
htop, it seemed like the amount of RAM stayed the same! Where was the missing RAM? Nutanix management system showed that it allocated the requested amount of RAM to the server, but unlike the newly added CPU cores, we simply couldn’t see the expected amount of RAM from within the virtual machine running Debian GNU/Linux server.
After a brief investigation, we discovered that this has to do with Memory Hotplug mechanism of Linux kernel: using
lsmem showed the ranges of available memory, the ones corresponding to the missing amount marked as offline.
I found out that it was possible to bring the offline memory ranges online (and vice versa) using
chmem utility, e.g.: