Memory in VPS


#1

Ok so … i’ve spent a lot of time trying to optimize sites and such. I’m banging my head against a wall because the memory utilization isn’t making sense to me.

After reading this article among others: http://wiki.dreamhost.com/PS_Optimization

I’ve been watching the memory in the shell and noticed that some processes remain in memory for what seems like forever even if … they shouldn’t be there anymore.

*Note i have a user for each website i have on my vps so i can keep track of which website process is which (i didnt have it set up this way before).

  1. I disabled a website that was taking up the most memory and even after I did that… it remained as the top user of memory in the system. Right now its at 15% of the memory even though i started out with disabling all plugins in wordpress about 4 hours ago etc and then outright renaming the domain folder (disabling it in the process).

  2. I deleted a user after I moved all websites to other user names. After that it appeared that the deleted user was renamed by the system with a set of numbers which continued to stay in memory.

So my question is why does the VPS just hang onto memory? if you increase the memory limit it just gets higher… maybe staying within 120 mb or so of the limit at all times. Why is this so? What happens if there is a real live process that needs the memory that the VPS hasn’t released yet?

I restarted the server which seemed to get rid of these… so is restarting after something takes up memory the only way to fix these issues?

Sorry so many questions just wondering how I’m supposed to guage real memory needs in this situation. I’ve just started out with a few blogs and came across out of memory script errors which disabled my sites because i had the limit set to 300 mb … (it seems that even with no changes in traffic (nearly 0), or website updates the memory still increased over a weeks time). Increasing the memory only seemed to increase the need.

I’ve followed most of the steps to optimize my websites as well. (leaner on plugins, anti-spam, etc etc.).


#2

Hi, do you find some resolutions to this RAM problem? Or some usefull links to share? :slight_smile:

I’ve more problems today with a VPS setted on 600 mb, than some weeks ago with a basic hosting plan…
I use wordpress blogs, with about 10.000 visits a day totally, all cached with specific plugins but… memory goes up every day or so, and I also see strange CPU peaks once a day.


#3

Sorry I took so long to respond to this… To answer your question I never figured out the peculiarities of how memory is handled on the VPS. There isn’t much rhyme or reason to anything.

I just switched to nginx on my VPS to test out things… its just a bit scary with wordpress. One of the sites work the other doesn’t. If I find any links or anything Ill post em here.


#4

I switched to nginx on the 2 personal servers that I have. Both graphs went from their usual erratic to almost flat line. I believe this is a very good thing. There are so many benefits to Nginx in the end, the best of which is it uses a lot less memory than Apache. You can find more info here http://wiki.dreamhost.com/Nginx

Plus you’ll find a lot of information if you google the words Nginx and Wordpress. In the end I’m quite happy with my new solution.