# Configuration issues with 100-150MB files downloads causing high CPU usage

**URL:** <https://www.ruby-forum.com/t/configuration-issues-with-100-150mb-files-downloads-causing-high-cpu-usage/224225>\
**Category:** NGINX\
**Created:** [November 3, 2012, 10:48pm UTC](https://www.ruby-forum.com/t/configuration-issues-with-100-150mb-files-downloads-causing-high-cpu-usage/224225 "2012-11-03T22:48:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [November 3, 2012, 10:48pm UTC](https://www.ruby-forum.com/t/configuration-issues-with-100-150mb-files-downloads-causing-high-cpu-usage/224225/1 "2012-11-03T22:48:44Z")

</div>

Hello, I’m hoping someone would be able to assist in my dilemma, I’ve  
searched for a few weeks on a fix with no success… I run Nginx in proxy  
pass-through mode to apache… (I hope I got the right terminology…),  
but basically, we’ve been seeing issues with our Media server, where  
once we start getting enough requests to make the bandwidth get above  
100mbit, we start seeing drops on our cacti graphs… when i can get  
online as the time, I notice that Nginx is utilizing a ton of CPU  
causing the server to slow down considerably… I’m worried that my  
configuration has some issues and I would really appreciate the help  
from the community. Details on the server, brand new dell r515 (6 cores,  
16GB RAM, 2 15K SAS drives for the os in a RAID 0, 12 2TB HDDs in a RAID  
6 for the media). Average file size is 120MB, they don’t deviate more  
than +/-5% of that size… so it’s quite consistent…

Here is the config we use… We have a custom built CDN that uses nginx,  
and we can get the same files served over 120mbit with no issues… so  
I’m sure it’s something I tweaked that is wrong…

user nobody;  
worker\_processes 10;  
error\_log /var/log/nginx/error.log info;  
worker\_rlimit\_nofile 20480;  
events {  
worker\_connections 5120; # increase for busier servers  
use epoll; # you should use epoll here for Linux kernels 2.6.x  
}  
http {  
server\_name\_in\_redirect off;  
server\_names\_hash\_max\_size 10240;  
server\_names\_hash\_bucket\_size 1024;  
include mime.types;  
default\_type application/octet-stream;  
server\_tokens off;  
disable\_symlinks if\_not\_owner;  
sendfile off;  
tcp\_nopush on;  
tcp\_nodelay on;  
keepalive\_timeout 5;  
gzip on;  
gzip\_vary on;  
gzip\_disable “MSIE [1-6].”;  
gzip\_proxied any;  
gzip\_http\_version 1.1;  
gzip\_min\_length 1000;  
gzip\_comp\_level 6;  
gzip\_buffers 16 8k;  
gzip\_types text/plain text/xml text/css application/x-javascript  
application/xml image/png image/x-icon image/gif image/jpeg  
application/xml+rss text/javascript application/atom+xml;  
ignore\_invalid\_headers on;  
client\_header\_timeout 3m;  
client\_body\_timeout 3m;  
send\_timeout 3m;  
reset\_timedout\_connection on;  
connection\_pool\_size 512;  
client\_header\_buffer\_size 256k;  
large\_client\_header\_buffers 4 256k;  
client\_max\_body\_size 200M;  
client\_body\_buffer\_size 128k;  
request\_pool\_size 64k;  
output\_buffers 4 64k;  
postpone\_output 1460;  
proxy\_temp\_path /nginx\_temp/;  
client\_body\_in\_file\_only on;  
log\_format bytes\_log “$msec $bytes\_sent .”;  
include “/etc/nginx/vhosts/\*”;  
}

Thank you again for any help, I’m including graphs from the last 24  
hours, you can see the system have hiccups when the amount of downloads  
gets to a certain point…  
[![](https://the-irc.com/images/zeus-odity.PNG) ](https://the-irc.com/images/zeus-odity.PNG)  
[![](https://the-irc.com/images/zeus-odity2.PNG) ](https://the-irc.com/images/zeus-odity2.PNG)

Brad R.  
Systems Engineer  
FTW Entertainment LLC
