KVM guests can consume all available memory on the host?

RodinM

Active Member
Aug 1, 2011
70
0
26
The situation is: I have about 15 kvm guests on a proxmox ve host. It has 60GB RAM
15 kvm guests altogether are assigned 75 GB RAM. Most of the time they altogether consume about 50GB RAM. But there were several times when the RAM consumption of the KVM guests grew till the host's all available RAM. After that most of the KVM guests become unresponsive. But the worst thing is that the web console of the host becomes unresponsive due to memory lack. Even if I kill several machines' kvm processes and free up some memory the host web-console remains unresponsive. The host is a part of a cluster but I can't even migrate or stop machines on that node correctly using the SSH session. And the problem remains till I reboot the node.
So I'd like to know if there is a method to restrict kvm guests memory consumption on the proxmox host. Swapping of the host's memory to disk is undesirable. I don't have much place for swapping.
 
If you only have 60G you should probably not assign 75G to vms, however someone proably has better advice than i do, and i even do this myself sometimes. Personally i always wondered what would happen to proxmox if i used more RAM or CPUs than i actually have as hardware. There should at least be a warning stating that you have assinged all the physical RAMs or CPUs system may become unstable or something like that.

About swapping proxmox seem to swap on my machines alot even if not using all the RAM and i could never figure out how to properly monitor or fix this.
 
The situation is: I have about 15 kvm guests on a proxmox ve host. It has 60GB RAM
15 kvm guests altogether are assigned 75 GB RAM. Most of the time they altogether consume about 50GB RAM. But there were several times when the RAM consumption of the KVM guests grew till the host's all available RAM. After that most of the KVM guests become unresponsive. But the worst thing is that the web console of the host becomes unresponsive due to memory lack. Even if I kill several machines' kvm processes and free up some memory the host web-console remains unresponsive. The host is a part of a cluster but I can't even migrate or stop machines on that node correctly using the SSH session. And the problem remains till I reboot the node.
So I'd like to know if there is a method to restrict kvm guests memory consumption on the proxmox host. Swapping of the host's memory to disk is undesirable. I don't have much place for swapping.
Hi,
do you have the latest pve-version? in the old version (2.1) was an memory leak in pvestatd - perhaps this "eat" your ram?
Or perhaps you have not enough IO if pve starts to swap? What shows "pveperf /"?

Udo
 
I my opinion, you would never allocate more ram than you have on the physical machine, especially with KVM. And do not forget to keep some memory for the physical machine.

When you use more ram in the KVM then there are in the physical, then the physical swap enter in function and that will modify the block allocation of the KVM memory. The KVM believes to use a block in a RAM while it is in a swap volume.

If you have Java running on KVM, you will have a real mess.

Michel
 
Thanks for all advices!
I will first try to update the proxmox. I now have:
pverversion -v:
pve-manager: 2.1-1 (pve-manager/2.1/f9b0f63a)
running kernel: 2.6.32-12-pve
proxmox-ve-2.6.32: 2.1-68
pve-kernel-2.6.32-11-pve: 2.6.32-66
pve-kernel-2.6.32-12-pve: 2.6.32-68
lvm2: 2.02.95-1pve2
clvm: 2.02.95-1pve2
corosync-pve: 1.4.3-1
openais-pve: 1.1.4-2
libqb: 0.10.1-2
redhat-cluster-pve: 3.1.8-3
resource-agents-pve: 3.9.2-3
fence-agents-pve: 3.1.7-2
pve-cluster: 1.0-26
qemu-server: 2.0-39
pve-firmware: 1.0-16
libpve-common-perl: 1.0-27
libpve-access-control: 1.0-21
libpve-storage-perl: 2.0-18
vncterm: 1.0-2
vzctl: 3.0.30-2pve5
vzprocps: 2.0.11-2
vzquota: 3.0.12-3
pve-qemu-kvm: 1.0-9
ksm-control-daemon: 1.1-1
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!