Skip to contentSkip to conversation

clock drift in Xen 4.0.0

DISCUSSION James Harper 5 participants 14 messages May 25, 2010 – May 26, 2010

lore
Share & tools
lore
#0 lore raw

Are there any known problems with clock drift in Xen 4.0.0? One DomU with an uptime of 49 days is now 7 minutes in front. I never noticed the problem before I upgraded.

/proc/sys/xen/independent_wallclock=0

James

#1 lore raw
Quoted 5 lines · James Harper

Are there any known problems with clock drift in Xen 4.0.0? One DomU with an uptime of 49 days is now 7 minutes in front. I never noticed the problem before I upgraded.

/proc/sys/xen/independent_wallclock=0

Are you running NTP? 100ppm drift isn't unbelievable without external synchronisation.

-- Keir

Quoted 6 lines

James

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw
Quoted 1 line

On 25/05/2010 07:50, "James Harper" <[email protected]>

Quoted 3 lines · wrote:
Quoted 3 lines

Are there any known problems with clock drift in Xen 4.0.0? One DomU with an uptime of 49 days is now 7 minutes in front. I never noticed

the

Quoted 7 lines
Quoted 3 lines

problem before I upgraded.

/proc/sys/xen/independent_wallclock=0

Are you running NTP? 100ppm drift isn't unbelievable without external synchronisation.

That's 7 minutes in front of the Dom0 that it's sitting on. The Dom0 runs ntp. Another DomU on the same system is ahead by a similar amount (9 minutes over 74 days). I thought that with independent_wallclock=0 that they should stay in step.

I actually just noticed that I'm running 4.0.0-rc6, not 4.0.0 proper... d'oh. I think I should probably update before thinking about it much more.

James

#3 lore raw
Quoted 4 lines · James Harper
Quoted 3 lines

Are you running NTP? 100ppm drift isn't unbelievable without external synchronisation.

Quoted 8 lines

That's 7 minutes in front of the Dom0 that it's sitting on. The Dom0 runs ntp. Another DomU on the same system is ahead by a similar amount (9 minutes over 74 days). I thought that with independent_wallclock=0 that they should stay in step.

I actually just noticed that I'm running 4.0.0-rc6, not 4.0.0 proper... d'oh. I think I should probably update before thinking about it much more.

It probably depends on your dom0 and domU kernels also. Have they both been observed to behave 'properly' before? In particular I'm not sure pv_ops behaves same as ealrier kernels.

-- Keir

#4 lore raw
Quoted 14 lines

From: Keir Fraser [mailto:[email protected]]
Subject: Re: [Xen-devel] clock drift in Xen 4.0.0

Quoted 1 line
Quoted 1 line

Are you running NTP? 100ppm drift isn't unbelievable without

external

Quoted 4 lines
Quoted 1 line

synchronisation.

That's 7 minutes in front of the Dom0 that it's sitting on. The Dom0 runs ntp. Another DomU on the same system is ahead by a similar

amount

Quoted 4 lines

(9 minutes over 74 days). I thought that with independent_wallclock=0 that they should stay in step.

I actually just noticed that I'm running 4.0.0-rc6, not 4.0.0

Quoted 8 lines

proper...

Quoted 2 lines

d'oh. I think I should probably update before thinking about it much more.

It probably depends on your dom0 and domU kernels also. Have they both been
observed to behave 'properly' before? In particular I'm not sure pv_ops behaves same as ealrier kernels.

James --

"DomU" may imply PV but just to verify is this a PV domain or HV?

If an HV, Keir, didn't the default timer_mode change in 4.0?

Also, if HV, isn't independent_wallclock ignored?

#5 lore raw
Quoted 3 lines · Dan Magenheimer

"DomU" may imply PV but just to verify is this a PV domain or HV?

If an HV, Keir, didn't the default timer_mode change in 4.0?

Default is still 1 afaiaa.

Quoted 1 line

Also, if HV, isn't independent_wallclock ignored?

#6 lore raw
Quoted 11 lines

From: Keir Fraser [mailto:[email protected]]
Subject: Re: [Xen-devel] clock drift in Xen 4.0.0

Quoted 3 lines · Dan Magenheimer

"DomU" may imply PV but just to verify is this a PV domain or HV?

If an HV, Keir, didn't the default timer_mode change in 4.0?

Default is still 1 afaiaa.

It was changed in cs 18554, September 2008, so I think that was actually between 3.3 and 3.4.

#7 lore raw
In reply to James Harper
Quoted 9 lines · James Harper

That's 7 minutes in front of the Dom0 that it's sitting on. The Dom0 runs ntp. Another DomU on the same system is ahead by a similar amount (9 minutes over 74 days). I thought that with independent_wallclock=0 that they should stay in step.

I actually just noticed that I'm running 4.0.0-rc6, not 4.0.0 proper... d'oh. I think I should probably update before thinking about it much more.

What domU and dom0 kernel are you running? pvops always has independent wallclock.

J

#8 lore raw
Quoted 4 lines · James Harper
Quoted 2 lines

That's 7 minutes in front of the Dom0 that it's sitting on. The Dom0 runs ntp. Another DomU on the same system is ahead by a similar

amount

Quoted 1 line
Quoted 1 line

(9 minutes over 74 days). I thought that with

independent_wallclock=0

Quoted 3 lines
Quoted 3 lines

that they should stay in step.

I actually just noticed that I'm running 4.0.0-rc6, not 4.0.0

proper...

Quoted 5 lines
Quoted 3 lines

d'oh. I think I should probably update before thinking about it much more.

What domU and dom0 kernel are you running? pvops always has

independent

Quoted 2 lines

wallclock.

Dom0 is 2.6.31.12 (pvops), domU is 2.6.18.8 (not pvops). Which one matters here?

James

#9 lore raw
Quoted 6 lines · James Harper
Quoted 1 line

What domU and dom0 kernel are you running? pvops always has

independent

Quoted 1 line

wallclock.

Dom0 is 2.6.31.12 (pvops), domU is 2.6.18.8 (not pvops). Which one matters here?

I think pv_ops doesn't play with dependent-wallclock either way round: It won't resync its wallclock with Xen when running as domU; nor will it periodically push its wallclock down to Xen when running as dom0. So if you have pv_ops as the dom0 or the domU, you'd better run NTP in the domU.

-- Keir

#10 lore raw
Quoted 2 lines

On 26/05/2010 10:33, "James Harper" <[email protected]>

Quoted 9 lines · wrote:
Quoted 7 lines
Quoted 2 lines

What domU and dom0 kernel are you running? pvops always has

independent

Quoted 1 line

wallclock.

Dom0 is 2.6.31.12 (pvops), domU is 2.6.18.8 (not pvops). Which one matters here?

I think pv_ops doesn't play with dependent-wallclock either way round:

It

Quoted 2 lines

won't resync its wallclock with Xen when running as domU; nor will it periodically push its wallclock down to Xen when running as dom0. So

if you

Quoted 2 lines

have pv_ops as the dom0 or the domU, you'd better run NTP in the domU.

Thanks. Will it ever support dependent-wallclock?

James

#11 lore raw
Quoted 9 lines · James Harper
Quoted 1 line

I think pv_ops doesn't play with dependent-wallclock either way round:

It

Quoted 2 lines

won't resync its wallclock with Xen when running as domU; nor will it periodically push its wallclock down to Xen when running as dom0. So

if you

Quoted 2 lines

have pv_ops as the dom0 or the domU, you'd better run NTP in the domU.

Thanks. Will it ever support dependent-wallclock?

I don't think Jeremy likes dependent-wallclock. :-)

K.

#12 lore raw
In reply to Keir Fraser
Quoted 6 lines · Keir Fraser
Quoted 4 lines · James Harper
Quoted 1 line

What domU and dom0 kernel are you running? pvops always has

independent

Quoted 1 line

wallclock.

Quoted 7 lines
Quoted 2 lines

Dom0 is 2.6.31.12 (pvops), domU is 2.6.18.8 (not pvops). Which one matters here?

I think pv_ops doesn't play with dependent-wallclock either way round: It won't resync its wallclock with Xen when running as domU; nor will it periodically push its wallclock down to Xen when running as dom0. So if you have pv_ops as the dom0 or the domU, you'd better run NTP in the domU.

A while ago I sent a patch to pvops to fix this problem (look for "[PATCH] [PVOPS] [UPDATE] dom0 sync xen wallclock" in the archives), but Jeremy didn't like it :)

#13 lore raw
In reply to Keir Fraser
Quoted 9 lines
Quoted 7 lines
Quoted 2 lines

What domU and dom0 kernel are you running? pvops always has

independent

Quoted 1 line

wallclock.

Dom0 is 2.6.31.12 (pvops), domU is 2.6.18.8 (not pvops). Which one matters here?

I think pv_ops doesn't play with dependent-wallclock either way round:

It

Quoted 2 lines

won't resync its wallclock with Xen when running as domU; nor will it periodically push its wallclock down to Xen when running as dom0. So

if you

Quoted 2 lines

have pv_ops as the dom0 or the domU, you'd better run NTP in the domU.

Just for the record, with a pvops dom0 and a non-pvops domu, you still need to set independent_wallclock=1 for ntp to be able to modify the clock. Without that change, ntp tells me:

time reset -409.699016 s
...
time reset -409.776693 s
...
time reset -409.854404 s
...
time reset -409.930385 s
...
time reset -410.009187 s

but never actually adjusts the time!

James