1

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

5
  • How many workers does downloading a file consume? (should only be one) Sep 7, 2012 at 16:53
  • @foocorpluser how can i find out how many workers downloading a file consume .Thanks for quick response
    – Werulz
    Sep 7, 2012 at 17:03
  • lsof and grep should do it. Sep 7, 2012 at 20:08
  • Dude i am relatively new to server management , could you please give me a detailed tutorial
    – Werulz
    Sep 8, 2012 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. Sep 10, 2012 at 16:43

0

You must log in to answer this question.

Browse other questions tagged .