[ntp:questions] NTP tunning for OWD measurements

Kennedy, Paul P.Kennedy at fugro.com.au
Sat Oct 27 02:40:30 UTC 2012


Pedro,

Unruh makes some good points here.  Here is a good start point ntp.conf
to get the stats logged at each server...

#@Pedro, this section will log some ASCII stats of the clock quality.  
# You can easily plot them in scipy or your tool of choice.  This is
your 'baseline' for quality assurance.
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
driftfile /var/lib/ntp/ntp.drift
# Enable this if you want statistics to be logged.
statsdir /var/log/ntpstats/
statistics loopstats peerstats sysstats 
filegen loopstats type day link enable
filegen peerstats type day link enable
filegen sysstats type day link enable


#@Pedro, chance this to your servers S1, S2.  As you are on a known
network, and conducting controlled experiments, I would strongly advise
you to NOT use internet (pool) NTP servers.
#@Pedro, make a decision on the prefererred server and make it so
server S1 iburst minpoll 3 maxpoll 4 prefer
#@Pedro, set the other servers to 'noselect', which means you will
gather the stats, but the various test sites will never flip to them,
which would screw up your tests. 
server S2 iburst minpoll 3 maxpoll 4 noselect



Pk>>By controlling which refclocks the various test sites use, you
should see they synch up well enough.  We do this regularly. Unruh makes
a very good point on the delay Vs Offset.  You should certainly be doing
this as it will reveal your QoS.  

Pk>>I would also make time series plots of Time Vs Offset with all the
test sites in the same plot.  This will give you an idea of
synchronisation over your measurement period.  They are very easy to
make in python / excel.

Pk>>Unruh also make a good point on the use of GPS, but if it is not
available, then you need to sit (and recognise you are sitting) in the
2nd class seats.  It will be important to identify and understand the
signal from the noise.  If your clock offset are out by milliseconds,
then you can only hope to measure 1 way delay better than milliseconds,
but if they are good to microsecond, then you might get meaningful
results.

Pk>>Good luck, and I hope this helps.

Regards
Pk



-----Original Message-----
From: questions-bounces+p.kennedy=fugro.com.au at lists.ntp.org
[mailto:questions-bounces+p.kennedy=fugro.com.au at lists.ntp.org] On
Behalf Of unruh
Sent: Saturday, 27 October 2012 8:42 AM
To: questions at lists.ntp.org
Subject: Re: [ntp:questions] NTP tunning for OWD measurements

On 2012-10-26, pret3nder at gmail.com <pret3nder at gmail.com> wrote:
> An NREN is a National Research and Education Network. 
> We are talking about 26 servers spread all over the country and in the

> islands, so your figures are a bit off, I'm afraid. $50 don't cover 
> the expenses associated with getting a GPS for every single server, 
> and like I said before, it's simply undoable.
>
> And I'm just a student, I don't get any payment for this, instead I 
> pay my tuition - as I should. But this is getting out of subject :-)

Agreed. It is your supervisor that should pay for that. 
I suspect that you will discover that there is a huge (millisecond
level) jitter in the network. As was suggested, your first thing to do,
before doing anything else, should be to get ntpd running on all the
machines ( you probably already have it) making sure that the
"measurements" log is active statistics peerstats in /etc/ntp.conf with
the servers being those level 1 servers you mentioned. 

Then after a few days of running, plot the offset against the delay, and
look at that graph. You may well notice wings on that graph with slope
of 1/2 . Those are asymmetric delays. The spread of the central blob
will also give you an idea of the noise on your connection. 

Now with that information, you can begin to make plans and to know what
kind of errors to expect, and to compare them with the requirements. 

Then, get your supervisor to put out for a a few gps receivers, wire
them up so that they can simply be plugged in, and send them to the IT
guys at the a few of the sites. Set up ntp to use pps on those sites,
and now you can accurately determine the one way delays between those
sites. You can now get an estimate of the assymetry of the connections,
and compare that the overall network noise. 

>
> Anyway, thanks for your remarks and suggestions.
>
> Pedro
>
>
>
> On Saturday, October 27, 2012 12:31:28 AM UTC+1, unruh wrote:
>> On 2012-10-26, pret3nder at gmail.com <pret3nder at gmail.com> wrote:
>> 
>> > Hi all, and thank you for your answers. I'm afraid I might not have
>> 
>> > been clear about my objectives, so I'll try to explain clearer.
>> 
>> > I'll also try and keep the lines smaller, and please, excuse me if
>> 
>> > I make any mistakes, as english is not my native language.
>> 
>> >
>> 
>> > This project involves a NREN, which interconnects several
institutions.
>> 
>> 
>> 
>> Whatever and NREN is. 
>> 
>> 
>> 
>> > The current architecture is as follows: two main servers (let's 
>> > call it S1 and S2)
>> 
>> > placed in the NREN infrastructure at two different places in the 
>> > country,
>> 
>> > and several servers (X1, X2, Xi) placed at the edge of the
institutions before mentioned.
>> 
>> > The objective is to do one-way delay tests between S1/S2 <-> Xi, so

>> > we can
>> 
>> > measure one-way latency between the main servers and the servers 
>> > placed at each
>> 
>> > institution.
>> 
>> 
>> 
>> To measure one way latency you MUST have accurate time sources at 
>> each
>> 
>> end of the one way link. 
>> 
>> 
>> 
>> >
>> 
>> > With this being said, I'll try now to answer some questions. 
>> 
>> > I can't use GPS/PPS attached to the institutions servers because 
>> > one) we do
>> 
>> > not have physical access to the servers in the institutions and 
>> > two) it would
>> 
>> > carry an extra cost that the NREN is not willing to afford.
>> 
>> 
>> 
>> ??? An adequate  gps can be had for $50, so if I place one at each
>> 
>> place, the total cost is of order a few hundred dollars. Ie,  less
>> 
>> than your salary for a week, and certainly less than your salary 
>> while
>> 
>> doing this research. 
>> 
>> >
>> 
>> > Also, I don't want to use NTP to directly measure the one-way 
>> > delay, I have OWAMP
>> 
>> > (more specifically perfSonar - 
>> > http://www.internet2.edu/performance/pS-PS/)
>> 
>> > to do that for me.
>> 
>> 
>> 
>> It does not matter what you use to measure the delay, you need 
>> accurate
>> 
>> times at both ends to do so. 
>> 
>> 
>> 
>> 
>> 
>> >
>> 
>> > Now, I mentioned I have access to four stratum 1 servers (with 
>> > GPS/PPS attached)
>> 
>> > which are placed in different locations around the country. I plan 
>> > to use
>> 
>> > these as time servers for both S1/S2 and X1, X2, Xi servers. 
>> > Currently,
>> 
>> > I only use one of them, and it's the same across S1/S2 and Xi
servers.
>> 
>> 
>> 
>> OK, It is up to you. However, there is a reasonable chance that there

>> is
>> 
>> a differential timing delay to some of your S1/2 X1,2.... machines. 
>> 
>> 
>> 
>> >
>> 
>> > What I really want to know is how far can I go in tuning the NTP
>> 
>> > configuration in the stratum 1 servers and in the clients (S1/S2, 
>> > Xi)
>> 
>> > to obtain the best possible measurements from OWAMP.
>> 
>> 
>> 
>> You cannot go any further than the differential delay between them. 
>> 
>> 
>> 
>> > Or, what can I do to reduce the offset of the clocks of the hosts 
>> > involved
>> 
>> > in the measurements, having these resources (access to four stratum

>> > 1
>> 
>> > servers and a network with almost no jitter at all), so that it has

>> > a minimum
>> 
>> > impact in the OWD measurements?
>> 
>> 
>> 
>> Nothing, since you have ruled out the one thing you can do.
>> 
>> 
>> 
>> The delays are affected by speed of light in copper wires, the speed 
>> of
>> 
>> the switches and routers along the paths the signals take, etc. You 
>> can
>> 
>> get an estimate by, as I said, plotting the delay vs the offset. from
>> 
>> the ntp servers. Since you want to minimize the offset, not the drift
>> 
>> rate of the clocks, you want to make frequent queries of the ntp
>> 
>> servers-- but to do that you had better get permission from those
>> 
>> servers. 
>> 
>> 
>> 
>> 
>> 
>> >
>> 
>> > Hope I've made myself clearer this time.
>> 
>> 
>> 
>> Hope I have made myself clearer.
>> 
>> 
>> 
>> >
>> 
>> > Kind Regards,
>> 
>> > Pedro
>> 
>> >
>> 
>> >
>> 
>> > On Friday, October 26, 2012 6:14:33 PM UTC+1, unruh wrote:
>> 
>> >> On 2012-10-26, pret3nder at gmail.com <pret3nder at gmail.com> wrote:
>> 
>> >> 
>> 
>> >> > Hi all,
>> 
>> >> 
>> 
>> >> >
>> 
>> >> 
>> 
>> >> > my name is Pedro Queir?s and I'm currently working on my master
thesis related to open source probes to measure the QoS of internet
links.
>> 
>> >> 
>> 
>> >> > One of the tools I'm using is OWAMP
(http://www.internet2.edu/performance/owamp/), to measure one-way delay
between hosts. This tool requires NTP running and synchronizing clocks
so that it can measure correctly (to a certain point) the one-way delay
between hosts.
>> 
>> >> 
>> 
>> >> >
>> 
>> >> 
>> 
>> >> 
>> 
>> >> 
>> 
>> >> If the one way delays between the hosts are consistantly 
>> >> different, then
>> 
>> >> 
>> 
>> >> ntp is no good. The best way is to put up a gps clock on each 
>> >> computer,
>> 
>> >> 
>> 
>> >> and use that to set the time on each machine. Then the ntp offset
>> 
>> >> 
>> 
>> >> between the computers, and the roundtrip delay will tell you 
>> >> exactly
>> 
>> >> 
>> 
>> >> what the one way delay is for each trip. 
>> 
>> >> 
>> 
>> >> 
>> 
>> >> 
>> 
>> >> You can get an estimate of the scatter of the one way delays be 
>> >> plotting
>> 
>> >> 
>> 
>> >> the delay vs the offset for the clock. It will show clearly the
>> 
>> >> 
>> 
>> >> differences in one way delays, but unfortunately will not show any
>> 
>> >> 
>> 
>> >> consistant offset.
>> 
>> >> 
>> 
>> >> 
>> 
>> >> 
>> 
>> >> > Now, after reading some articles on NTP, PTP, RADclock, I'm
wondering what can I do to improve the NTP configuration, so clocks on
my hosts are as close together as possible and measurements are as
accurate as possible.
>> 
>> >> 
>> 
>> >> 
>> 
>> >> 
>> 
>> >> Yes, put a gps clock on each of them. 
>> 
>> >> 
>> 
>> >> 
>> 
>> >> 
>> 
>> >> 
>> 
>> >> 
>> 
>> >> > Following the suggestion on some of the RADclock articles I've
read, I've configured my hosts with the minpoll/maxpoll 4 iburst options
and I'm only using one stratum 1 server on ntpd.conf.
>> 
>> >> 
>> 
>> >> > I have access to four stratum 1 servers scattered around the
country (Portugal), using GPS as the source for true time, but I have
not messed with their configuration.
>> 
>> >> 
>> 
>> >> >
>> 
>> >> 
>> 
>> >> > What I'm looking for are ways to tune the configuration of both
stratum 1 servers and the hosts I'm doing the measurements on (clients
of the stratum 1 NTP servers), so I can have results as accurate as
possible of the one-way delay between hosts.
>> 
>> >> 
>> 
>> >> > Please keep in mind that I don't want to use external time
sources on my hosts, but I have them on the stratum 1 servers.
>> 
>> >> 
>> 
>> >> 
>> 
>> >> 
>> 
>> >> Why not? They are not expensive. Why not use the best possible 
>> >> setup for
>> 
>> >> 
>> 
>> >> your work, instead of trying to kludge together a second best
>> 
>> >> 
>> 
>> >> possibility.
>> 
>> >> 
>> 
>> >> 
>> 
>> >> 
>> 
>> >> 
>> 
>> >> 
>> 
>> >> > My network consists of fiber optic links to connect several
institutions together, so we have very low jitter. Here is the output of
ntpq -p on one of the hosts:
>> 
>> >> 
>> 
>> >> >
>> 
>> >> 
>> 
>> >> > [alias at probe ~]$ ntpq -p
>> 
>> >> 
>> 
>> >> >      remote           refid      st t when poll reach   delay
offset  jitter
>> 
>> >> 
>> 
>> >> >===============================================================
>> 
>> >> 
>> 
>> >> > *xxx01.xxx.pt  .DCFa.           1 u   12   16  377    5.686
0.082   0.384
>> 
>> >> 
>> 
>> >> >
>> 
>> >> 
>> 
>> >> > If you need more information about my current setup
(configurations, setup, locations, distances, etc), feel free to ask.
>> 
>> >> 
>> 
>> >> >
>> 
>> >> 
>> 
>> >> > Thank you for your time!
>> 
>> >> 
>> 
>> >> >
>> 
>> >> 
>> 
>> >> >
>> 
>> >> 
>> 
>> >> > Kind Regards,
>> 
>> >> 
>> 
>> >> > Pedro

_______________________________________________
questions mailing list
questions at lists.ntp.org
http://lists.ntp.org/listinfo/questions


More information about the questions mailing list