On Wed, Aug 20, 2025 at 01:29:31PM -0700, Jacob Keller wrote: > On 8/20/2025 12:56 AM, Miroslav Lichvar wrote: > > Without the patch: > > NTP daemon TX timestamps : 35835 > > NTP kernel TX timestamps : 1410956 > > NTP hardware TX timestamps : 581575 > > > > With the patch: > > NTP daemon TX timestamps : 476908 > > NTP kernel TX timestamps : 646146 > > NTP hardware TX timestamps : 412095 > > > > When does the NTP daemon decide to go with timestamping within the > daemon vs timestamping in the kernel? It seems odd that we don't achieve > 100% kernel timestamps...
Yes, it is odd. The daemon uses the best timestamp it has when the new request comes from the client asking for the TX timestamp of the previous response. With 16384 clients and 200000 requests per second, that's 12 milliseconds between two requests of a client. I tried increasing the receive buffer size of the server UDP socket and also increase the number of clients to make the server wait longer for the SW TX timestamps, but that didn't help. It looks like they are lost. Due to the way the server implements the interleaved mode, it's the first two exchanges with a client always have the TX daemon timestamp, so the "without the patch" result above has only 35835 - 2 * 16384 = 3067 missing SW or HW timestamps (1.5% of all responses), but "with the patch" it is 476908 - 2 * 16384 = 444140 (28.9% of all responses). -- Miroslav Lichvar
