<p class="MsoNoSpacing"> Hi all,</p><p class="MsoNoSpacing">Recently I resorted to tuning my nginx webserver box for
more performance. I went ahead an changed</p>
<p class="MsoNormal">sudo ip route change default via 1.25.29.1 dev eth0 initcwnd
10</p>
<p class="MsoNormal">sudo sysctl -w net.ipv4.tcp_slow_start_after_idle=0</p>
<p class="MsoNoSpacing">This changed exposed a much better performance than
anticipated. And since most of my pages are httpd cached, the load times went
down from 2.3 – 3 seconds to 1.5-2 seconds </p>
<p class="MsoNoSpacing">While browsing I came across<a href="http://lowlatencyweb.wordpress.com/2012/03/20/500000-requestssec-modern-http-servers-are-fast/"> another benchmarking</a></p>
<p class="MsoNormal"> echo "2048
64512" > /proc/sys/net/ipv4/ip_local_port_range</p>
<p class="MsoNormal"> echo "1"
> /proc/sys/net/ipv4/tcp_tw_recycle</p>
<p class="MsoNormal"> echo "1"
> /proc/sys/net/ipv4/tcp_tw_reuse</p>
<p class="MsoNormal"> echo "10"
> /proc/sys/net/ipv4/tcp_fin_timeout</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> echo
"65536" > /proc/sys/net/core/somaxconn</p>
<p class="MsoNormal"> echo
"65536" > /proc/sys/net/ipv4/tcp_max_syn_backlog </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> echo
"262144" > /proc/sys/net/netfilter/nf_conntrack_max</p>
<p class="MsoNormal"> </p><p class="MsoNormal"><br></p>
<p class="MsoNormal">worker_processes
16;</p>
<p class="MsoNormal">worker_rlimit_nofile 262144;</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">daemon off;</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">events {</p>
<p class="MsoNormal"> use epoll;</p>
<p class="MsoNormal"> worker_connections
16384;</p>
<p class="MsoNormal">}</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">error_log error.log;</p>
<p class="MsoNormal">pid /dev/null;</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">http {</p>
<p class="MsoNormal"> sendfile on;</p>
<p class="MsoNormal"> tcp_nopush on;</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> keepalive_requests
100;</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> open_file_cache
max=100;</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> gzip
off;</p>
<p class="MsoNormal"> gzip_min_length
1024;</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> access_log off;</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> server {</p>
<p class="MsoNormal"> listen *:8080
backlog=16384;</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> location / {</p>
<p class="MsoNormal"> root html;</p>
<p class="MsoNormal"> index index.html;</p>
<p class="MsoNormal"> }</p>
<p class="MsoNormal"> }</p>
<p class="MsoNormal">}</p>
<p class="MsoNoSpacing"> </p>
<p class="MsoNoSpacing">But the type of machines that the tester has used does
<a href="http://lowlatencyweb.wordpress.com/2012/03/20/500000-requestssec-modern-http-servers-are-fast/">not allow me to believe the results. </a></p>
<p class="MsoNoSpacing">Have someone else gone along the same path? Are these
system variable changes recommended by the nginx community? </p><p class="MsoNoSpacing">-Quintin</p>