4

I am running an NGINX/1.8 server on Centos6.6 with multiple worker_processes, however while observing iotop I notice they burst up to 1918kb/s Read speed and rarely if at all pass that limit.

I want to be able to read my files and serve them faster (I am serving large files), Is this a linux limit I may have on processes or is this a misconfiguration of my nginx server.

Total DISK READ: 7.49 M/s | Total DISK WRITE: 0.00 B/s
  TID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN     IO>    COMMAND                                          
 8840 be/4 nginx    1917.09 K/s    0.00 B/s  0.00 %  0.00 % nginx: worker process
 9035 be/4 nginx    1917.09 K/s    0.00 B/s  0.00 %  0.00 % nginx: worker process
 9051 be/4 nginx    1917.09 K/s    0.00 B/s  0.00 %  0.00 % nginx: worker process
 9058 be/4 nginx    1917.09 K/s    0.00 B/s  0.00 %  0.00 % nginx: worker process

/etc/nginx/nginx.conf

    # For more information on configuration, see:
#   * Official English Documentation: http://nginx.org/en/docs/
#   * Official Russian Documentation: http://nginx.org/ru/docs/

user              nginx;
worker_processes  auto;

error_log  /var/log/nginx/error.log;
#error_log  /var/log/nginx/error.log  notice;
#error_log  /var/log/nginx/error.log  info;

pid        /var/run/nginx.pid;


events {
    worker_connections 4000;
    accept_mutex off;
    use epoll;
}

worker_rlimit_nofile 100000;

http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  /var/log/nginx/access.log  main;
    access_log off;



    access_log off;
    sendfile on;
    sendfile_max_chunk 1m;

    tcp_nodelay on; 
    output_buffers 1 8m;

client_body_buffer_size 10K;
client_header_buffer_size 1k;
client_max_body_size 8m;
large_client_header_buffers 2 1k;

    #keepalive_timeout  0;
    keepalive_timeout  65;
    keepalive_requests 100000;

    #gzip  on;

    # Load config files from the /etc/nginx/conf.d directory
    # The default server is in conf.d/default.conf
    include /etc/nginx/conf.d/*.conf;

    open_file_cache          max=20000 inactive=1m;
    open_file_cache_valid    1m;
    open_file_cache_min_uses 1;
    open_file_cache_errors   on;

}
2
  • related to: serverfault.com/a/705523/61607
    – Anatoly
    Jul 14, 2015 at 21:58
  • What is disk type? Measure the read:write with dd, probably the bottleneck is the disk itself, need to find out more details.
    – Anatoly
    Jul 15, 2015 at 23:00

1 Answer 1

0

I think the static files are cached by the OS the first time they are read. They are never read again and don't generate any IO for iotop.

The 1918 kb/s must be the logs being written to disk for the request(s).

What is the actual download speed for clients downloading these files? Suggest httperf command to do quick performance test and simulate multiple clients.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .