Jordi Espasa Clofent
2009-Nov-03 17:54 UTC
[Xen-users] Time diferrence between dom0 and domU
Hi all, In dom0: xen01ad:/# ls -l /etc/localtime lrwxrwxrwx 1 root root 33 2009-07-02 10:51 /etc/localtime -> /usr/share/zoneinfo/Europe/Madrid xen01ad:/# ntpdate hora.rediris.es 3 Nov 18:49:46 ntpdate[9558]: adjust time server 130.206.3.166 offset 0.163783 sec In domU: xen-ad0006:~# date Tue Nov 3 18:55:29 CET 2009 xen-ad0006:~# ls -l /etc/localtime lrwxrwxrwx 1 root root 33 Nov 3 13:24 /etc/localtime -> /usr/share/zoneinfo/Europe/Madrid xen-ad0006:~# ntpdate hora.rediris.es 3 Nov 18:55:44 ntpdate[19800]: step time server 130.206.3.166 offset -294.467004 sec As you can see, the time difference between dom0 and domU is aprox 6 min. ¿why? It''s supposed that domUs has the dom0''s time. Info: * I don''t use the independent_wallclock * xen01ad:/# uname -a && xm info Linux xen01ad 2.6.18-6-xen-amd64 #1 SMP Tue May 5 09:56:33 UTC 2009 x86_64 GNU/Linux host : xen01ad release : 2.6.18-6-xen-amd64 version : #1 SMP Tue May 5 09:56:33 UTC 2009 machine : x86_64 nr_cpus : 8 nr_nodes : 1 cores_per_socket : 4 threads_per_core : 1 cpu_mhz : 2110 hw_caps : 178bf3ff:efd3fbff:00000000:00000110:00802001:00000000:000037ff total_memory : 16383 free_memory : 4161 node_to_cpu : node0:0-7 xen_major : 3 xen_minor : 2 xen_extra : -1 xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64 xen_scheduler : credit xen_pagesize : 4096 platform_params : virt_start=0xffff800000000000 xen_changeset : unavailable cc_compiler : gcc version 4.3.1 (Debian 4.3.1-2) cc_compile_by : waldi cc_compile_domain : debian.org cc_compile_date : Sat Jun 28 09:32:18 UTC 2008 xend_config_format : 4 -- I must not fear. Fear is the mind-killer. Fear is the little-death that brings total obliteration. I will face my fear. I will permit it to pass over me and through me. And when it has gone past I will turn the inner eye to see its path. Where the fear has gone there will be nothing. Only I will remain. Bene Gesserit Litany Against Fear. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Jordi Espasa Clofent
2009-Nov-05 08:21 UTC
[Xen-users] Time diferrence between dom0 and domU
Hi all, In dom0: xen01ad:/# ls -l /etc/localtime lrwxrwxrwx 1 root root 33 2009-07-02 10:51 /etc/localtime -> /usr/share/zoneinfo/Europe/Madrid xen01ad:/# ntpdate hora.rediris.es 3 Nov 18:49:46 ntpdate[9558]: adjust time server 130.206.3.166 offset 0.163783 sec In domU: xen-ad0006:~# date Tue Nov 3 18:55:29 CET 2009 xen-ad0006:~# ls -l /etc/localtime lrwxrwxrwx 1 root root 33 Nov 3 13:24 /etc/localtime -> /usr/share/zoneinfo/Europe/Madrid xen-ad0006:~# ntpdate hora.rediris.es 3 Nov 18:55:44 ntpdate[19800]: step time server 130.206.3.166 offset -294.467004 sec As you can see, the time difference between dom0 and domU is aprox 6 min. ¿why? It''s supposed that domUs has the dom0''s time. Info: * I don''t use the independent_wallclock * xen01ad:/# uname -a && xm info Linux xen01ad 2.6.18-6-xen-amd64 #1 SMP Tue May 5 09:56:33 UTC 2009 x86_64 GNU/Linux host : xen01ad release : 2.6.18-6-xen-amd64 version : #1 SMP Tue May 5 09:56:33 UTC 2009 machine : x86_64 nr_cpus : 8 nr_nodes : 1 cores_per_socket : 4 threads_per_core : 1 cpu_mhz : 2110 hw_caps : 178bf3ff:efd3fbff:00000000:00000110:00802001:00000000:000037ff total_memory : 16383 free_memory : 4161 node_to_cpu : node0:0-7 xen_major : 3 xen_minor : 2 xen_extra : -1 xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64 xen_scheduler : credit xen_pagesize : 4096 platform_params : virt_start=0xffff800000000000 xen_changeset : unavailable cc_compiler : gcc version 4.3.1 (Debian 4.3.1-2) cc_compile_by : waldi cc_compile_domain : debian.org cc_compile_date : Sat Jun 28 09:32:18 UTC 2008 xend_config_format : 4 -- I must not fear. Fear is the mind-killer. Fear is the little-death that brings total obliteration. I will face my fear. I will permit it to pass over me and through me. And when it has gone past I will turn the inner eye to see its path. Where the fear has gone there will be nothing. Only I will remain. Bene Gesserit Litany Against Fear. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Dnia wtorek, 3 listopada 2009 o 18:54:04 Jordi Espasa Clofent napisał(a):> Hi all, > > In dom0: > > xen01ad:/# ls -l /etc/localtime > lrwxrwxrwx 1 root root 33 2009-07-02 10:51 /etc/localtime -> > /usr/share/zoneinfo/Europe/Madrid > xen01ad:/# ntpdate hora.rediris.es > 3 Nov 18:49:46 ntpdate[9558]: adjust time server 130.206.3.166 offset > 0.163783 sec > > In domU: > > xen-ad0006:~# date > Tue Nov 3 18:55:29 CET 2009 > xen-ad0006:~# ls -l /etc/localtime > lrwxrwxrwx 1 root root 33 Nov 3 13:24 /etc/localtime -> > /usr/share/zoneinfo/Europe/Madrid > xen-ad0006:~# ntpdate hora.rediris.es > 3 Nov 18:55:44 ntpdate[19800]: step time server 130.206.3.166 offset > -294.467004 sec > > As you can see, the time difference between dom0 and domU is aprox 6 min. > ¿why? > > It''s supposed that domUs has the dom0''s time. > > Info: > > * I don''t use the independent_wallclock > * xen01ad:/# uname -a && xm info > Linux xen01ad 2.6.18-6-xen-amd64 #1 SMP Tue May 5 09:56:33 UTC 2009 > x86_64 GNU/Linux > host : xen01ad > release : 2.6.18-6-xen-amd64 > version : #1 SMP Tue May 5 09:56:33 UTC 2009 > machine : x86_64 > nr_cpus : 8 > nr_nodes : 1 > cores_per_socket : 4 > threads_per_core : 1 > cpu_mhz : 2110 > hw_caps : > 178bf3ff:efd3fbff:00000000:00000110:00802001:00000000:000037ff > total_memory : 16383 > free_memory : 4161 > node_to_cpu : node0:0-7 > xen_major : 3 > xen_minor : 2 > xen_extra : -1 > xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 > hvm-3.0-x86_32p hvm-3.0-x86_64 > xen_scheduler : credit > xen_pagesize : 4096 > platform_params : virt_start=0xffff800000000000 > xen_changeset : unavailable > cc_compiler : gcc version 4.3.1 (Debian 4.3.1-2) > cc_compile_by : waldi > cc_compile_domain : debian.org > cc_compile_date : Sat Jun 28 09:32:18 UTC 2008 > xend_config_format : 4 >Jordi, 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 observe problems: 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. 2. DomU''s clock drifts. I''ve made 2 things as a workaround: 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. 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. It''s also handy to do: 3. On dom0 put into /etc/cron.hourly a script doing: /sbin/hwclock --systohc --utc I''m going to report my problems to xen-devel and ask them to write some wiki article on time keeping. Kind regards, -- Bartosz Lis @ Institute of Comp. Science, Technical University of Lodz, Poland bartoszl @ ics.p.lodz.pl _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Jordi Espasa Clofent
2009-Nov-06 09:43 UTC
Re: [Xen-users] Time diferrence between dom0 and domU
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/masterI''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?> 2. DomU''s clock drifts. > > I''ve made 2 things as a workaround: > > 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.> 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?> 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?> I''m going to report my problems to xen-devel and ask them to write some wiki > article on time keeping.Yes, I thing is absolutely needed. As I''ve said before, I''ve experienced time sync problems between dom0 and domUs since 3.0.x version; and now you''re talking about 3.4.x version. It''s totally unacceptable. Keeping the time sync is an esencial feature. -- I must not fear. Fear is the mind-killer. Fear is the little-death that brings total obliteration. I will face my fear. I will permit it to pass over me and through me. And when it has gone past I will turn the inner eye to see its path. Where the fear has gone there will be nothing. Only I will remain. Bene Gesserit Litany Against Fear. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2009-Nov-06 09:52 UTC
Re: [Xen-users] Time diferrence between dom0 and domU
On Fri, Nov 6, 2009 at 4:43 PM, Jordi Espasa Clofent <jespasac@minibofh.org> wrote:> 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!Workaround: if it''s PV domU, use RHEL/Centos5''s kernel-xen (xen.org''s 2.6.18 kernel may also work). I use it with both Redhat''s version of Xen and Xen 3.4.1, it doesn''t have the problem. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Pasi Kärkkäinen
2009-Nov-06 11:29 UTC
Re: [Xen-users] Time diferrence between dom0 and domU
On Fri, Nov 06, 2009 at 04:52:24PM +0700, Fajar A. Nugraha wrote:> On Fri, Nov 6, 2009 at 4:43 PM, Jordi Espasa Clofent > <jespasac@minibofh.org> wrote: > > 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! > > Workaround: if it''s PV domU, use RHEL/Centos5''s kernel-xen (xen.org''s > 2.6.18 kernel may also work). I use it with both Redhat''s version of > Xen and Xen 3.4.1, it doesn''t have the problem. >Does someone if this is a problem/bug in the dom0 kernel? Or is it a problem with the hypervisor, or domU kernel? Does changing _only_ dom0 kernel fix it? -- Pasi _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Pasi Kärkkäinen
2009-Nov-06 12:33 UTC
Re: [Xen-users] Time diferrence between dom0 and domU
On Fri, Nov 06, 2009 at 01:29:58PM +0200, Pasi Kärkkäinen wrote:> On Fri, Nov 06, 2009 at 04:52:24PM +0700, Fajar A. Nugraha wrote: > > On Fri, Nov 6, 2009 at 4:43 PM, Jordi Espasa Clofent > > <jespasac@minibofh.org> wrote: > > > 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! > > > > Workaround: if it''s PV domU, use RHEL/Centos5''s kernel-xen (xen.org''s > > 2.6.18 kernel may also work). I use it with both Redhat''s version of > > Xen and Xen 3.4.1, it doesn''t have the problem. > > > > Does someone if this is a problem/bug in the dom0 kernel?^+know> Or is it a problem with the hypervisor, or domU kernel? > > Does changing _only_ dom0 kernel fix it? > > -- Pasi >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Jordi Espasa Clofent
2009-Nov-06 13:29 UTC
Re: [Xen-users] Time diferrence between dom0 and domU
> Workaround: if it''s PV domU, use RHEL/Centos5''s kernel-xen (xen.org''s > 2.6.18 kernel may also work). I use it with both Redhat''s version of > Xen and Xen 3.4.1, it doesn''t have the problem.Thanks for the advice Fajar, but my environment is: xen05:~# uname -a && xm info Linux xen05 2.6.18-6-xen-amd64 #1 SMP Thu Dec 25 22:21:42 UTC 2008 x86_64 GNU/Linux host : xen05 release : 2.6.18-6-xen-amd64 version : #1 SMP Thu Dec 25 22:21:42 UTC 2008 machine : x86_64 nr_cpus : 8 nr_nodes : 1 cores_per_socket : 4 threads_per_core : 1 cpu_mhz : 1909 hw_caps : 178bf3ff:efd3fbff:00000000:00000110:00802001:00000000:000007ff total_memory : 8191 free_memory : 1919 node_to_cpu : node0:0-7 xen_major : 3 xen_minor : 2 xen_extra : -1 xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64 xen_scheduler : credit xen_pagesize : 4096 platform_params : virt_start=0xffff800000000000 xen_changeset : unavailable cc_compiler : gcc version 4.3.1 (Debian 4.3.1-2) cc_compile_by : waldi cc_compile_domain : debian.org cc_compile_date : Sat Jun 28 09:32:18 UTC 2008 xend_config_format : 4 And it''s a production environment. I haven''t the option that you comment. :( -- I must not fear. Fear is the mind-killer. Fear is the little-death that brings total obliteration. I will face my fear. I will permit it to pass over me and through me. And when it has gone past I will turn the inner eye to see its path. Where the fear has gone there will be nothing. Only I will remain. Bene Gesserit Litany Against Fear. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
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@lists.xensource.com http://lists.xensource.com/xen-users
Dnia piątek, 6 listopada 2009 o 15:24:29 Bartosz Lis napisał(a):> 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=x > > >en /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.... still writing in a hurry ... I mean: from the very beginning of domU work - probably domU boots with distorted time.> 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.-- Bartosz Lis @ Institute of Comp. Science, Technical University of Lodz, Poland bartoszl @ ics.p.lodz.pl _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Jordi Espasa Clofent
2009-Nov-09 12:32 UTC
Re: [Xen-users] Time diferrence between dom0 and domU
> Jordi, > > Sorry for writing the above line in a hurry.No problem.> 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.IMHO this is important. Is there any related bug at "official level"?> 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.Ok.> 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.So, I understand the problem could be if you rely in ntpd (userspace) to keep up the time sync and the domU is under high load (kernel space). No? Anyway, the solution is clear: the hypervisor must to do it correctly. -- I must not fear. Fear is the mind-killer. Fear is the little-death that brings total obliteration. I will face my fear. I will permit it to pass over me and through me. And when it has gone past I will turn the inner eye to see its path. Where the fear has gone there will be nothing. Only I will remain. Bene Gesserit Litany Against Fear. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Dnia poniedziałek, 9 listopada 2009 o 13:32:11 Jordi Espasa Clofent napisał(a):> > Jordi, > > > > Sorry for writing the above line in a hurry. > > No problem. > > > 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. > > IMHO this is important. Is there any related bug at "official level"? > > > 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. > > Ok. > > > 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. > > So, I understand the problem could be if you rely in ntpd (userspace) to > keep up the time sync and the domU is under high load (kernel space). No? > > Anyway, the solution is clear: the hypervisor must to do it correctly. >Jordi, I just got answer from Jeremy Fitzhardinge to my questions regarding timekeepeing sent to xen-devel. See: http://lists.xensource.com/archives/html/xen-devel/2009-11/msg00505.html . The good news for me is that it''s not that bad as I thought with 2.6.31.5 kernels. Generally, xen makes dom0 and domU clocks go in lockstep with its wallclock, but at the moment you cannot update xen wallclock from dom0 (nor from domU). When this feature is implemented, the problem should disappear in 2.6.31+ kernels. Util that moment I''ll have to run ntpd in all VMs. I think 200ms time difference, which I have under heavy load, is not a big issue. Of course, that''s my point of view and your applications might be more strict. If you are interested in older kernels, please, join the discussion on xen- devel: http://lists.xensource.com/archives/html/xen- devel/2009-11/msg00469.html -- Bartosz Lis @ Inst. of Information Technology, Technical Univ. of Lodz, Poland bartoszl @ ics.p.lodz.pl _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Matthieu Patou
2009-Nov-10 21:03 UTC
Re: [Xen-users] Time diferrence between dom0 and domU
Hello Jordi, I noticed the same problem and that''s pretty nasty on HVM host running windows as the system can''t login on domain by defaut due to too big time drift. I worked around by adding ~ 6 minutes to the time of the domU at startup. On 05/11/2009 11:21, Jordi Espasa Clofent wrote:> Hi all, > > In dom0: > > xen01ad:/# ls -l /etc/localtime > lrwxrwxrwx 1 root root 33 2009-07-02 10:51 /etc/localtime -> > /usr/share/zoneinfo/Europe/Madrid > xen01ad:/# ntpdate hora.rediris.es > 3 Nov 18:49:46 ntpdate[9558]: adjust time server 130.206.3.166 offset > 0.163783 sec > > In domU: > > xen-ad0006:~# date > Tue Nov 3 18:55:29 CET 2009 > xen-ad0006:~# ls -l /etc/localtime > lrwxrwxrwx 1 root root 33 Nov 3 13:24 /etc/localtime -> > /usr/share/zoneinfo/Europe/Madrid > xen-ad0006:~# ntpdate hora.rediris.es > 3 Nov 18:55:44 ntpdate[19800]: step time server 130.206.3.166 offset > -294.467004 sec > > As you can see, the time difference between dom0 and domU is aprox 6 min. > ¿why? > > It''s supposed that domUs has the dom0''s time. > > Info: > > * I don''t use the independent_wallclock > * xen01ad:/# uname -a && xm info > Linux xen01ad 2.6.18-6-xen-amd64 #1 SMP Tue May 5 09:56:33 UTC 2009 > x86_64 GNU/Linux > host : xen01ad > release : 2.6.18-6-xen-amd64 > version : #1 SMP Tue May 5 09:56:33 UTC 2009 > machine : x86_64 > nr_cpus : 8 > nr_nodes : 1 > cores_per_socket : 4 > threads_per_core : 1 > cpu_mhz : 2110 > hw_caps : > 178bf3ff:efd3fbff:00000000:00000110:00802001:00000000:000037ff > total_memory : 16383 > free_memory : 4161 > node_to_cpu : node0:0-7 > xen_major : 3 > xen_minor : 2 > xen_extra : -1 > xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 > hvm-3.0-x86_32p hvm-3.0-x86_64 > xen_scheduler : credit > xen_pagesize : 4096 > platform_params : virt_start=0xffff800000000000 > xen_changeset : unavailable > cc_compiler : gcc version 4.3.1 (Debian 4.3.1-2) > cc_compile_by : waldi > cc_compile_domain : debian.org > cc_compile_date : Sat Jun 28 09:32:18 UTC 2008 > xend_config_format : 4 >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Pasi Kärkkäinen
2009-Nov-11 09:32 UTC
Re: [Xen-users] Time diferrence between dom0 and domU
On Wed, Nov 11, 2009 at 12:03:23AM +0300, Matthieu Patou wrote:> Hello Jordi, > I noticed the same problem and that''s pretty nasty on HVM host running > windows as the system can''t login on domain by defaut due to too big > time drift. > > I worked around by adding ~ 6 minutes to the time of the domU at startup. >Can you please paste your /etc/xen/<windowsguest> cfgfile.. let''s see if there''s something to tweak, related to that time problem. -- Pasi _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Jordi Espasa Clofent
2009-Nov-11 10:01 UTC
Re: [Xen-users] Time diferrence between dom0 and domU
> I just got answer from Jeremy Fitzhardinge to my questions regarding > timekeepeing sent to xen-devel. See: > http://lists.xensource.com/archives/html/xen-devel/2009-11/msg00505.html .From Jeremy''s word I understand that ntpd is always the best and prefered solution to keep up time sync.> The good news for me is that it''s not that bad as I thought with 2.6.31.5 > kernels. Generally, xen makes dom0 and domU clocks go in lockstep with its > wallclock, but at the moment you cannot update xen wallclock from dom0 (nor > from domU). When this feature is implemented, the problem should disappear in > 2.6.31+ kernels. Util that moment I''ll have to run ntpd in all VMs. I think > 200ms time difference, which I have under heavy load, is not a big issue. Of > course, that''s my point of view and your applications might be more strict.Good news.> If you are interested in older kernels, please, join the discussion on xen- > devel: http://lists.xensource.com/archives/html/xen- > devel/2009-11/msg00469.htmlThanks to point me out. ;) -- I must not fear. Fear is the mind-killer. Fear is the little-death that brings total obliteration. I will face my fear. I will permit it to pass over me and through me. And when it has gone past I will turn the inner eye to see its path. Where the fear has gone there will be nothing. Only I will remain. Bene Gesserit Litany Against Fear. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Dnia wtorek, 10 listopada 2009 o 22:03:23 Matthieu Patou napisał(a):> Hello Jordi, > I noticed the same problem and that''s pretty nasty on HVM host running > windows as the system can''t login on domain by defaut due to too big > time drift. > > I worked around by adding ~ 6 minutes to the time of the domU at startup. >Matthieu, It looks like your xen wallclock differs ~6 min from dom0 time. This difference may change slightly but noticeably after some time, say, a month. Better workaround would be synchronizing your windows to some NTP server. See the discussion on xen-devel: http://lists.xensource.com/archives/html/xen-devel/2009-11/msg00505.html Regards, -- Bartosz Lis @ Inst. of Information Technology, Technical Univ. of Lodz, Poland bartoszl @ ics.p.lodz.pl _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Matthieu Patou
2009-Nov-13 15:59 UTC
Re: [Xen-users] Time diferrence between dom0 and domU
On 11/11/2009 12:32, Pasi Kärkkäinen wrote:> On Wed, Nov 11, 2009 at 12:03:23AM +0300, Matthieu Patou wrote: > >> Hello Jordi, >> I noticed the same problem and that''s pretty nasty on HVM host running >> windows as the system can''t login on domain by defaut due to too big >> time drift. >> >> I worked around by adding ~ 6 minutes to the time of the domU at startup. >> >> > Can you please paste your /etc/xen/<windowsguest> cfgfile.. let''s see if > there''s something to tweak, related to that time problem. > > -- PasiHere it is: import os, re, time arch = os.uname()[4] if re.search(''64'', arch): arch_libdir = ''lib64'' else: arch_libdir = ''lib'' kernel = "/usr/lib/xen-3.2-1/boot/hvmloader" builder=''hvm'' memory = 1500 shadow_memory = 16 name = "xen-w2k8" vif = [ ''bridge=br1'' ] disk = [ ''phy:/dev/vgxen/lvvz01_w2k8,hda''] device_model = ''/usr/'' + arch_libdir + ''/xen-3.2-1/bin/qemu-dm'' # boot on floppy (a), hard disk (c) or CD-ROM (d) # default: hard disk, cd-rom, floppy boot="c" acpi = 1 apic = 1 sdl=0 vnc=1 usb=1 #usbdevice=[ ''tablet'', ''host:04b9:0300''] usbdevice=''tablet'' # Have to make a clever thing for daylight saving ... rtc_timeoffset=-(time.altzone) localtime=0 stdvga=0 vncconsole=1 vncpasswd=''chazam'' monitor=1 serial=''pty'' vncviewer = 0 vcpus = 2 cpus = ''2,3'' independent_wallclock = 1 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Matthieu Patou
2009-Nov-17 13:07 UTC
Re: [Xen-users] Time diferrence between dom0 and domU
On 12/11/2009 12:11, Bartosz Lis wrote:> Dnia wtorek, 10 listopada 2009 o 22:03:23 Matthieu Patou napisał(a): >> Hello Jordi, >> I noticed the same problem and that''s pretty nasty on HVM host running >> windows as the system can''t login on domain by defaut due to too big >> time drift. >> >> I worked around by adding ~ 6 minutes to the time of the domU at startup. >> > > Matthieu, > > It looks like your xen wallclock differs ~6 min from dom0 time. This > difference may change slightly but noticeably after some time, say, a month. > Better workaround would be synchronizing your windows to some NTP server. See > the discussion on xen-devel: > > http://lists.xensource.com/archives/html/xen-devel/2009-11/msg00505.html >Hi Dnia, Thanks for the tips, I forgot to mention that this windows hvm is part of a domain so I already get the ntp synchronisation as Windows AD rely on very accurate clocks (<5minutes drift). So in the long run my clocks are in sync but the very few minutes after the boot without the rtc_timeoffset=-(time.altzone) + 6 I''ve a too big drift and the some stuff do not work properly (ie. startup script for workstation/server). Note: I use time.altzone, as localtime = 1 is not working anymore for me (since xen 3.2). Matthieu. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users