Muvirt memory usage

I popped in 32GB of ram, and installed muvirt on the box.
Memory usage is shown as 85%. But there no processes actually consuming that much ram.

Where has that memory gone then?

The memory has been preallocated to hugetlb (or hugepages). As VM’s are started they’ll take memory from hugepages first.

root@muvirt:/# cat /proc/meminfo | grep Huge
AnonHugePages:     10240 kB
ShmemHugePages:        0 kB
FileHugePages:         0 kB
HugePages_Total:   13341
HugePages_Free:    13291
HugePages_Rsvd:      974
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:        27322368 kB

If you want to reduce the preallocation you can adjust it in the configuration (reboot required):

uci get virt.system.hugetlb
26682
uci set virt.system.hugetlb=10240

or under ‘Virtualization->Virtual Machines Global Options’ in LuCI:

Thanks. Learned something today…