OpenVZ Forum


Home » General » Support » *CLOSED* Memory
*CLOSED* Memory [message #12566] Wed, 02 May 2007 23:10 Go to next message
Hsilamot is currently offline  Hsilamot
Messages: 9
Registered: February 2007
Junior Member
got a problem with memory allocation

root@azx:[/etc/sysconfig/vz-scripts]# vzmemcheck -v
Output values in %
veid        LowMem  LowMem     RAM MemSwap MemSwap   Alloc   Alloc   Alloc
              util  commit    util    util  commit    util  commit   limit
117           0.39   10.50    1.41    0.45   20.37    0.77   20.37   22.28
128           2.00   10.69   21.04    6.73   20.39   17.27   25.70   22.31
137           0.80   10.50    7.84    2.51   20.37    7.80   20.37   22.28
140           0.25    3.50    1.73    0.55    3.30    1.93    3.30   19.57
141           0.24    4.30    1.73    0.55    1.00    1.93    1.00   21.59
142           0.25    4.30    1.73    0.55    1.00    1.93    1.00   21.59
143           0.25    3.53    1.73    0.55    0.91    1.93    0.91   21.50
148           0.95    5.25    3.77    1.21   19.78    2.20   19.78   21.69
 ------------------------------------------------------------ -------------
Summary:      5.13   52.58   40.99   13.11   87.10   35.76   92.41  172.81


i dont know how to Lower the Alloc limit on 140-143 and give more to 128

[Updated on: Fri, 04 May 2007 13:24] by Moderator

Report message to a moderator

Re: Memory [message #12573 is a reply to message #12566] Thu, 03 May 2007 08:27 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
Read the UBC page on the wiki. Its the basic requirement for understanding resource management on the vz architecture. The metric you are looking for is privvmpages



-------------
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: Memory [message #12574 is a reply to message #12566] Thu, 03 May 2007 08:32 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

"Alloc limit" for a VE is a sum of its privvmpages*page_size + kmemsize + tcprcvbuf + tcpsndbuf + dgramrcvbuf + othersockbuf. If value is displayed in percent (i.e. when vzmemcheck is called without -A flag), it is divided by (RAM size + swap size).

So in your case you might want to try decreasing privvmpages value for VEs 140-143. Note however that total for "Alloc limit" may exceed 100%, and this is OK (see http://wiki.openvz.org/UBC_systemwide_configuration#Utilizat ion_4 for more details).


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: Memory [message #12581 is a reply to message #12573] Thu, 03 May 2007 09:25 Go to previous messageGo to next message
Hsilamot is currently offline  Hsilamot
Messages: 9
Registered: February 2007
Junior Member
your response is not very helpful , i have read all and don't get anything and read the pdf manual too
Re: Memory [message #12582 is a reply to message #12574] Thu, 03 May 2007 09:26 Go to previous messageGo to next message
Hsilamot is currently offline  Hsilamot
Messages: 9
Registered: February 2007
Junior Member
Your response is very detailed, that explains well the case, i should check. i need to have about 60, 70% of resources in VZ 128 and 140-143 are just DB servers (for redundant backup) so they need about 3% of server capacity

Re: Memory [message #12623 is a reply to message #12582] Fri, 04 May 2007 13:23 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

You don't need to set a limit so low usually.
Look, OpenVZ has one good advantage - overcommitment. If some VE doesn't use all the resources it can, then they are available to others. i.e. making a limit lower won't likely make much difference (and won't affect performance etc.), but when these VEs will suddenly need more resources they will fail due to tight constraints.

i.e. Alloc Limit doesn't reserve the memory for this particular VE. Hope I made it a bit more clear Smile


http://static.openvz.org/userbars/openvz-developer.png
Re: Memory [message #12634 is a reply to message #12623] Fri, 04 May 2007 21:26 Go to previous messageGo to next message
Hsilamot is currently offline  Hsilamot
Messages: 9
Registered: February 2007
Junior Member
well, i don't know what to do, i got a cpanel server in the vz and the server fails constantly. it says "memory allocation failed" and don't know how to configure it to stop saying it
Re: Memory [message #12636 is a reply to message #12634] Sat, 05 May 2007 05:13 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
1) cat /proc/user_beancounters
2) duplicate problem
3) cat /proc/user_beancounters

--

paste the 2 UBC outputs here and we can help you. or, just look at the failcnt column and increase that metric.



-------------
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: Memory [message #12637 is a reply to message #12636] Sat, 05 May 2007 06:07 Go to previous messageGo to next message
Hsilamot is currently offline  Hsilamot
Messages: 9
Registered: February 2007
Junior Member
i have get rid of the problem raising the kmemsize but whold like to know what should be the best size

root@man:[/]# cat /proc/user_beancounters
Version: 2.5
uid resource held maxheld barrier limit failcnt
128: kmemsize 7099477 18527131 1342177280 1342177280 20326611
lockedpages 0 8 4501 4501 0
privvmpages 136137 180944 153471 168818 379679
shmpages 731 9848 15347 15347 0
dummy 0 0 0 0 0
numproc 123 245 2048 3192 0
physpages 51203 84320 0 2147483647 0
vmguarpages 0 0 196000 2147483647 0
oomguarpages 51203 94088 153471 2147483647 0
numtcpsock 47 216 4000 4000 0
numflock 9 70 1000 1000 0
numpty 1 3 400 400 0
numsiginfo 0 88 1024 1024 0
tcpsndbuf 100080 2870928 14347059 30731059 19
tcprcvbuf 2400 521520 14347059 30731059 0
othersockbuf 39504 668112 7173529 23557529 0
dgramrcvbuf 0 120000 7173529 7173529 0
numothersock 34 96 2000 2000 0
dcachesize 727196 977248 20132038 20736000 0
numfile 1450 3751 36000 36000 0
dummy 0 0 0 0 0
dummy 0 0 0 0 0
dummy 0 0 0 0 0
numiptent 57 110 200 200 0

root@azx:[/etc/sysconfig/vz-scripts]# vzmemcheck -v
Output values in %
veid LowMem LowMem RAM MemSwap MemSwap Alloc Alloc Alloc
util commit util util commit util commit limit
117 0.48 10.50 1.60 0.62 20.37 4.20 20.37 22.28
128 1.99 388.96 20.74 6.63 62.96 17.24 68.27 64.88
137 1.10 10.50 21.02 6.72 20.37 12.19 20.37 22.28
140 0.34 2.35 2.31 0.96 3.17 2.42 3.17 3.17
141 0.24 2.35 1.45 0.55 0.78 1.92 0.78 3.17
142 0.24 2.35 1.00 0.53 0.78 1.90 0.78 3.17
143 0.25 2.35 1.45 0.55 0.78 1.92 0.78 3.17
148 1.24 5.25 10.36 3.31 19.78 7.81 19.78 21.69
------------------------------------------------------------ -------------
Summary: 5.89 424.61 59.94 19.87 128.96 49.62 134.28 143.82
root@azx:[/etc/sysconfig/vz-scripts]# vzmemcheck -v -A
Output values in Mbytes
veid LowMem LowMem RAM MemSwap MemSwap Alloc Alloc Alloc
util commit util util commit util commit limit
117 1.69 36.93 16.03 19.47 636.42 131.40 636.42 696.37
128 7.27 1367.92 214.35 214.35 1967.42 547.74 2133.55 2027.37
137 3.39 36.93 205.70 205.70 636.42 374.03 636.42 696.37
140 1.21 8.27 23.10 30.10 99.04 75.77 99.04 99.04
141 0.86 8.27 14.53 17.10 24.27 60.08 24.27 99.04
142 0.86 8.27 9.95 16.43 24.27 59.40 24.27 99.04
143 0.86 8.27 14.48 17.09 24.27 60.05 24.27 99.04
148 4.34 18.46 103.51 103.51 617.96 244.07 617.96 677.91
------------------------------------------------------------ -------------
Summary: 20.47 1493.32 601.64 623.75 4030.08 1552.53 4196.21 4494.20
351.00 351.00 999.00 3124.00 3124.00 3124.00 3124.00 3124.00

is the VE 128 the one with the CPanel

------------------------------------

Other question, do you know if there's a way to evade the "fork: memory allocation fail" when the memory is full (i think that because the vz sees the 1 gb of ram it tryes to allocate the memory, i whould like to know if there's some way that the virtualz only sees the ram that has available for himself)
Re: Memory [message #12638 is a reply to message #12637] Sat, 05 May 2007 06:15 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
there is no best size for any metric. Whats the best size pair of pants? Its different for almost everyone.

What I do, is set the limit very high, duplicate your highest anticipated application load, look at the maxheld, and set the limit to some value greater then that.



-------------
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: Memory [message #12639 is a reply to message #12638] Sat, 05 May 2007 06:18 Go to previous messageGo to next message
Hsilamot is currently offline  Hsilamot
Messages: 9
Registered: February 2007
Junior Member
uid resource held maxheld barrier limit failcnt

what does it means held? and failcnt?

and the other thing is if you know anything about my second question?
Re: Memory [message #12640 is a reply to message #12639] Sat, 05 May 2007 07:44 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
have you read the UBC page in the wiki and/or the pdf manual?

-------------
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: Memory [message #12641 is a reply to message #12640] Sat, 05 May 2007 07:50 Go to previous messageGo to next message
Hsilamot is currently offline  Hsilamot
Messages: 9
Registered: February 2007
Junior Member
yes, i'm Mexican so maybe the solution is there and i don't understand it
Re: Memory [message #12663 is a reply to message #12640] Sun, 06 May 2007 21:35 Go to previous message
Hsilamot is currently offline  Hsilamot
Messages: 9
Registered: February 2007
Junior Member
?
Previous Topic: High Load Issues
Next Topic: *SOLVED* Communication between HN and VE
Goto Forum:
  


Current Time: Wed Feb 21 02:56:48 GMT 2024

Total time taken to generate the page: 0.03207 seconds