Re: GameServer out of memory [message #2099 is a reply to message #1936] |
Mon, 20 March 2006 06:40 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) ![Go to next message Go to previous message](/theme/ovz3/images/down.png) |
|
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
|
|
|