On Jun 29, 2016, at 4:17 PM, Dan Drown <[email protected]> wrote: > Quoting Charles Swiger <[email protected]>: >> If you'd like to consider things at layer 3, note that IPv4 normally has a >> 20-byte header size, and IPv6 has a 40-byte header. For large packets, the >> difference in protocol overhead is not very significant-- about 1%-- but for >> a 56-byte NTPv4 packet, using IPv6 means sending about 125% as many bits >> over the wire as sending the same payload via IPv4. >> >> If other factors are held equal, IPv4 is always going to perform better than >> IPv6 for NTP because smaller packets mean shorter transmit/receive times and >> thus reduced latency for NTP polls. >> >> (There's nothing magical about protocol overhead, except perhaps pretending >> that there isn't a difference. :-) > > But is it a difference that matters?
Excellent question. For timekeeping over the WAN, usually not. For timekeeping within your LAN, where a difference measured in microseconds is noticeable (hopefully?), then perhaps. > Typical NTP packet sizes in bytes: > > v4: 14(ethernet) + 20(IPv4) + 8(UDP) + 48(NTP) = 90 bytes > v6: 14(ethernet) + 40(IPv6) + 8(UDP) + 48(NTP) = 110 bytes > > At 100Mbit, these take 7.2us(v4) and 8.8us(v6) to transmit (I'm ignoring > preamble and inter-packet gap) > > At 1G, these take 720ns and 880ns to transmit. You'd also need to consider 4b5b or 8b10b encoding of the frame onto the wire format for copper ethernet, or QAM / phased-shift-keying representations for OC for wide-area links. Which is the main reason why I stuck to layer-3 and mentioned "If other factors are held equal..." rather than pulling layer-1/2 into the discussion. > Compare that 3.2us round-trip difference at 100M to the other sources of > measurement error: > > Typical LAN jitter (counting switch and OS buffers in this category) is in > the 10's to 100's of us. Interrupt latency jitter is in the 1us-10us range. Switch traversal latency and jitter is relevant, but if we care about microsecond-level timing, then using PTP-aware switches allows one to have that be measured and be reasonably well-defined. OS processing latency from network buffering and interupt service time may or may not be relevant-- but hopefully not. Hardware timestamping is available which provides a high-quality timestamp taken by the NIC upon packet receipt such that the OS can later determine how much extra time was needed to process the packet internally. > I believe a typical default NIC interrupt coalescing setting is in the 3us > range. Gracious, no-- even 10GB ethernet tends to have interrupt coalescing at 25 - 75 us. Fast ethernet tended to have interrupt coalescing at the millisecond range, and gigabit ethernet is usually set at hundreds of microseconds. > Additionally, the extra latency due to additional size is both a static > offset and a symmetrical offset. NTP already accounts for those, it has > trouble with varying and asymmetric offsets. Yes, that's certainly a valid point. Regards, -- -Chuck _______________________________________________ pool mailing list [email protected] http://lists.ntp.org/listinfo/pool
