Hello ! Just a quick question about time synchronization between xen dom0 and domUs... We''re running Xen 3.1 64-bit, with 32 and 64 bits linux guests. It''s up since 89 days and the domU''s time is around 5 minutes behind the dom0, which is updated via ntpdate... Any idea why it doesn''t sync the guests even that /proc/sys/xen/independent_wallclock is 0 ? Could it be an option that I missed in dom0/domU kernel ? Thanks for your help ! -- Sébastien Riccio SwissCenter / OpenBusiness SA sr@openbusiness.com ________________________________________________ OpenBusiness S.A. World Trade Center Av Gratta-Paille 1-2 Tel: +41 21 641 1010 CH-1000 Lausanne 30 FAX: +41 21 641 1011 Switzerland www.openbusiness.ch __________________________________________________________________________ Disclaimer This email is confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the OpenBusiness Group. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copy-ing of this email is strictly prohibited. If you have received this email in error please notify the OpenBusiness help-desk by telephone on +41 21 641 10 10. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
You''re not running ntpd in the domU as well, right? Just worth checking... Apart from that I don''t think you can be doing anything wrong. Any weirdness after long uptime is of course interesting, as it''s something that''s hard for developers to test. If you create a new domU (doesn''t need to be from scratch installation - e.g., just restarting a domU, or starting an existing dormant domU, would do) then is its time behind dom0, or in sync? -- Keir On 3/9/07 08:45, "Sébastien RICCIO" <sr@swisscenter.com> wrote:> Hello ! > > Just a quick question about time synchronization between xen dom0 and > domUs... > > We''re running Xen 3.1 64-bit, with 32 and 64 bits linux guests. > > It''s up since 89 days and the domU''s time is around 5 minutes behind the > dom0, > which is updated via ntpdate... > > Any idea why it doesn''t sync the guests even that > /proc/sys/xen/independent_wallclock is 0 ? > > Could it be an option that I missed in dom0/domU kernel ? > > Thanks for your help ! >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Hi Keir, Thank you for your answer. Ntpd is not running in dom0. I am updating the dom0 time with ntpdate (crontab every hour). Should ntpd be running on dom0 ? Dom0 [root@xen01 /]# date Mon Sep 3 15:59:37 CEST 2007 DomU (started 5 hours ago) ns1 bin # date Mon Sep 3 15:58:05 CEST 2007 ns1 bin # uptime 15:58:10 up 5:21, 3 users, load average: 0.00, 0.00, 0.11 But this is strange... I just rebooted the vm: Dom0: [root@xen01 /]# date Mon Sep 3 16:04:13 CEST 2007 DomU: ns1 ~ # date Mon Sep 3 16:02:41 CEST 2007 There is already a difference when the vm is freshly rebooted. Same after a shutdown/xm create.... Weird... Any idea ? Thanks again! -- Sébastien Riccio SwissCenter / OpenBusiness SA sr@openbusiness.com Keir Fraser a écrit :> You''re not running ntpd in the domU as well, right? Just worth checking... > Apart from that I don''t think you can be doing anything wrong. Any weirdness > after long uptime is of course interesting, as it''s something that''s hard > for developers to test. > > If you create a new domU (doesn''t need to be from scratch installation - > e.g., just restarting a domU, or starting an existing dormant domU, would > do) then is its time behind dom0, or in sync? > > -- Keir > > On 3/9/07 08:45, "Sébastien RICCIO" <sr@swisscenter.com> wrote: > > >> Hello ! >> >> Just a quick question about time synchronization between xen dom0 and >> domUs... >> >> We''re running Xen 3.1 64-bit, with 32 and 64 bits linux guests. >> >> It''s up since 89 days and the domU''s time is around 5 minutes behind the >> dom0, >> which is updated via ntpdate... >> >> Any idea why it doesn''t sync the guests even that >> /proc/sys/xen/independent_wallclock is 0 ? >> >> Could it be an option that I missed in dom0/domU kernel ? >> >> Thanks for your help ! >> >> > > > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 3/9/07 15:07, "Sébastien RICCIO" <sr@swisscenter.com> wrote:> Ntpd is not running in dom0. I am updating the dom0 time with ntpdate > (crontab every hour). > Should ntpd be running on dom0 ?So long as ntpdate calls settimeofday(), this should be sufficient to update Xen''s notion of time too. It seems that isn''t happening for some reason. Do all guests (including dom0) have independent_wallclock equal to 0? What kernel are you using in dom0 (e.g., vendor kernel?). Ntpd in dom0 would be an interesting thing to try. That should cause dom0 to periodically (every few minutes) push its time down to Xen to be picked up by all domUs. But really ntpdate should be doing the right thing... In our kernels it should be *impossible* for dom0 and domU time to diverge when independent_wallclock is set to zero everywhere... -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Hi again, I just tried to use ntpd in dom0. So far nothing changed. The guests are still a couple of minutes behind the dom0. Dom0 and DomU''s are set to independent_wallclock 0. Kernels are compiled from the sources included in Xen 3.1. I don''t know where to head next :)) Thanks for your help. -- Sébastien Riccio SwissCenter / OpenBusiness SA sr@openbusiness.com Keir Fraser a écrit :> On 3/9/07 15:07, "Sébastien RICCIO" <sr@swisscenter.com> wrote: > > >> Ntpd is not running in dom0. I am updating the dom0 time with ntpdate >> (crontab every hour). >> Should ntpd be running on dom0 ? >> > > So long as ntpdate calls settimeofday(), this should be sufficient to update > Xen''s notion of time too. It seems that isn''t happening for some reason. > > Do all guests (including dom0) have independent_wallclock equal to 0? > > What kernel are you using in dom0 (e.g., vendor kernel?). > > Ntpd in dom0 would be an interesting thing to try. That should cause dom0 to > periodically (every few minutes) push its time down to Xen to be picked up > by all domUs. But really ntpdate should be doing the right thing... > > In our kernels it should be *impossible* for dom0 and domU time to diverge > when independent_wallclock is set to zero everywhere... > > -- Keir > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 03/09/07, Keir Fraser <Keir.Fraser@cl.cam.ac.uk> wrote:> So long as ntpdate calls settimeofday(), this should be sufficient to update > Xen''s notion of time too. It seems that isn''t happening for some reason. > > Do all guests (including dom0) have independent_wallclock equal to 0? > > What kernel are you using in dom0 (e.g., vendor kernel?). > > Ntpd in dom0 would be an interesting thing to try. That should cause dom0 to > periodically (every few minutes) push its time down to Xen to be picked up > by all domUs. But really ntpdate should be doing the right thing... > > In our kernels it should be *impossible* for dom0 and domU time to diverge > when independent_wallclock is set to zero everywhere... > > -- KeirIt occurs with ntpd in dom0 as well: tomkins@host1 ~ $ date Mon Sep 3 14:42:04 UTC 2007 testdomu:~# date Mon Sep 3 14:43:11 UTC 2007 dom0 runs ntpd, the only thing which causes the domUs to correct themselves is hwclock in dom0. It''s a fairly old machine though and would need to be updated for testing: Linux host1 2.6.16.29-xen-host1-1 #1 Sat Nov 25 19:57:50 Local time zone must be set--see zic manu x86_64 AMD Athlon(tm) 64 Processor 3700+ AuthenticAMD GNU/Linux However I''ve been moving all Xen servers away from Gentoo and switching them to CentOS which doesn''t seem to have the same problem. I remember someone else having similar problems: <http://lists.xensource.com/archives/html/xen-users/2006-11/msg00861.html> I''ve still got a couple of servers which haven''t been updated to CentOS yet. I could upgrade them to a more recent Xen release as well as a more recent kernel to test it. -- Alex Tomkins <tomkins@darkzone.net> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel