Summary of allocated RAM?

grefabu

Well-Known Member
May 23, 2018
249
18
58
51
Hi,

did I see a summary of the RAM, allocated to the VMs per node?
Think in the summary per node I see only the used RAM, but not the RAM which is additional allocated to inactive VMs?

Bye

Gregor
 
Hi,
could you explain what you mean by "RAM allocated to inactive VMs"? If the VM is shut down, there is no RAM allocated for that VM.
Do you mean the sum of the memory values in the VM configurations?
 
Yes, this is what I mean, the summary from all RAM included the not running VMs. So I see if the RAM is overprovisioniesed.
 
If you don't mind get dirty with shell scripts, take this simple example:
RAM provisioned to running VMs (in GB)
# qm list | fgrep running | awk '{s+=$4}END{print s/1024}'
RAM provisioned to all VMs (in GB)
# qm list | awk '{s+=$4}END{print s/1024}'

do not make a confusion about RAM actually allocated to running VMs, which should be smaller than provisioned RAM
also take care that KSM will reduce used RAM when you have similar VMs so that RAM can be "deduplicated"
and notice that I did not take CTXs into consideration, only VMs
 
Last edited:
  • Like
Reactions: amengus
In most cases it's more important to know how much RAM is actually used. With modern technologies, over-provisioning is often possible. Please take a look at this wiki entry. Of course, if you want to be careful and not over-provision, you can use a script as @macleod suggested and see how much RAM you have already provisioned.