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.).