diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-09-27 18:01:53 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-09-27 18:01:53 -0700 |
commit | 7774d770f0021e25a644e85ad404e8acb7b81afc (patch) | |
tree | 64e916fe055ca89a0513ca65cd46bfca8ddfe461 | |
parent | 3c873b25891b6aa3c46b29026dc8c4011dd18bc7 (diff) | |
download | unicorn-7774d770f0021e25a644e85ad404e8acb7b81afc.tar.gz |
Based on the experiences of Tom Preston-Werner: http://thread.gmane.org/gmane.comp.lang.ruby.unicorn.general/24/focus=28
-rw-r--r-- | TUNING | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -12,6 +12,12 @@ See Unicorn::Configurator for details on the config file format. directives can allow failover to happen more quickly if your cluster is configured for it. +* If you're doing extremely simple benchmarks and getting connection + errors under high request rates, increasing your :backlog parameter + above the already-generous default of 1024 can help avoid connection + errors. Keep in mind this is not recommended for real traffic if + you have another machine to failover to (see above). + * :rcvbuf and :sndbuf parameters generally do not need to be set for TCP listeners under Linux 2.6 because auto-tuning is enabled. UNIX domain sockets do not have auto-tuning buffer sizes; so increasing those will @@ -45,7 +51,8 @@ WARNING: Do not change system parameters unless you know what you're doing! * For load testing/benchmarking with UNIX domain sockets, you should consider increasing net.core.somaxconn or else nginx will start - failing to connect under heavy load. + failing to connect under heavy load. You may also consider setting + a higher :backlog to listen on as noted earlier. * If you're running out of local ports, consider lowering net.ipv4.tcp_fin_timeout to 20-30 (default: 60 seconds). Also |