Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

So, I'm currently on a VPSVille Cpanel3 account that has 768 MB guaranteed ram and 2048 MB burst ram (full details here: http://www.vpsville.ca/cpanel-vps). It's running CentOS, Cpanel, Apache and FastCGI.

On the server itself I have a Joomla community site with a forum system that generally has about 20 people on it max at any point and even then, during the evening, no one. It's a pretty small site but has a number of modules running on it. It gets about 6000 visits a month. Also on the server is a WordPress site that gets about 80-150 visits a day, 2 other WordPress sites that aren't developed yet so they don't get any traffic at all, and 2 static HTML websites that also only get about 500 hits a month. All in all, no huge sites.

The issue is that I get "out of memory" errors fairly frequently and it kills my server and I need to reboot it in order to get all my sites up and running again. It seems to me that I shouldn't have these issues with that much RAM allotted to my account. Every time I send in a support ticket, they just tell me to upgrade the RAM.

Now, I'm still pretty new to all this, so I'm not a good judge of how much I really need for my sites to run. I don't know if my sites really do need this much or if VPSVille has oversold their servers, they don't actually have those resources available and I'm getting ripped off.

So, how much RAM should I be using with my current setup?

share|improve this question

5 Answers 5

You should set up monitoring on your own to monitor the RAM usage on the VPS. You could do this with something like nagios, or sar / sysstat. If the VPS provider provides those stats, you might want to check those as well.

Keep in mind that burstable might mean it can only burst for a few minutes, then if you don't go back down to 768, you might not have enough memory.

As for a solution to high memory usage, you might want to look into basic tuning of Apache, such as Max threads / processes etc, or different MPM options (threaded or perfork). You also might want to look at lighter weight http servers such as nigix.

share|improve this answer
    
Concur, also check out apache processes using ExtendedStatus to see how many processes you are wasting (or if you are maxing them out). Burstable is just a marketing ploy, only go by your guaranteed memory. –  Dave Drager Jan 22 '10 at 15:56
    
Burstable can be handy, if you have low memory requirements, it can help when compiling the software to start with or hungry package managers like yum. But you are right that for production use, you should just be looking at the amount of guaranteed memory. –  Kyle Brandt Jan 22 '10 at 21:33
    
I'm try not to take burst ram into consideration for this because as noted above, it's not guaranteed to be available. It sounds like I really need some tuning done on my server but alas, I'm not familiar enough with the inner workings yet to get things done right. If anyone has some good tutorial links, that would be great. –  Tamerax Jan 23 '10 at 7:00

With that kind of traffic, your server should more than suffice with 768 MB of RAM. Even 256MB will be enough. What you will need to do is to tune your running services. You can probably tune Apache or get rid of it entirely and replace it with one of the lighter web servers like lighttpd or nginx servers. Limit the number of FastCGI threads spawned and also limit your PHP memory usage.

share|improve this answer

Get rid of cPanel, it's just a big waste of RAM for personal use. Try learning how to edit the config files yourself instead of reling on cPanel to do it for you. You will save ram this way because there is nothing running just to configure your services.

Another thing you could try switching to a Xen based VPS. Xen has better memory management

share|improve this answer
    
Editing the config files also to set up all emails on the server? –  Marco Demaio Aug 19 '10 at 13:07

I think that you have the OOM Killer doing its job. Check /var/log/messages:

zgrep -i oom /var/log/messages*

Check how much memory is allocated by the VMware balloon driver. Check if you have the latest version of the VMware Tools. What is the output of cat /proc/meminfo?

share|improve this answer

It sure look enough, but I dont know CPanel much. Most control panel comes with apache, apache for ssl, mail server, anti spam, mailman, SQL, ... they are built for "reseller" in mind. Problem is they often comes out of them box badly configured and need tweeking. You could :

  • Switch off all the unused service from CPanel
  • Edit the configuration of every service to match your memory.

Another good question would be, do you need a VPS? Normally if you are on a VPS, it is because you need customization. If so, what kind of customization? If you don't have any customization, I would highly siggest you look for a multi-domain plan or reseller plan on shared hosting. As for customization, look for a company that has many other services and not just web hosting, like hosted Exchange, SharePoint, VPS, ... so that whenever one of your client need something you can't offer, you are not caught letting him go.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.