[ntp:questions] Timekeeping broken on Windows XP with multimedia timer enabled (-M option)

Martin Burnicki martin.burnicki at meinberg.de
Thu Jan 21 10:43:12 UTC 2010

Alan wrote:
> Thanks for the reply,
> I've checked and I have /usepmtimer in boot.ini and wclkres -p reports
> Performance Counter Frequency: 3.580

So your system does indeed use the PM timer to implement the QPC function.
> I also have Cool N Quiet turned off in BIOS.

AFAIK this should only affect the TSCs, so the setting should not matter at
all if the PM timer is used.
> As an experiment I tried seeting affinity to processor 0 and retrying
> with the -M switch. No improvement

That's what I had expected. The affinity should also show an effect if the
TSCs are used for QPC, which is not the case.

> - Jitter is at 100+ millseconds 
> within a minute and the clock starts being regulaly stepped forward a
> few minutes later. With affinity set and without the -M switch I synch
> to within a few milliseconds with jitter of a few millseconds almost
> immediately. ALthough both offset and jitter jump up by about 20 msec
> depending on what I run but then settle down again as I expect under
> Windows without -M switch
> Overnight (without the -M option) with the system idle and only running
> NTPD, both offset and jitter on all configured server clocks dropped to
> about 1 msec or less. Again even if the system is "idle" the time drift
> rate rockets as soon as -M is turned on.
> Anything else I might look at?

We are also using QPC in the driver software for our PCI cards. Quite some
time ago we had a customer who also had timing problems with our driver. it
turned out that the problem was the chipset on the mainboard which returned
inconsistent timestamps.

As you have observed, if you don't use the -M flag system time seems to jump
(20 ms in your case) if some other application sets the multimedia timer to
highest resolution. However, this is just what ntpd does on startup if the
-M switch has been specified. So I'd expect that in your case ntpd runs
stable without -M, but I'm afraid if another app changes the MM timer then
time disciplination will be as poor as with the -M flag specified.

Anyway, I'm actually, out of ideas what you could try to improve the

Martin Burnicki

Meinberg Funkuhren
Bad Pyrmont

More information about the questions mailing list