Welcome! Log In Create A New Profile

Advanced

OS tuning an nginx webserver machine

Quintin Par
March 20, 2012 10:56PM
Hi all,

Recently I resorted to tuning my nginx webserver box for more performance.
I went ahead an changed

sudo ip route change default via 1.25.29.1 dev eth0 initcwnd 10

sudo sysctl -w net.ipv4.tcp_slow_start_after_idle=0

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

While browsing I came across another
benchmarkinghttp://lowlatencyweb.wordpress.com/2012/03/20/500000-requestssec-modern-http-servers-are-fast/

echo "2048 64512" > /proc/sys/net/ipv4/ip_local_port_range

echo "1" > /proc/sys/net/ipv4/tcp_tw_recycle

echo "1" > /proc/sys/net/ipv4/tcp_tw_reuse

echo "10" > /proc/sys/net/ipv4/tcp_fin_timeout



echo "65536" > /proc/sys/net/core/somaxconn

echo "65536" > /proc/sys/net/ipv4/tcp_max_syn_backlog



echo "262144" > /proc/sys/net/netfilter/nf_conntrack_max




worker_processes 16;

worker_rlimit_nofile 262144;



daemon off;



events {

use epoll;

worker_connections 16384;

}



error_log error.log;

pid /dev/null;



http {

sendfile on;

tcp_nopush on;



keepalive_requests 100;



open_file_cache max=100;



gzip off;

gzip_min_length 1024;



access_log off;



server {

listen *:8080 backlog=16384;



location / {

root html;

index index.html;

}

}

}



But the type of machines that the tester has used does not allow me to
believe the results.
http://lowlatencyweb.wordpress.com/2012/03/20/500000-requestssec-modern-http-servers-are-fast/

Have someone else gone along the same path? Are these system variable
changes recommended by the nginx community?

-Quintin
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

OS tuning an nginx webserver machine

Quintin Par March 20, 2012 10:56PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 241
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready