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

I have website that gets higher tcp timeouts at peak times and slows down bit, here are few stat graphs

sysctl config atm:

net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 4294967296

any idea what i should change/add to config?

share|improve this question
TCP timeouts may not be caused by a kernel issue. More likely it is something with the application taking too long and causing connections to be abandoned. You might look at the number of open file handles, that is often a limiting factor on Redhat/CentOS systems. Can you offer more details about the applications and any complaints from users? – mfarver Aug 24 '10 at 23:18
up vote 1 down vote accepted

My first guess is that you're seeing your network receive buffers fill up, in which case you might want to increase them with the sysctl.

You might be seeing a lot of dropped connections in TIME_WAIT, in which case you might want to drop the timeout with net.ipv4.vs.timeout_timewait.

Both of these should be identifiable with netstat.

Your application's socket buffers might be too small, too; you can bump them up with the net.core.rmem_max, net.core.wmem_max, and net.ipv4.tcp_rmem and net.ipv4.tcp_wmem. This is probably not the case, though, but if you're getting a lot of traffic you might find increasing these socket buffer queue sizes helps you handle the traffic.

Remember to measure before and after you change each value. I recommend googling for them to understand their behaviour so you can better apply them to your use case.

share|improve this answer

Your Answer


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