OpenVZ Forum


Home » General » Support » *SOLVED* memory limit problem
*SOLVED* memory limit problem [message #4751] Tue, 25 July 2006 14:50 Go to next message
disaster is currently offline  disaster
Messages: 158
Registered: February 2006
Senior Member
Hi!

I've a strange problem. I've set privvmpages to 131072 (limit and barrier) and the system is always running into limit under user_beancounters and in syslog of the system is always written down, out of memory. The funny thing is, that this system runs on a 512MB RAM Machine without swapping anything out.

Any idea?

Stefan

[Updated on: Wed, 26 July 2006 13:41] by Moderator

Report message to a moderator

Re: memory limit problem [message #4752 is a reply to message #4751] Tue, 25 July 2006 14:55 Go to previous messageGo to next message
disaster is currently offline  disaster
Messages: 158
Registered: February 2006
Senior Member
Next funny thing is, I've now that the limit to 2GB eg 524288 pages. And the system is using only 70MB of RAM:

free
total used free shared buffers cached
Mem: 2097152 69332 2027820 0 0 0
-/+ buffers/cache: 69332 2027820
Swap: 0 0 0

I'm using the new 2.6.16 kernel with meminfo support.
Re: memory limit problem [message #4764 is a reply to message #4751] Tue, 25 July 2006 20:17 Go to previous messageGo to next message
disaster is currently offline  disaster
Messages: 158
Registered: February 2006
Senior Member

vzmemcheck on host system says:
vzmemcheck -A -v
Output values in Mbytes
veid LowMem LowMem RAM MemSwap MemSwap Alloc Alloc Alloc
util commit util util commit util commit limit
179 2.44 7.96 70.82 70.82 2055.96 520.04 2055.96 2055.96
------------------------------------------------------------ -------------
Summary: 2.44 7.96 70.82 70.82 2055.96 520.04 2055.96 2055.96
3141.00 3141.00 7854.00 11816.00 11816.00 11816.00 11816.00 11816.00


Re: memory limit problem [message #4765 is a reply to message #4751] Wed, 26 July 2006 05:21 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
What exactly do you see in logs?
Can you also post /proc_userbeanconters output here, please.
Re: memory limit problem [message #4766 is a reply to message #4752] Wed, 26 July 2006 05:28 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Quote:

Next funny thing is, I've now that the limit to 2GB eg 524288 pages. And the system is using only 70MB of RAM:

free
total used free shared buffers cached
Mem: 2097152 69332 2027820 0 0 0
-/+ buffers/cache: 69332 2027820
Swap: 0 0 0

I'm using the new 2.6.16 kernel with meminfo support.



free command inside VE usually shows information about
the memory on the whole node!
You can change this beahviour using
vzctl set VEID --meminfo <parameter>.
But! This command just sets WHAT to output in VE while reading from
/proc/meminfo. It's independent from privvmpages limit/barrier.
Re: memory limit problem [message #4773 is a reply to message #4751] Wed, 26 July 2006 07:32 Go to previous messageGo to next message
disaster is currently offline  disaster
Messages: 158
Registered: February 2006
Senior Member
I'm already using the --meminfo <parameter> the whole node has 8GB of RAM.

At the moment with limit 2GB (for meminfo and pages) for the VPS i see:

with free command:
[email]root@vps-246-179[/email]:~# free
             total       used       free     shared    buffers     cached
Mem:       2097152      77452    2019700          0          0          0
-/+ buffers/cache:      77452    2019700
Swap:            0          0          0


cat /proc/user_beancounters 
Version: 2.5                                                                                                                     
       uid  resource                     held              maxheld              barrier                limit              failcnt
       179: kmemsize                  3008033              3906778              5242880              5592405                    0
            lockedpages                     2                    2                   32                   32                    0
            privvmpages                134538               150058               524288               524288                    0
            shmpages                      652                 4108                 8192                 8192                    0
            dummy                           0                    0                    0                    0                    0
            numproc                        53                   71                  150                  150                    0
            physpages                   19365                29986                    0               524288                    0
            vmguarpages                     0                    0               524288               524288                    0
            oomguarpages                19365                29986               524288               524288                    0
            numtcpsock                     12                   15                  290                  290                    0
            numflock                        5                    8                  100                  110                    0
            numpty                          1                    1                   16                   16                    0
            numsiginfo                      0                   13                  256                  256                    0
            tcpsndbuf                    6888                76016               319488               524288                    0
            tcprcvbuf                    1272                30408              1048576              1048576                    0
            othersockbuf                 6888               134048              1048576              1048576                    0
            dgramrcvbuf                     0                 4344               132096               132096                    0
            numothersock                    8                   19                   80                   80                    0
            dcachesize                 214368               289212              1048576              1097728                    0
            numfile                       368                 2048                 2048                 2048                 1489
            dummy                           0                    0                    0                    0                    0
            dummy                           0                    0                    0                    0                    0
            dummy                           0                    0                    0                    0                    0
            numiptent                       4                    4                   96                   96                    0


so free says 70MB which seems to be correct - cause on a normal hardwarenode the system also uses something about 70MB.

an user_beancounters says:
134538 4kb pages => 525 MB

I hope this helps you.

[Updated on: Wed, 26 July 2006 07:35]

Report message to a moderator

Re: memory limit problem [message #4778 is a reply to message #4773] Wed, 26 July 2006 07:45 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Oh, let's I understand what's bothering you! =)

Well, free gets information from /proc/meminfo.
Free memory in /proc/meminfo is calculated like:
<TOTAL MEMORY> - <OOMGUARPAGES>. Not privvmpages!
We can see, that in your case oomguarpages helds
19365 pages = 77460 Kb. This memory is marked as used in free!

HTH!
Re: memory limit problem [message #4780 is a reply to message #4751] Wed, 26 July 2006 07:51 Go to previous messageGo to next message
disaster is currently offline  disaster
Messages: 158
Registered: February 2006
Senior Member

OK - i understand.

But i'm not really clear of this.

Let's go another way. I've a VPS - and i want to give the VPS a maximum of 512MB RAM. At the moment i thought I've to set
privvmpages, oomguarpages and vmguarpages the the 512MB in pages.

So this is not correct? Or where is my fault?

Thanks!
Re: memory limit problem [message #4783 is a reply to message #4780] Wed, 26 July 2006 08:18 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Yes, something like that.
Re: memory limit problem [message #4784 is a reply to message #4751] Wed, 26 July 2006 08:27 Go to previous messageGo to next message
disaster is currently offline  disaster
Messages: 158
Registered: February 2006
Senior Member

Sorry I'm confused. If my way is correct - why does my image use about 525MB on the VPS so it does not run on VPS with limit 512MB in privvmpages. But it runs without any problems on hardware with 256MB without caching...

Re: *SOLVED* memory limit problem [message #4846 is a reply to message #4751] Fri, 28 July 2006 15:51 Go to previous messageGo to next message
aistis is currently offline  aistis
Messages: 77
Registered: September 2005
Location: Kaunas, Lithuania
Member

well, apparently the software you are trying to run likes to allocate a lot of memory in advance, but not necessarily use it. That would explain why you are able to run it on a machine with 256MB of RAM as you definetelly have some SWAP space there which is also counted into virtual memory reserve. Or at least that's how i see it Rolling Eyes


Aistis Zenkevicius
http://static.openvz.org/userbars/openvz-user.png
Re: *SOLVED* memory limit problem [message #4847 is a reply to message #4751] Fri, 28 July 2006 16:06 Go to previous message
disaster is currently offline  disaster
Messages: 158
Registered: February 2006
Senior Member
Thanks - it is like you say - i discussed this with vass via icq. Everything is solved.
Previous Topic: load balancing and migration between hardware nodes.
Next Topic: Create Full Backup
Goto Forum:
  


Current Time: Wed Nov 06 14:07:07 GMT 2024

Total time taken to generate the page: 0.03352 seconds