Memory usage and VMs

Patrick_3000

Contributor
Joined
Apr 28, 2021
Messages
167
I'm trying to determine how much memory I can safely allocate to VMs. I have 128 GB ECC memory installed in the physical computer. (CPU is Ryzen Pro 4650G.) I have two pools: an HDD pool that's a 3x10TB mirror and an SSD pool that's a 2x4TB mirror.

I have four VMs that run continuously that are allocated a total of 48 GB memory (20 GB for VM1, 10 GB for VM2, 12 GB for VM3, and 6 GB for VM4.)

I've always found the way SCALE reports memory usage to be difficult to understand, but I've included a screen shot below. I'm being conservative with my memory allocation, I think, but how much more memory can I safely allocate to VMs?
SCALE memory.png
 
Last edited:

xyno

Dabbler
Joined
Aug 8, 2022
Messages
11
Technically the ZFS cache should scale down if you need more then the ' free ' memory available.
In my experience it doesnt always go as smooth as it should be, however when VM's are on auto start and memory is assigned to the VM's after a complete reboot this shouldnt be an worry.
 

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
So, in your memory usage chart you posted, is that with the VMs running? I know you said they are always running but you are using nowhere near the amount you posted. So, were they running at the time the screen capture was taken? The services number includes the Vms so clearly you are not using 48 GB memory if they are running.

Can you instead post the graph from the reporting section for memory over the past week? That will give you/us a better idea.

Also, can you take the output of this command:

virsh -c "qemu+unix:///system?socket=/run/truenas_libvirt/libvirt-sock" list --all

Using each VM that is of state running, post the output of (where ID should be replaced by the Id column from the above command), run it for each of the 4 VMs:

virsh -c "qemu+unix:///system?socket=/run/truenas_libvirt/libvirt-sock" dominfo ID
 
Top