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 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
</IfModule>

Thanks!

share|improve this question

migrated from stackoverflow.com 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
add comment

1 Answer

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
add comment

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.