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

This question already has an answer here:

I need an idea to solve overloading my server, my server specification:

vCPUs: 1 vCPU

Memory: 2 GB

System Drive: 40GB

OS:Linux Ubuntu 10.04 64 bit

Software: Apache, PHP, MySQL, and Plesk 11

I check the server using command htop, showing me 1900MB of 2000MB usage and swap 1600MB of 3000MB. When that happens, all my domains (about 30) are not loading and I can't do anything. To solve this I always have to restart the machine.

Processes looks OK, nothing wrong, few MySQL and psa (Plesk).

On server I've got 10 WordPress and about 3 other CMS websites.

Do I really need more RAM or maybe another VPS?

Please help me to choose...

share|improve this question

marked as duplicate by Jenny D, Stephane, SvW, mdpc, Tim Brigham Jun 18 '13 at 17:53

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1  
More RAM...2 GB is not nearly enough. Also, see: serverfault.com/questions/29126/… –  Nathan C Jun 18 '13 at 12:11
    
Thanks for the link! –  Jerry Jun 18 '13 at 12:30
    
also: Swap usage on VM's is EVIL - you share disc IO, so you get very slow fast. That you use 1600mb of 3000 already shows something is SERIOUSOSLY off. –  TomTom Jun 18 '13 at 12:57
add comment

3 Answers

up vote 1 down vote accepted

If you're more than about 100MB into swap, you need more memory. At least, that's the general rule I use when evaluating performance issues.

share|improve this answer
    
I have and option "Temporary Upgrades" from my provider, I should upgrade memory for a couple of weeks and test it... It cost only 5 pound to upgrade to to 4 GB. –  Jerry Jun 18 '13 at 12:28
    
Given that, then yes I would upgrade temporarily. The situation will improve, but you may still end up going into swap depending on how heavily used your server is. You'll almost never see CPU issues with web servers, but memory issues are fairly frequent. You may need to upgrade to 8GB memory, again depending on observed usage levels. –  John Jun 18 '13 at 12:31
    
That'e exactly why my provider said, word by word :) –  Jerry Jun 18 '13 at 13:15
    
I promise - I don't work for your provider. Nor have I ever worked for an ISP company. (At least not one that knew it was an ISP, but that's a different story.) –  John Jun 18 '13 at 13:33
    
Thanks for help. I added 4GB memory, i'll see how it goes. –  Jerry Jun 18 '13 at 13:47
show 1 more comment

It depends, start with more memory (significantly more to be honnest) once you are at the max of what your provider can offer you for a VPS, add another VPS. You can then loadbalance between these instances. Also on a side note, make sure your disks can keep up, I/O is a common bottle neck with VPS.

share|improve this answer
add comment

Configure all your services correctly so that they can't end up using all your RAM....

Apache: Configure mpm-prefork and fit the values to your needs

MySQL: configure all the buffers (InnoDB buffer pool, keybuffer.....) and max threads correctly.

It's going to take some time to find a perfect match - every setup is different. But in the end you can get the max performance out of your environment.

(nevertheless you can still throw hardware to your problem... ;) )

share|improve this answer
    
I disabled Billing Modules for plesk and Java modules, I hope that will help. Guide from this kb.parallels.com/en/9327 –  Jerry Jun 18 '13 at 13:17
    
I'll run some RAM improvements, I'm already tired of this issue. Thank you. –  Jerry Jun 18 '13 at 13:48
add comment

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