VZ mem + swap not shown in free -m

kablubr

New Member
Sep 21, 2013
15
0
1
Hi guys,

I am evaluating proxmox to use in some servers, and I have a question about the proxmox configuration for openvz.

When creating a new container I set 1gb to memory and 1gb to swap.

But in the guest it does not turn it into all 2gb available memory, as you can see:

[root@centos-ovz ~]# free -m
total used free shared buffers cached
Mem: 1024 27 996 0 0 12
-/+ buffers/cache: 15 1009
Swap: 1024 0 1024


Even if I set the script below:

veid=01
vzctl set ${veid} --vmguarpages 1024M --save
vzctl set ${veid} --oomguarpages 1024M --save
vzctl set ${veid} --privvmpages 1024M:2048M --save


It keeps showing only 1GB on the free -m in the guest OS.


In KVM there is no such problem as we can set guaranted and burstable.

But I want to set a burstable memory for Openvz containers...
to make the guest have 1GB memory guaranteed but 2GB burstable.

Any ideas?

Thank you!
 
The SWAP in OpenVZ as far as i know is Swap Space not the memory itself. The Container just create a swap space with whatever size you put it in. Swaps are not calculated in Free Memory in a system, i dont think.
 
The SWAP in OpenVZ as far as i know is Swap Space not the memory itself. The Container just create a swap space with whatever size you put it in. Swaps are not calculated in Free Memory in a system, i dont think.

Yes this was my first tought... but I saw some posts in this forum that say the memories are calculated: http://forum.proxmox.com/threads/77...penVZ-VMs-via-Web-GUI?highlight=openvz+memory

Anyway, anyone knows how to do some kind of memory "bursting" to appear with mem to the SO? I know that this is possible b/c I saw it in a VPS provider.
 
I don't understand your question - you setup 1GB RAM + 1GB SWAP, and that is exactly what you get inside the container.
 
I don't understand your question - you setup 1GB RAM + 1GB SWAP, and that is exactly what you get inside the container.

I want burstable memory to be available.
The vm will have 1gb guarantee but can use up to 2gb burstable.

This way lets imagine i have 10gb mem in my server but i can have 10vms with 2gb burstable and 1 guarantee each.

I have a host that does this. When i type free -m i get 6gb. But there is only 3gb guaranteed for my vps.
It means i can use 6gb if the server memory load is low or 3gb if it is full.