OpenVZ Forum


Home » General » Support » GameServer out of memory
Re: GameServer out of memory [message #2099 is a reply to message #1936] Mon, 20 March 2006 06:40 Go to previous messageGo to previous message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Here is a step-by-step instruction

(0) Start with the known working VPS config. It can be vps.basic config, you can apply it to a VPS using this command:
vzctl set VPSID --applyconfig vps.basic --save


(1) See /proc/user_beancounters if there are some beancounters for which failcnt>0. In your case this is kmemsize, privvmpages and tcprcvbuf. You need to increase them.

(2) For each beancounter you want to increase, take the current values of barrier and limit, and multiply it by some factor (e.g. 1.2 or 1.5 or 2 or 4). Apply the newly calculated values using this command:
vzctl set VPSID --beancounter newbarrier:newlimit --save

Please note that in most cases there should be a safety gap between a barrier and a limit.

(3) Check the resulting configuration using vzcfgvalidate:
vzcfgvalidate /etc/sysconfig/vz-scripts/VPSID.conf

If there are some errors or warnings -- fix them as suggested, or run vzcfgvalidate with -r switch to fix automatically.

(4) Notice the current value of failcnt for the parameter you have just increased. Try running your application in VPS again. Check if there is some problems in its log files. Check if failcnt is growing. If it is growing, go back to step 2.

(5) You should end up with your application fully working, without increasing failcnts for all the beancounters, and with a valid VPS config (vzcfgvalidate should not complain). To be sure, restart your VPS and check /proc/user_beancounters again. Then try to create some load for your application to check it works under load as well.


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: vzpkgcache issues on amd64
Next Topic: vps's not working for internet only localy!
Goto Forum:
  


Current Time: Sun Aug 11 10:21:38 GMT 2024

Total time taken to generate the page: 0.02975 seconds