[time-nuts] Re: Using NTP Server Time To Measure WAN Performance

Hal Murray halmurray at sonic.net
Thu Mar 23 01:43:12 UTC 2023


Richard Fleeson said:
> Can anyone recommend a low cost or freeware way to measure packet delay and
> packet jitter using NTP associations or IEEE-1588?

How accurate an answer do you want?  Do you want one-way timing, or round trip?

If you turn on logging, ntpd will make log files.  One has it's opinion of the 
local clock accuracy.  Another has 4 time stamps from each request-response 
pair:
  the time the request left the client
  the time the request arrived at the server
  the time the response left the server
  the time the response arrived at the client
NTP assumes the transit times are equal and works out the difference between 
the client clock and the server clock.  If you assume the clocks are equal, 
you can get the one way transit times.

If you want good one-way timing, you need good time at both ends.  What do you 
already have in the way of NTP servers?

Assuming you have good-enough servers, either local or nearby, then it's easy 
to collect data.  Just setup ntpd with logging, then add all the servers you 
want to watch with "noselect".

NTP doesn't need a lot of cycles.  An old PC or corner of a server will 
probably be fine.  It's easy to try.

The crystal on a system that does the timekeeping changes frequency with 
temperature.  On modern systems, the heat varies with load.  Things may work 
better on a box that isn't doing anything else.


If your local NTP servers aren't good enough, then you need some way to get 
better time.

The usual approach is GPS.

GPS is unlikely to work in a machine room.  Too much EMI.  It might work in an 
office window.  (Some windows have metalic coatings to reflect sun.)  It's 
easy to try.  If not, you will need an antenna on the roof -- or an alternate 
plan.

You can get 1U NTP/GPS boxes.  I'm not familiar with what's currently 
available.

The low cost approach is to plug a small GPS unit into a PC.  Some assembly 
(soldering) probably required.  Again, I don't have specific suggestions.  
Sorry.

You need PPS (pulse per second) for good timing.  The timing on the serial 
stream is generally crap.   With PPS, you need a real serial port or GPIO pin. 
 The polling on USB adds 1ms of noise.


There are several GPS-HATs available for Raspberry Pis.  If you use a Pi 4, 
that avoids 125 microseconds (1/8th ms) of noise/jitter on the USB ethernet.  
Raspberry Pis are hard to find these days.


Poke me off list if you want help with any of that.


-- 
These are my opinions.  I hate spam.






More information about the Time-nuts_lists.febo.com mailing list