[Sussex] NTP Weirdness
Jon Fautley
jfautley at redhat.com
Thu Apr 24 08:59:42 UTC 2008
On Thu, 24 Apr 2008 09:00:48 +0100
Steve Dobson <steve.dobson at syscall.org.uk> wrote:
> All: Yesterday afternoon I disabled NTP on the box and reset the
> time. This morning (less than 12 hours later) the clock was ~10
> minutes fast. As the system clock is run of the software timer
> interrupt my thoughts are now turning to overclocking as being the
> prim suspect.
Highly unlikely. You're probably just using an unsyncronised
timesource. Multi-CPU systems can often exhibit this problem as
the timestamp counters aren't synced between the different CPU cores,
so depending on which core gets the TSC query when a gettimeofday()
call is executed means that you can see jumping time. Have you noticed
time going "backwards" as well as forwards?
A quick check would be to boot with "clock=pmtmr" on the kernel command
line. This will force the kernel to use the "Power Management Timer"
chip to track system time. This is the most stable, but also the most
"expensive" clock to use in terms of performance. On a home system,
it's unlikely you'll see any major performance difference, but on big
end systems that make lots of gettimeofday() calls - i.e Oracle
databases - you can notice a performance hit and slightly increased CPU
utilisation.
Depending on the hardware, you might also want to see if there is the
option to enable the "High Performance Event Timer" (HPET) - this is
the "best" timesource to be using, but only newer systems have them
installed, and you often need to tweak the BIOS to enable it (on an HP
DL585 system I think the option is "Enable Linux Event Timer" or
somesuch).
A bit of googling or prodding the kernel source code should reveal the
other types of timer you can query - I can't remember the others off
the top of my head I'm afraid.
Cheers,
Jon
--
Jon Fautley RHCE, RHCDS, RHCX email: jfautley at redhat.com
Senior Consultant cell : +44 7841 558683
Global Professional Services
Red Hat UK, 200 Fowler Avenue, Farnborough, Hampshire, GU14 7JP
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mailman.lug.org.uk/pipermail/sussex/attachments/20080424/4fd9a976/attachment.pgp
More information about the Sussex
mailing list