Subject: Re: [ippm] RFC 2679 : comment on time handling

From: Henk Uijterwaal <[email-masked]>
Date: Mon, 03 May 2010 11:05:42 +0200

Jeroma,

> There's a lot of details I've skipped but I wanted to expose the
> general idea.

So, if I get this right:

1. S1 asks A1 to send a packet D1 from now.
2. A1 waits for D1 seconds
3. S1 knows that the packet must have left at T1=T(a1)+D1
4. A1 sends packet at T(a1)+d1
5. Packet arrives at T2.
6. S1 assumes T(a1) == T(s1).
7. Wire-time = T2 - T1 = T2 - T(a1) - D1

This is correct if all clocks run at exactly the same speed, that is, 
T(s1)=T(a1).  If the clock at A1 runs slow (or fast), this won't be
correct anymore.

Henk

-- 
------------------------------------------------------------------------------
Henk Uijterwaal                           Email: henk.uijterwaal(at)ripe.net
RIPE Network Coordination Centre          http://www.xs4all.nl/~henku
P.O.Box 10096          Singel 258         Phone: +31.20.5354414
1001 EB Amsterdam      1016 AB Amsterdam  Fax: +31.20.5354445
The Netherlands        The Netherlands    Mobile: +31.6.55861746
------------------------------------------------------------------------------

Nobody ever went broke underestimating the taste of the American public.
                                                                  H.L.Mencken

---

From: Jerome Benoit <[email-masked]>
Date: Tue, 4 May 2010 16:22:11 +0200

Le Mon, 03 May 2010 11:05:42 +0200,

> 2. A1 waits for D1 seconds
                   ^ + Error
> 3. S1 knows that the packet must have left at T1=T(a1)+D1

+ E1 where E1 represent the deviation computed via the time
inaccuracy calibration mechanism (which might be not easy to compute
from a statistical analysis, I do not know yet). 

> 6. S1 assumes T(a1) == T(s1).
                     ^ + Error
> T(s1)=T(a1).  If the clock at A1 runs slow (or fast), this won't be

Well, having the same clock speed on S1 and agents will probably
minimize the deviation. 

The deviation will be the hard part is this scheme :
- inaccuracy with packet travel time will be part of it;
- server clock inaccuracy will also be part of it;
- agent clock inaccuracy will also be part of it. 
- runtime ... 

Yes, that's a lot to aggregate, it should probably be easier to
implement a simple NTP client in agents et standard mechanisms to
compute on agent the clock inaccuracy :)

Regards,

-- 
Jérôme Benoit aka fraggle
La Météo du Net - http://grenouille.com
OpenPGP Key ID : 9FE9161D
Key fingerprint : 9CA4 0249 AF57 A35B 34B3 AC15 FAA0 CB50 9FE9 161D

---

From: Henk Uijterwaal <[email-masked]>
Date: Tue, 04 May 2010 19:17:04 +0200

> compute on agent the clock inaccuracy :)

This is exactly my point.  By the time you start putting a simple
NTP client on the agents, you start synchronizing the clock to
external source(s) and might as well go the whole way to do the
synchronization properly.

Henk