How to reduce memory in Virtualmin when no website is accessed?

4 posts / 0 new
Last post
#1 Fri, 01/11/2013 - 19:33
vsusi

How to reduce memory in Virtualmin when no website is accessed?

I have 21 wordpress websites in VPS and when apache is restarted, memory always remains less than 500MB (I have 2GB RAM total). But once I access all the websites it goes to around 1GB.

My problem is not going to 1GB RAM when accessed but it never comes back to 500MB after few minutes.

So I had to use a apahe and mysql restart cron job. Do you have any other alternative to avoid apache restart?

Thanks

Sat, 01/12/2013 - 08:01
Locutus

It probably goes up due to Apache/PHP processes caching stuff and/or being started only upon first access to a site. I don't think it's a bad thing, since all subsequent accesses will be faster. Is there a particular reason why you want to keep memory consumption at 500 MB?

Sat, 01/12/2013 - 09:34
vsusi

Simple. My VPS plan has 1GB RAM + 1GB burst RAM. So I am worried if my provider will warn me about it since it might affect other VPS's.

I am wondering how hosting companies run their sites if all their hosted websites cache permanently like this.

Is there any way I can remove the apache cache after few minutes of non-use?

Sun, 01/13/2013 - 01:18
lp86

Is your VPS provider running OpenVZ?

If you are not sure try this from the shell as root "cat /proc/user_beancouters" if you get anything back your running OpenVZ.

If they are using OpenVZ, then try this, it has always greatly reduced memory usage for my apache installations.

https://www.intovps.com/client/knowledgebase/17/Memory-usage-seems-too-h...

Topic locked