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.

I have a drupal-based website on a VPS with 1GB RAM and 1Ghz processor share. The webserver is nginx along with php-fastcgi. Currently I am using 10 nginx and 13 php-fastcgi processes. The server load is high most of the times while half of the RAM is unused. The CPU usage rarely reaches 80%.

I have tried some other combinations of nginx/php-fastcgi but am not sure what is the optimal combination because I am quite ignorant about what's going on below the surface. So I appreciate if you could share your experience or give me some clues.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Normally you say one nginx worker per core.

In your case one worker should be enough.

10 FastCGI-Processes are enough normally, but it depends on how each process is configured. How many connections do they accept? etc.

If you think that your website is too slow you need to find out what is the problem.

Is it really you or is the Host on which your VPS is running slow? Is it the network? In this case you can only switch to a dedicated server. Is the Database too slow? Then touch this point.

Maybe you could optimise your Database-Settings so it uses more RAM and less Harddisk for temporary tables etc.

10 nginx processes is too much for your VPS.

share|improve this answer
    
Thanks Ben, I reduced the number of nginx workers to 3, and now the site works more smoothly. –  alfish Nov 18 '10 at 4:27
    
Would be nice if you would vote for my answer then. –  Benedikt Niessen Nov 22 '10 at 8:13
    
Sorry Ben, "Vote Up requires 15 Reputation" –  alfish Dec 3 '10 at 11:07

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.