Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to reduce memory usage and increase speed. I am serving a small webservice that receives a max of 800 hits/sec and an average of 400 hits/sec.

The server is a 2 xeon dual core 3.0GHz with 8 Gb of ram.

2Gb is taken by the MySQL 6Gb are left for the rest, which I think that will allow me to take no less than 5Gb for the lighttpd.

How do I have to setup the lighttpd to handle that traffic, regardless of the HW being able, I am interested on optimizing it. I know that the real deal here might be the process involved on the webservice, but that is other story. But it is based on PHP5 and with eAccelerator (it really makes a difference).

I am trying to speed this up because the performace is not good enough. If I increse the number of MaxClients the server starts swapping which is terrible.

I hope I have explained myself properly.

For the apache2 I was using this conf:

<IfModule mpm_prefork_module>
    StartServers           5
    MinSpareServers        5
    MaxSpareServers      100
    ServerLimit         1000
    ListenBacklog       1000
    MaxClients           700
    MaxRequestsPerChild    0


share|improve this question

migrated from Jul 14 '12 at 10:29

This question came from our site for professional and enthusiast programmers.

Why lighttpd? nginx is a superior alternative. – womble Jul 14 '12 at 11:27
Hi Womble. I been googling and reading and I think that nginx could be a better choice, as you suggest. I will dig more and see what comes up. – Don Viegues Jul 14 '12 at 20:33

You can try using the "worker" MPM from Apache as an alternative to switching to a different web-server that you have never used before.

If you're planning to use PHP with lighty, you can look at the documentation for help.

share|improve this answer
I have considered your recomendations, but it seems that worker might have some troubles with PHP if what I have read is true. Thanks for your answer – Don Viegues Jul 14 '12 at 20:31

Your Answer


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.