How come, that my VDS system uses that much rams? [message #40083] |
Thu, 15 July 2010 15:32 |
newn
Messages: 4 Registered: July 2010
|
Junior Member |
|
|
Hi everyone. I have bought a VDS system with 1 gig of rams. I think it uses OpenVZ instead of CentOS 5.
2.6.18-194.3.1.iv.028stab069.6 x86_64 x86_64
centos-release-5-5.el5.centos
I'm not very advanced in linux, but every time i enter my website of WP, it takes a lot of rams. When i surf, i eats even more. Today i went to it to check the ram usage again, and first time i entered, it took 70MBs from 100. Then i went to do something, i get back, i check the free rams availbale, it says it's 60. So +30MB while i was away from the website for a few minutes, then i enter it again. It eats 30 more megabytes. After that i hit admin board link on the site, it eats 20 more. That way, my server has <10 megabytes left.
My server hosts two programs, which eats a lot of rams, but it's not increasing, it eats it stabile. You start it, it takes some amount, it stays that way. It doesn't changes. Maybe +-10mb.
So anyway, how come, that simple website hits takes that much memory? After that, website sometimes doesn't load at all. I mean just a blank page or some contents of the website is blank, of half of the website is loaded only... Plus sometimes people (since those two other perograms are servers) cannot join to these servers.
So anyway, how can i fix this? Expluding adding more rams. I'm a student from a poor country and i get 100$ a year during my birthday. To add 512 megabytes, i would need to pay ~5$ a month more. Si 12*5... Well, doesn't add up too nicely.
|
|
|
|
|
|
|
Re: How come, that my VDS system uses that much rams? [message #40100 is a reply to message #40094] |
Fri, 16 July 2010 13:35 |
khorenko
Messages: 533 Registered: January 2006 Location: Moscow, Russia
|
Senior Member |
|
|
Well, but may be all the memory is really allocated? just post here (when you almost have no free memory):
# cat /proc/user_beancounters
# ps axfl --sort=-vsize
Thank you.
--
Konstantin
If your problem is solved - please, report it!
It's even more important than reporting the problem itself...
|
|
|
|
Re: How come, that my VDS system uses that much rams? [message #40124 is a reply to message #40106] |
Mon, 19 July 2010 09:22 |
khorenko
Messages: 533 Registered: January 2006 Location: Moscow, Russia
|
Senior Member |
|
|
Well, looks like your applications really allocate all the memory available on the node:
you can see this by failcounters for "privvmpages" parameter.
If you cannot do anything with processes running inside the Container, the only way left is to increase the privvmpages value (read - buy an account with more memory).
Alternatively you can try somehow to optimize the processes inside CT in order not to ALLOCATE a lot of RAM while real USE of that memory is not so high.
According to "oomguarpages" usage value all processes really USE only 140Mb of RAM, all the other memory (1Gb-140Mb) is just allocated, but not really used.
You can check the processes one by one from your "ps" output and check "VSZ" and "RSS" values: the first one is how much is ALLOCATED, the later - how much is used. After that just take a look at applications configurations - if you can somehow tell them not to PREALLOCATE too much memory, for example for some application internal buffers/caches, etc.
Hope that helps.
--
Konstantin
If your problem is solved - please, report it!
It's even more important than reporting the problem itself...
|
|
|