How well are the Google app servers sync'd to UTC(NIST)? Can you spare an instance?

45 views
Skip to first unread message

Cesium

unread,
Apr 30, 2008, 1:08:09 PM4/30/08
to Google App Engine
My app will require that the Google app servers be tightly
synchronized to UTC(NIST).
How well? I' like to see errors of much less than 1 sec.

Does anyone know how closely datetime's result is to UTC(NIST)?

Can you spare an instance of a webapp in your application?
E.g.,

class TimePage(webapp.RequestHandler):
def get(self):
self.response.headers['Content-Type'] = 'text/plain'
self.response.out.write(str(datetime.utcnow())+'\r\n')

If you would implement this for me, I'll perform all the delta-T
measurements and
post them here.

Thanks,
David (cesium)

ryan

unread,
May 3, 2008, 5:14:22 PM5/3/08
to Google App Engine
system time in the production environment will be roughly accurate,
but we don't make any guarantees about either accuracy or
synchronization between different app engine servers. you'll likely
see differences of at least a few seconds, in general, if not more.

if you do an experiment, please do post your results! we'd be happy to
see them.

majek04

unread,
May 3, 2008, 6:34:40 PM5/3/08
to google-a...@googlegroups.com

I tried to check it, but it's not so easy. I haven't found any time source
on the web with millisecond precision.

I created script that prints time delta between current time and time.gov.
(it's with second precision)

I haven't found any GAE server that had constant deviation more than 1.0 second.
(on the other hand it seems that my application is deployed on only one server,
so please recheck my results)

My results show that the delta is from 0.1 (0.4-0.5 is most common) to
0.8 seconds.
That time is probably caused by urlfetch delays.

From the results I saw we can safely assume that the difference
from UTC isn't greater than 1 second.

Cheers!
Marek Majkowski

[1] Sample output:
server_id: '7341146770217830363'
utc_mean_square_error_seconds: 0.20000000000000001
wgettime_mean_square_error_seconds: 0.05742634262442721
wgettimes_seconds:
- 0.093528032302856445
- 0.092205047607421875
- 0.36270403861999512
- 0.092053890228271484
- 0.26064896583557129
- 0.56454706192016602
- 0.094745874404907227
- 0.096636056900024414
- 0.074376106262207031
- 0.080545902252197266
utc_diffs_seconds:
- 0.0
- 0.0
- 0.0
- 0.0
- 1.0
- 0.0
- 0.0
- 0.0
- 0.0
- 1.0


[2] Source:
http://ai.pjwstk.edu.pl/~majek/dump/gae-time-sync.py

Cesium

unread,
May 4, 2008, 12:15:53 PM5/4/08
to Google App Engine
Nicely done!

I was going to use either time-a.timefreq.bldrdoc.gov or www.time.gov:8013
as well.

I thought they had millisecond precision, but the dataStore in my head
hit the quota
limits long ago when I wrote that code at NIST:

http://scholar.google.com/scholar?as_q=&num=10&btnG=Search+Scholar&as_epq=&as_oq=atomic+clock&as_eq=&as_occt=any&as_sauthors=%22WD+Lee%22&as_publication=&as_ylo=&as_yhi=&as_allsubj=all&hl=en&lr=

I think I can re-structure my app so that it uses the NIST time
servers for sync, and then
uses GAE for webapp goodness.

David Lee (cesium)




Reply all
Reply to author
Forward
0 new messages