rajkosto
Junior Member
Posts: 18
Joined: Oct 2007
Reputation: 0
|
RE: Memory Problem
Is it an OpenVZ VPS ?
If it is, OpenVZ counts your used VIRTUAL memory as your memory limit. Most of the server services use a lot of virtual memory (run a lot of threads/processes) but a very small percentage of that is actually allocated physical memory/swap.
So, what i did for a LONG time on openvz, was to find which services use a lot of vram in TOP, then edit their init.d scripts, and add something like ulimit -s 512 as the first executable line
This reduces the thread stack from 8M vram to 512K vram, a 16x reduction !
Most important is to do this for apache2, then bind9, maybe mysql and proftpd.
It's a trick many people don't know, and simply think that they should upgrade their OpenVZ instance to one that has more RAM, and providers are using this property of OpenVZ to massively oversell their physical ram (which you cant do under XEN, vmware, etc).
Hope this helps
|
|
06-20-2011 03:02 AM |
|