OpenVZ Forum


Home » General » Support » Help configure VPS (fork: Cannot allocate memory)
Help configure VPS [message #47821] Wed, 12 September 2012 20:52 Go to next message
mawerick is currently offline  mawerick
Messages: 4
Registered: September 2012
Junior Member
Hello,

I am pretty new user of OpenVZ. Therefore, I am having problems setting up my hosting. I went through the forum topics and saw that there is tons of information out there, but I am afraid I will not be able to do without your help.

First of all, I would like to make clear the hardware I am using:
Operating System: CentOS 5 - 32-BIT
RAM/Memory: 1GB DDR2
CPU: Celeron D 347 3.6ghz
I would like to run 1 VPS on the host machine. I would like this VPS to run with 512MB of RAM. This VPS is intended to host several web sites. All the sites together receive 10k visit per day. They are photo blogs. I would like to mention that the bandwith of the sites is pretty high - 2-3TB per month.

The problem is:
Pretty often, when I run a command, I get the followin error:
-bash: fork: Cannot allocate memory

I get this error when I run a simple command, as simple as TOP. Meanwhile, the VPS indicates that it has enough free memory. Accordint to the VPS statistics, it consumes average of 200MB RAM memory. When I created the VPS, I configured it to be with 678MB.
Here is what the cat /proc/user_beancounters command shows:
Version: 2.5
       uid  resource           held    maxheld    barrier      limit    failcnt
      101:  kmemsize       10526958   15413641   15372700   15790164     367864
            lockedpages           0          3       2048       2048          0
            privvmpages       70849     160439     163840     196608      37579
            shmpages           1037       1709      21504      21504          0
            dummy                 0          0          0          0          0
            numproc             101        156        240        240          0
            physpages         32729      69599          0 2147483647          0
            vmguarpages           0          0     163840     163840          0
            oomguarpages      32729      69599     163840     163840          0
            numtcpsock           30        360        360        360          8
            numflock              2         73        188        206          0
            numpty                1          2         16         16          0
            numsiginfo            0        105        256        256          0
            tcpsndbuf        385968    1942388    1720320    2703360  542372255
            tcprcvbuf        214756    2269844    1720320    2703360       2340
            othersockbuf      21024     232184    1126080    2097152          0
            dgramrcvbuf           0     261080     262144     262144        239
            numothersock         19         65        360        360          0
            dcachesize            0          0    3409920    3624960          0
            numfile            1513       2560       9312       9312          0
            dummy                 0          0          0          0          0
            dummy                 0          0          0          0          0
            dummy                 0          0          0          0          0
            numiptent            20         20        128        128          0
        0:  kmemsize        6214453    7351695 2147483647 2147483647          0
            lockedpages        8898       8898 2147483647 2147483647          0
            privvmpages       32792      41673 2147483647 2147483647          0
            shmpages            665       1673 2147483647 2147483647          0
            dummy                 0          0 2147483647 2147483647          0
            numproc             100        116 2147483647 2147483647          0
            physpages         15848      22889 2147483647 2147483647          0
            vmguarpages           0          0 2147483647 2147483647          0
            oomguarpages      15867      22908 2147483647 2147483647          0
            numtcpsock            5          9 2147483647 2147483647          0
            numflock              6         10 2147483647 2147483647          0
            numpty                1          2 2147483647 2147483647          0
            numsiginfo            1          7 2147483647 2147483647          0
            tcpsndbuf         56100     105252 2147483647 2147483647          0
            tcprcvbuf         81920     214168 2147483647 2147483647          0
            othersockbuf      92004     123396 2147483647 2147483647          0
            dgramrcvbuf           0       8388 2147483647 2147483647          0
            numothersock         79         93 2147483647 2147483647          0
            dcachesize            0          0 2147483647 2147483647          0
            numfile            1974       3149 2147483647 2147483647          0
            dummy                 0          0 2147483647 2147483647          0
            dummy                 0          0 2147483647 2147483647          0
            dummy                 0          0 2147483647 2147483647          0
            numiptent            20         20 2147483647 2147483647          0

My VPS has na ID of 101.

Please, give me some advice and tell me what settings I should change in order the VPS to be OK.

Thanks in advance!

[Updated on: Thu, 13 September 2012 07:15]

Report message to a moderator

Re: Help configure VPS [message #47833 is a reply to message #47821] Thu, 13 September 2012 21:42 Go to previous messageGo to next message
mawerick is currently offline  mawerick
Messages: 4
Registered: September 2012
Junior Member
Sad
Re: Help configure VPS [message #47837 is a reply to message #47833] Fri, 14 September 2012 06:37 Go to previous messageGo to next message
dzimi is currently offline  dzimi
Messages: 22
Registered: December 2008
Junior Member
Switch to CentOS 6 and RHEL6 kernel
Re: Help configure VPS [message #47838 is a reply to message #47821] Fri, 14 September 2012 08:02 Go to previous messageGo to next message
mawerick is currently offline  mawerick
Messages: 4
Registered: September 2012
Junior Member
Is this the only option?
I think the VPS is not configured properly.
Re: Help configure VPS [message #47839 is a reply to message #47838] Fri, 14 September 2012 11:14 Go to previous messageGo to next message
dzimi is currently offline  dzimi
Messages: 22
Registered: December 2008
Junior Member
Well, with 2.6.32 memory management is easier than is with 2.6.18.
With 2.6.32 you'll need to set every option to unlimited without physpages and swappages.
Then kernel will play automaticaly with other parameters.
Re: Help configure VPS [message #47840 is a reply to message #47839] Fri, 14 September 2012 11:17 Go to previous message
mawerick is currently offline  mawerick
Messages: 4
Registered: September 2012
Junior Member
I understand, but I use Kloxo for control panel, which is not supported with centos 6.x
So I think to set manual this options.
Previous Topic: No internet connection ("venet0 no longer relevant for mDNS)
Next Topic: Installation fails due to probably out-dated mirror file
Goto Forum:
  


Current Time: Sat Apr 27 12:19:33 GMT 2024

Total time taken to generate the page: 0.02492 seconds