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.

My friend have a site that allows users to download files.However the moment one guy start downloading server load change from 0.00 to 3.50 in a matter of minutes.Nginx and php-fpm reach D state and IOwait is like 100% on all cpu cores.I tried to limit number of concurrent connection but this seems to have no effect on server load.

user              nginx;
worker_processes  4;



events {
    worker_connections  1024;
}


sendfile        on;
#tcp_nopush     on;
gzip  on;
#keepalive_timeout  0;
keepalive_timeout  2;

My php-fpm setting

pm.max_children = 7
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 6
pm.max_requests = 500

Server - 8gb ram Quad core processor 1TB sata hdd

share|improve this question
    
How many workers does downloading a file consume? (should only be one) –  foocorpluser Sep 7 '12 at 16:53
    
@foocorpluser how can i find out how many workers downloading a file consume .Thanks for quick response –  Werulz Sep 7 '12 at 17:03
    
lsof and grep should do it. –  foocorpluser Sep 7 '12 at 20:08
    
Dude i am relatively new to server management , could you please give me a detailed tutorial –  Werulz Sep 8 '12 at 4:01
    
lsof | grep nginx | grep TCP You will see workers "LISTEN"(ing) and workers with "ESTABLISHED" connections, with the establisehd connections you can see the ip address that is connected. It should only take one worker establishing one connection to one ip to transfer one file. –  foocorpluser Sep 10 '12 at 16:43
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.