Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have a few dedicated server rented in a data center with debian 7, kernel 3.2.

We use one of those servers as a database server. The network between our application server and database server is not dedicated to us but is used by other customers of the data center.

From time to time we recognize TCP retransmissions on this line. We think it is due to congestion or ddos attacks. Our provider tries to prevent attacks but is not always successful immediately of course.

Anyway. Usually our application server gets results from the database within 20 milliseconds as the database servers are very fast and the round-trip-time (RTT) average is 0.3 ms (so under 1 ms).

When a TCP packet is lost on this line the retransmission time out (RTO) kicks in. It is calculated by the round-trip-time but is at least 200ms. So when one packet needs to be retransmitted we have 220 milliseconds before our application server gets its data just because of the RTO.

For me rto_min=200ms seems to be way to high for a link with rtt under 1ms.

It is possible to set the rto_min with ip like this:

ip route change default via dev eth0 rto_min 5ms

RTO is still calculated but can get down to 5ms as our RTT is very small.

Should I consider this or are there other TCP pitfalls I will fall into setting the rto_min so small? What is a resonable value for rto_min or is it better not to touch it?

share|improve this question
What happens if your DB server gets bogged down? –  NickW Oct 28 '13 at 16:16
I guess rto_min should be set not with regard to current latency, but w.r.t. sizes of buffers along the way and bandwidth. For example in presence of traffic bursts switch/router can hold frame/packet for couple of milliseconds. –  SaveTheRbtz Oct 28 '13 at 21:22
@NickW If the database server is gone there would be one fast retransmission. And after a dozens of retransmissions the connection will be reset. And I guess the calculated RTO would raise while sending retransmissions. I don't think its a problem, but that is exactly my questions. Are there problems within the TCP stack when I lower my rto_min –  Janning Oct 29 '13 at 8:12
@SaveTheRbtz RTO is calculated only by latency. Why should I set it with regard to buffers? –  Janning Oct 29 '13 at 8:13
@Janning max latency is proportional to cumulative size of all buffers along the way. Speed of light is negligible in your case. –  SaveTheRbtz Oct 29 '13 at 20:21

Your Answer


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

Browse other questions tagged or ask your own question.