Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suggested TCP socket settings for low latency and small packets

I'm wondering if there are tweaks I can do to a TCP socket, except disabling Nagle, in order to get the lowest possible latency for a client-server protocol with predominantly small packets.

Client packet are mostly smaller than 100 bytes, server packets 100-300 bytes in size.

I'm using java on the server end and (objective-) c on the client side.

like image 361
Nuoji Avatar asked Nov 13 '22 00:11

Nuoji


1 Answers

You may want to consider reducing delayed ack timeout (if possible). Even though Nagle is turned off, in a situation where you send packets infrequently and packet loss has occurred, delayed ack could cause delay in packet loss detection then retransmission delay.

like image 185
enobufs Avatar answered Dec 06 '22 22:12

enobufs