Maybe somebody will be able to help me out with this. I'm trying to find out if there is anything that can be optimized server-side to reduce delays in case of packet loss.
Environment: Windows 2012 client, CentOS 6.x server [Couchbase], same datacenter, busy LAN with firewalls to traverse. Both are large physical servers with plenty of spare capacity.
Issue: as measured from the client, response times are nicely distributed around ~1ms, but we see a spike at ~200ms.
A network trace shows this:
- Client -> send request
- Server -> replies (1 ms) with a packet with {application response + TCP ack to request packet} (78 bytes in this case)
- The packet is NOT received by the client
- after ~30 ms, the client TCP stack retransmits the original request
- The server replies immediately with a DUP ACK (66 bytes, does not contain the application response)
- After ~200 ms from the initial request, the server retransmits the original response (78 bytes packet).
Any idea where does this 200ms delay come from, and how to reduce it? I'd guess some combination of tcp delayed acks, nagle and congestion/RTO algorithms, but linux kernel tuning is a bit of a mystery to me.
Any suggestion?