VMs using most of the allocated RAM when doing nothing. Is this a TrueNAS issues?

When creating a fresh virtual machine (Ubuntu LTS 24.04), the install is showing near max memory usage for the allocated ram. For example, if i allocate 16GB in TrueNAS, the Ubuntu server uses 14GB by default.

Caching is only accounting for 1.5GB, and there are no zombie processes. Its just using all the ram for no clear reason. I have tried different amounts of ram and separately downloaded ISOs and the result remains the same.

I did some research and people have had similar issues in the past with TrueNAS, so im trying to figure out if this is some setting or user error? The same ISOs work fine outside of TrueNAS.

Did you install the qemu/kvm guest tools?

I did not install the qemu/kvm guest tools. Would that even effect such an issue?

Edit: They are installed now but it hasnt changed anything.

Unused ram is wasted ram. Mostly.

Have you looked to see what process within the vm is using a bunch of memory?

The ram shouldnt be used though, the server is idle.

top
&
ps aux --sort=-%mem | head

show nothing is using the ram. thats why im confused


Edit:
When removing Min memory allocation, Ubuntu stops using 90% of the ram for non-existent processes, but then the VM has 16Gb+ reserved ram is doesnt specifically need. Its useable i guess. Just very strange.

Interesting. Possibly file cache? I’m not aware of any settings in Ubuntu that would cause more aggressive caching.

well considering this cant be replicated with the same iso on a separate os , id say this is a TrueNAS Scale issue sadly. But maybe it’ll be fixed one day.

1 Like

The minimum memory setting enables memory ballooning.

I’m not even sure it’s fully implemented. Ie for it to and sense the host needs to update the guest memory allocations periodically. And this would cause a conflict between the hosts desire to maximize ARC

I would suggest not using it. It only ever caused problems for me when I tested it.