OpenVZ Forum


Home » General » Support » Strange Memory Problem
Strange Memory Problem [message #28272] Thu, 13 March 2008 00:37 Go to next message
jckdnk111 is currently offline  jckdnk111
Messages: 11
Registered: January 2008
Junior Member
Hi,

I have a VE that is constantly reporting it can't allocate memory but I feel I've got plenty of memory allocated to it, way more then it should ever use. Can someone help?

My user_beancounters and VE conf are attached.
  • Attachment: help.txt
    (Size: 2.53KB, Downloaded 324 times)
Re: Strange Memory Problem [message #28276 is a reply to message #28272] Thu, 13 March 2008 02:30 Go to previous messageGo to next message
shuaib85 is currently offline  shuaib85
Messages: 59
Registered: September 2007
Member
Dear

The fail counter of privvmpages is very high as you can see it is 104092

i guess add more to it.

vzctl set VEID --privvmpages low_limit:highh_limit --save

privvmpages 129309 190855 466699 513368 104092

cheers


WebVZ: OpenVZ Web Management Tool
http://webvz.sourceforge.net
Re: Strange Memory Problem [message #28306 is a reply to message #28276] Thu, 13 March 2008 14:20 Go to previous messageGo to next message
jckdnk111 is currently offline  jckdnk111
Messages: 11
Registered: January 2008
Junior Member
Right, but as you can see I've already allocated more than the vmguarpages to privvmpages ... how could I possibly be getting failcnt's for privvmpages and nothing else?

Very strange.
Re: Strange Memory Problem [message #28332 is a reply to message #28306] Fri, 14 March 2008 08:18 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
privvmpages is the memory allocation limit. please see the wiki for a more thorough explanation and post any specific questions back on the forum.

increase your privvmpages as it is being exhausted.



-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
Re: Strange Memory Problem [message #28372 is a reply to message #28332] Sat, 15 March 2008 01:11 Go to previous messageGo to next message
jckdnk111 is currently offline  jckdnk111
Messages: 11
Registered: January 2008
Junior Member
I've read the wiki.

If you look at my conf for this VE you'll see:

VMGUARPAGES="400228:2147483647"
-- which is a barrier of 1639333888 bytes or ~1.5GB

PRIVVMPAGES="466699:513368"
-- which is a barrier of 1911599104 bytes or ~1.7GB

As you can see the PRIVVMPAGES setting is more than maxed out.
So my question is how is it that I'm getting failcnt's for PRIVVMPAGES only?

Also, let's say I increase PRIVVMPAGES and not VMGUARPAGES, wouldn't it stand to reason that I'd still run out of memory?

Lastly, I can tell you that this VE never even comes close to using 1GB, let alone 1.5GB or 1.7GB yet it is still throwing memory allocation errors.

Please help.
Re: Strange Memory Problem [message #28373 is a reply to message #28372] Sat, 15 March 2008 08:30 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
hi, this is a misunderstanding on your end. please read the following to understand that vmguarpages is not a limit assuming your hardware node is not facing a oom condition.
Quote:


If the current amount of allocated memory space does not exceed the guaranteed amount (the barrier of vmguarpages), memory allocations of container's applications always succeed. If the current amount of allocated memory space exceeds the guarantee but below the barrier of privvmpages, allocations may or may not succeed, depending on the total amount of available memory in the system.


vmguarpages is a method to shape memory allocation under low free memory conditions.


-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
Re: Strange Memory Problem [message #28381 is a reply to message #28372] Sat, 15 March 2008 14:41 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
malloc(100000000000)

how much memory did I allocate? How much memory have I used so far?

this is the difference between privvmpages and vmguarpages. its all in the wiki.



-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
Re: Strange Memory Problem [message #28383 is a reply to message #28373] Sat, 15 March 2008 20:08 Go to previous messageGo to next message
jckdnk111 is currently offline  jckdnk111
Messages: 11
Registered: January 2008
Junior Member
I actually understood that just fine (though you are starting to may me think I'm quite stupid).

I'm telling you that the entire server has never used more than 1GB of RAM at any given time (monitored by nagios with historical usage stats).

I've had no problems in any other memory allocation category. This server does nothing more than host an svn repository. I know I've never used this much memory. This is the only VE on the server. The hardware node does nothing at all.

If I increase the PRIVVMPAGES above the physical amount of RAM on the box will it magically fix my problem? I only say this because I know I'm currently not maxing out my physical RAM (verified by a top on the hardware node while the VE is failing memory allocations).

I think this is a very strange problem and you keep telling me I just need to increase PRIVVMPAGES.
Re: Strange Memory Problem [message #28385 is a reply to message #28383] Sun, 16 March 2008 01:39 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
total privvmpages among VEs need to be much more then 1GB in your server. this because to actually use 1GB by real application, about 3-4GB will be allocated. all applications allocate more then they use.

you can observe at the imbalance between privvmpages and physpages in a VE running any popular software like named, apache, etc to demonstrate this fact.


-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
Re: Strange Memory Problem [message #28388 is a reply to message #28385] Sun, 16 March 2008 15:17 Go to previous messageGo to next message
jckdnk111 is currently offline  jckdnk111
Messages: 11
Registered: January 2008
Junior Member
Ahh, I see ... this makes sense.
I'll give that a try.

Thanks for your patience in explaining this to me.
Re: Strange Memory Problem [message #28389 is a reply to message #28388] Sun, 16 March 2008 16:57 Go to previous message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
you are welcome my friend. good luck with openvz, its great.



-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
Previous Topic: Apache taking a LONG time to start on reboot
Next Topic: Vztop shows a high iowait CPU % periodically, is it reasonable?
Goto Forum:
  


Current Time: Tue Nov 05 19:50:46 GMT 2024

Total time taken to generate the page: 0.03701 seconds