1. 39
  1.  

  2. 10

    It seems the 40ms don’t come from Nagle’s algorithm as much as they come from delayed acks:

    Some applications that send small network packets could experience latencies due to the TCP quick and delayed acknowledgment timeouts, which previously were 40 ms by default. […] To minimize this issue, both tcp_ato_min and tcp_delack_min timeouts are now 4 ms by default.

    Although John Nagle mentions over at the orange site that the timeout for delayed acks used to be 200ms (!)

    1. 7

      Nagle’s algorithm hits if you receive a request, process it, send a tiny reply (smaller than one packet), send it and don’t close the socket. This is precisely what some well-written web services do — they respond with just a 204 or 304 response, or 200 response with a tiny bit of JSON, and then wait for the client to send another request.

    2. 5

      I winced, that the fixes from the first fork weren’t offered back to the main project.

      1. 1

        While I understand the principle, I’m not sure 40ms is reasonable. I suspect 1ms would be plenty.

        The impact of latency sure is underestimated. Nobody seems to care about it, and it adds up.

        1. 4

          Everyone cares (even if indirectly) about it but it’s a ‘systems’ problem with a number of local maxima and global minima type of solutions floating around, and it is rarely phrased as latency but as something else. It’s the same in input device-, audio- and video- processing.

          1. Anyone in the processing chain can mess things up.
          2. Legacy accumulates scantly measured ‘hot fixes’ that works around some quality issue by from 1. where the lack of agency leads the implementor to add buffers and/or more asynch queue tricks.
          3. From the perspective of a third party, the fix in ‘2’ is observed as a ‘1’ and this third party adds their own take of ‘2’.

          Let this spin for a while and here we are. Network communication also has the fun property of being so important that it attracts more sinister actors – everyone wants to eavesdrop and censor or tweak the message a little here and there, hence the slow death of once nice things such a ‘ports’. Plot down the set of hacks needed to generally get around the infinite f-fest that is the dreaded enemy ‘airport wifi’ and you get a nice chart that begs the rhetorical question of just what the hell are we doing?

          With the option of fixing TCP being practically non-existing, enjoy going after router firmware, the last resort becomes some self-mutating reimagination over UDP to counter all the learning that routers try to do. Just wait until you also get ‘AI optimization’ in home routers that then gets deployed on the cheap in places that turn out to be infrastructure.