Current time: 05-19-2024, 05:26 PM Hello There, Guest! (LoginRegister)


Post Reply 
Memory Problem
Author Message
rajkosto Offline
Junior Member
*

Posts: 18
Joined: Oct 2007
Reputation: 0
Post: #3
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
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
Memory Problem - z7917 - 06-19-2011, 09:30 PM
RE: Memory Problem - kilburn - 06-20-2011, 12:02 AM
RE: Memory Problem - rajkosto - 06-20-2011 03:02 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)