Delay before download starts when serving files using nginx
Posted
by
glumbo
on Server Fault
See other posts from Server Fault
or by glumbo
Published on 2011-11-16T01:45:09Z
Indexed on
2011/11/16
1:54 UTC
Read the original article
Hit count: 597
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/nginx.pid;
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;
perl_require download.pm;
© Server Fault or respective owner