Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have some server with a huge amount of visitors (every minute, every day). Basically we had a nice fine-tuned sysctl config for this purpose. (If you don't modify it, it starts to behave strangely).

I'd like to ask the community if you could provide me one which.. well.. optimized for this purpose. Like maximizing open file limits and so on. That's what I meant.

share|improve this question
up vote 2 down vote accepted

define large activity? large number of files open? large files being transferred? lots of slow clients? This is taken off a machine that runs nginx serving 900+mb/sec of 120k or smaller images on a Quad Core Xeon 2.4. The settings on a server that does streaming content are much different. Each machine config is different based on the requirements. Blindly implementing these could make your performance better or worse.




net.ipv4.tcp_wmem = 4096 65536 4194304
net.ipv4.tcp_rmem = 4096 87380 4194304

net.ipv4.tcp_fin_timeout = 1
net.ipv4.tcp_tw_recycle = 1
net.core.wmem_max = 16777216
net.core.rmem_max = 16777216
net.core.wmem_default = 16777216
net.core.rmem_default = 16777216
net.core.netdev_max_backlog = 262144
net.core.somaxconn = 262144

net.ipv4.tcp_syncookies = 0
net.ipv4.tcp_max_orphans = 262144
net.ipv4.tcp_max_syn_backlog = 262144
net.ipv4.tcp_synack_retries = 2
net.ipv4.tcp_syn_retries = 2

While the information on this page is somewhat old, much of it still applies:

share|improve this answer
Basically it's a machine which serves out a lot of dynamic webpage requests. The page uses ajax/php. | The other one serves out about 1k image every 30 min so to say. ... What would you say for these? – Shiki Jul 3 '10 at 7:43
Does that machine have a NIC which features TCP offloading? – Matt Simmons Jul 3 '10 at 15:23
Thaaat is a really good question. I think it does. It's a very high performance dedicated server from a German provider. (If you tell me how could I check it, I'll report back ASAP!) – Shiki Jul 3 '10 at 17:05
what problems are you experiencing with your current setup that the host isn't fixing? – karmawhore Jul 3 '10 at 17:37
Basically there was some strange errors by lighttpd and the running server-side application kept crashing. The links + config helped me. Thanks. – Shiki Jul 3 '10 at 18:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.