OpenVZ Forum


Home » General » Support » Memory Allocation issues
Memory Allocation issues [message #38150] Mon, 23 November 2009 16:29 Go to next message
Boetsj is currently offline  Boetsj
Messages: 3
Registered: April 2009
Junior Member
These are the BCs of our single container:

uid  resource           held    maxheld    barrier      limit    failcnt
     3033:  kmemsize       36955651   75967463  178968985  196865883          0
            lockedpages           0          0       8738       8738          0
            privvmpages      711902    1428852    1415504    1515504    4490741
            shmpages           3216       8352      50391      50391          0
            dummy                 0          0          0          0          0
            numproc             554       1260       8000       8000          0
            physpages        299162     584303          0 2147483647          0
            vmguarpages           0          0     625000 2147483647          0
            oomguarpages     386470     638714    1415504 2147483647          0
            numtcpsock           86        315       8000       8000          0
            numflock            277        373       1000       1100          0
            numpty                3          8        512        512          0
            numsiginfo            1         12       1024       1024          0
            tcpsndbuf       3907620    5395756   26888328   59656328          0
            tcprcvbuf       1478312    3401544   26888328   59656328          0
            othersockbuf     769392    2002428   13444164   46212164          0
            dgramrcvbuf           0      50184   13444164   13444164          0
            numothersock        671       1594       8000       8000          0
            dcachesize      2108694    2759840   39082998   40255488          0
            numfile           14758      42480      69888      69888          0
            dummy                 0          0          0          0          0
            dummy                 0          0          0          0          0
            dummy                 0          0          0          0          0
            numiptent            10         10        200        200          0


As you can see, alot of failcounts on our privvmpages. Some processes do get killed and to my knowledge, I can't go any higher on the pages.. As I'm pretty new to this kind of stuff, what am I doing wrong?

The HN has 3,2GB of RAM and about 3,5GB of swap..
Re: Memory Allocation issues [message #38151 is a reply to message #38150] Mon, 23 November 2009 17:28 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

privvmpages is allocated (but not always used) memory. Many apps (such as Java) tend to allocate much more than they actually use.

Rules (constraints) of privvmpages allocation for multiple containers are described here: http://wiki.openvz.org/UBC_systemwide_configuration#Allocate d_memory

You can use vzmemcheck to see if you are on the safe side.


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: Memory Allocation issues [message #38153 is a reply to message #38151] Tue, 24 November 2009 08:14 Go to previous messageGo to next message
Boetsj is currently offline  Boetsj
Messages: 3
Registered: April 2009
Junior Member
Well, on our node there's only one container. I want it to give the maximum amount of resources available. I already calculated the privvmpages and oomguarpages to 0.85% of the system resources but it still seem to swap a lot AND the average cpu wait is around 30%. Is this normal?
Re: Memory Allocation issues [message #38156 is a reply to message #38153] Tue, 24 November 2009 10:36 Go to previous message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

privvmpages can be set up to RAM+swap, i.e. if you have 4G RAM and 8G swap you can set privvmpages to about 12G, sometimes even more.

In other words, if you only have one container (and the host system) your privvmpages is way too low.


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Previous Topic: Can't enter VE
Next Topic: fork: Cannot alocate Memory
Goto Forum:
  


Current Time: Sun Nov 10 21:11:48 GMT 2024

Total time taken to generate the page: 0.03605 seconds