OpenVZ Forum


Home » General » Support » Question about memory usage in openVZ container
Question about memory usage in openVZ container [message #35528] Thu, 02 April 2009 07:52 Go to next message
Slevin is currently offline  Slevin
Messages: 1
Registered: April 2009
Junior Member
Hi all,

I've read a lot around here and tried to find something with the search function but I didn't find anything matching this problem... Perhaps someone can help me.

Something about the situation:

<edit>
Sorry, I forgot the versions:
ovzkernel-2.6.18-92.1.18.el5.028stab060.2 (64Bit)
vzctl-3.0.23-1
vzquota-3.0.12-1
vzctl-lib-3.0.23-1
</edit>

We have some openVZ virtual machines running here.

On these machines we are running our own piece of software.

The problem is now that our software is always reserving pretty much virtual memory (that's the default behaviour and that's volitional). Now openVZ seems to declare virtual memory as in-use. Because of this behaviour a small tomcat comsumes around 1,2G of memory.

On the HN the memory is displayed correctly so I assume that only inside a container the declaration of memory is wrong?

Here an example with a small zimbra server (without any accounts running yet):

Inside the container:
[root@zimbra ~]# free -m
             total       used       free     shared    buffers     cached
Mem:         16020      12295       3725          0          0          0
-/+ buffers/cache:      12295       3725


On the hardware node:
[root@openVZ ~]# free -m
             total       used       free     shared    buffers     cached
Mem:         16020       7836       8184          0        327       3644
-/+ buffers/cache:       3864      12156
Swap:         4000         33       3966


Does anyone have a hint how to handle this? I cannot pass 32G of memory to the container just because it thinks that it's running out of it...

Thanks a lot in advance
Sven

[Updated on: Thu, 02 April 2009 08:01]

Report message to a moderator

Re: Question about memory usage in openVZ container [message #35533 is a reply to message #35528] Thu, 02 April 2009 09:02 Go to previous message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hello,

"free" command output is based on /proc/meminfo output.
OpenVZ implements calculations inside VE with help of privvmapages values. So, by default the total memory output is the barrier value of privvmpages of the particular VE (expressed in bytes).
You can adjust this output a little with "--meminfo" option of vzctl utility (man vzctl).
You can't consider the obtained number as a reliable source data to analyse situation. The correct way is /proc/user_beancounters output. Thus, such behavior of OpenVZ system is convenient one from user space point of view.
Previous Topic: unable to detect lvm volume group
Next Topic: About Clone VE
Goto Forum:
  


Current Time: Sun Jul 28 16:31:22 GMT 2024

Total time taken to generate the page: 0.02801 seconds