Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 currently using nginx to serve downloads off my website. Users sometimes need to wait about 5 seconds before their download starts after clicking a download link. I'm not sure if I need to start using raid 10 (I'm currently using raid 50) or if this is a problem with my nginx configuration. I am also on a 1gbit line but download sometimes go as low as 10kB/s. My server: Dual Xeon 5620 CPU, 12x2TB drives with 8GB ram.

This is my nginx.conf

#user  nobody;
worker_processes  12;
worker_rlimit_nofile 10240;
worker_rlimit_sigpending 32768;

error_log  logs/error.log  crit;

#pid        logs/;

events {
    worker_connections  2048;

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

    access_log  off;
    limit_conn_log_level info;
    log_format  xfs  '$arg_id|$arg_usr|$remote_addr|$body_bytes_sent|$status';

    #sendfile       on;
    #tcp_nopush     on;
    reset_timedout_connection on;

    server_tokens off;
    autoindex off;

    keepalive_timeout  0;
    #keepalive_timeout  65;

    limit_zone one $binary_remote_addr 10m;
    perl_modules  perl;

This is my iostat

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           6.05    6.49    1.22   23.33    0.00   62.91

Device:         rrqm/s   wrqm/s     r/s     w/s   rsec/s   wsec/s avgrq-sz avgqu-sz   await  svctm  %util
sda               1.30    31.80  257.10   11.70 47852.80  1449.90   183.42    82.50  311.28   3.72 100.00
dm-0              0.00     0.00    0.00    1.10     0.00     8.80     8.00     0.21  169.64 124.45  13.69
dm-1              0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
dm-2              0.00     0.00  251.90   41.30 46423.20  1435.50   163.23   101.98  348.08   3.31  96.96


enter image description here

share|improve this question
You're not using sendfile and you appear not to have configured your buffers at all. I'd honestly just turn sendfile on if I were you. – Martin Fjordvald Nov 16 '11 at 5:59
Can you explain what benefits sendfile and buffers provides? – Matthew Hui Nov 16 '11 at 6:55
I turned on sendfile. I will see if it does anything – Matthew Hui Nov 16 '11 at 7:24
up vote 1 down vote accepted

What does your monitoring show? Are you close to maxing out your connection? Are you seeing high load? Large numbers of concurrent connections? What's your IOStat look like?

Without monitoring, it's impossible for us to give you any sort of decent information. Your delays could be caused by something like a bad DNS resolver, or your HDD's being maxed out.

share|improve this answer
It's high io load. I've added my iostat results – Matthew Hui Nov 16 '11 at 3:25

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.