kazu-yamamoto / network-run

Simple network runner library in Haskell
BSD 3-Clause "New" or "Revised" License
10 stars 5 forks source link

Enable `TCP_QUICKACK` by default #10

Open edsko opened 2 months ago

edsko commented 2 months ago

(This was previously mentioned on #6, recording this as a separate issue so that we don't lose track of it.)

It might be useful to enable TCP_QUICKACK by default in network-run; see https://news.ycombinator.com/item?id=10608356 by John Nagle (he of TCP fame) himself.

Note that TCP_QUICKACK at least on Linux is a one-time thing; from the man page

This flag is not permanent, it only enables a switch to or from quickack mode. Subsequent operation of the TCP protocol will once again enter/leave quickack mode depending on internal protocol processing and factors such as delayed ack timeouts occurring and data transfer.

This is not a blocker for us by any means, merely an optimization.

kazu-yamamoto commented 2 months ago

Sorry. I found this today. Please sent a PR to record your credit.

edsko commented 2 months ago

Don't worry, this isn't particularly urgent, it's an optimization only. I think it's actually a bit more difficult to do then just setting other options, because it needs to be set each time data is received from the socket (I think, not certain actually). Not yet sure if I'll have the time to submit a PR for this, I opened the issue primarily so that we wouldn't forget about this altogether.