As I've come to find out, you can't monitor swap memory usage using the usual "free" command in OpenVZ as it always reports zero. This is because swap is handled by the HN.
However, I found this great utility, vzfree, that is supposed to solve the issue. You can read about it here:
http://www.webhostingtalk.com/showthread.php?t=996681
Unfortunately it doesn't seem to work under proxmox. At least not in a CentOS 4 container where I'm trying it. Here's what I get on a freshly created CentOS 4 container that I allocated 1995M of RAM and 3990M of SWAP to:
I don't know what "Kernel" ram refers to, but I'm pretty sure that "Total" vzfree is showing here is not correct.
It doesn't seem to be the fault of the vzfree utility... the raw user_beancounters data looks wrong:
Does memory management work differently under proxmox than a usual OpenVZ setup?
The physical machine has 2GB of RAM... so I basically want to monitor when the HN is swapping, but from inside the container.
Sorry if this is a dumb question... I'm new to both proxmox and OpenVZ.
Thanks,
Curtis
However, I found this great utility, vzfree, that is supposed to solve the issue. You can read about it here:
http://www.webhostingtalk.com/showthread.php?t=996681
Unfortunately it doesn't seem to work under proxmox. At least not in a CentOS 4 container where I'm trying it. Here's what I get on a freshly created CentOS 4 container that I allocated 1995M of RAM and 3990M of SWAP to:
Code:
# ./vzfree
Total Used Free
Kernel: 8796093022208.00M 1.91M 8796093022206.09M
Allocate: 5985.00M 20.21M 5964.79M (5985M Guaranteed)
Commit: 5985.00M 11.59M 5973.41M (47.9% of Allocated)
Swap: 0.00M (0.0% of Committed)
It doesn't seem to be the fault of the vzfree utility... the raw user_beancounters data looks wrong:
Code:
# cat /proc/user_beancounters | grep -E '(uid|physpages|oomguarpages)'
uid resource held maxheld barrier limit failcnt
physpages 2524 20735 0 9223372036854775807 0
oomguarpages 2525 20735 1532160 9223372036854775807 0
The physical machine has 2GB of RAM... so I basically want to monitor when the HN is swapping, but from inside the container.
Sorry if this is a dumb question... I'm new to both proxmox and OpenVZ.
Thanks,
Curtis
Last edited: