Dnia piątek, 6 listopada 2009 o 10:43:47 Jordi Espasa Clofent napisał(a):
> First of all, thanks for your response Bartosz. ;)
>
> > I'm facing similar problems. My ocnfiguration: XEN 3.4.1 + kernel from
> > http://git.kernel.org/?p=linux/kernel/git/jeremy/xen.git;a=shortlog;h=xen
> >/master
>
> I've suffered this trouble since 3.0.x version. What a pity!
>
> > 1. Just afer DomU starts it's time differs from dom0 clocks: software
> > (date) and hardware (hwclock --show --utc). In my case it's ~10s. It's
> > not caused by wrong /etc/localtime. If it were, then round hours would be
> > the difference.
>
> Mmmm... I think I don't understand completely what you say. Could you
> elaborate more this argument please?
>
Jordi,
Sorry for writing the above line in a hurry.
I observe, that my domU clock differs from dom0 clock from the very beginning.
Thus I think it's something wrong with xen tools that setup a new domain or
the prblem is caused by hypervisor or kernel that miss some number of clock
ticks during kernel boot.
The difference is ~10s so it's not caused by wrong /etc/localtime. If one uses
/etc/localtime generated by some distribution (RedHat, Suse, Debian or PLD in
my case) the difference should not be a fraction of an hour.
> > 1. I've installed ntpd in domU, too. I read somewhere that it sould be
> > done as a workaround, until the source of te poblem is found and fixed.
> > With ntpd running DomU's clock still drifted, but when the difference was
> > approaching 1s ntpd reseted the clock.
>
> Yes. I've also tried to set up a ntpd in domU (activating the
> independent_wallclock entry in /proc)
> but it seems not works at all.
In my combination of Xen(3.4.1)/kernel(2.6.31.5/jeremy) I have no such entry
in the /proc tree or I don't know how to make independent_wallclock entry
apear somewhere there. But the workaround works without writing to this entry.
> > 2. I've changed timer interrupt frequencies to 1000Hz in dom0 and to
> > 100Hz in domU. That was done by kernel recompilation, of course. Now,
> > domU's clocks differ from dom0 in range ~10ms when under small load or
> > ~100ms under havy load. Furthemore, the differences are steady - I do not
> > observe leaps as It was when domU and dom0 timer interrupt frequencies
> > were equal.
>
> So... ¿Can I suppose that the time difference ocurrs because the domUs
> are under high load?
Well, it seems that hypervisor's mechanisms of sharing common clock between
domains don't work. What works, is ntpd based synchronization independent of
xen. Ntpd daemon works in userspace and it behaves better when the system is
not fully loaded. The load I was talking about is my favorite load test: linux
kernel compilation, do it again and again using at least 20 concurent jobs.
>
> > It's also handy to do:
> >
> > 3. On dom0 put into /etc/cron.hourly a script doing:
> > /sbin/hwclock --systohc --utc
>
> ¿What it means exactly?
Once every hour my serwer rewrites time from its clock kept by linux to
hardware clock. Linux clock is, of course, continuously synchronized by ntpd.
In case of a sudden crash, server reboots with hardware clock very close to
world clocks.
Kind regards,
--
Bartosz Lis @ Institute of Comp. Science, Technical University of Lodz, Poland
bartoszl @ ics.p.lodz.pl
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|