Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 07 Jul 2011 19:39:05 +1000
From:      Aristedes Maniatis <ari@ish.com.au>
To:        freebsd-stable <freebsd-stable@freebsd.org>
Subject:   system internal timer runs 10 times too slow
Message-ID:  <4E157EB9.4030201@ish.com.au>

next in thread | raw e-mail | index | archive | help
We upgraded an existing system to a new motherboard/CPU and found that timing in various programs is very odd. For example "top" only updates every 10 seconds instead of every second. And this confirms the oddness:

# while true; do echo `date`; sleep 1; done
Thu Jul 7 19:09:01 EST 2011
Thu Jul 7 19:09:11 EST 2011
Thu Jul 7 19:09:21 EST 2011

10 seconds instead of 1.


So I looked first at the kernel timers:

# dmesg | grep -i time
Timecounter "i8254" frequency 1193182 Hz quality 0
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
pci3: <multimedia, HDA> at device 0.1 (no driver attached)
atrtc0: <AT realtime clock> port 0x70-0x71 irq 8 on acpi0
acpi_hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 14318180 Hz quality 900
Timecounters tick every 1.000 msec


I switched i8254 and then to HPET. No difference.

# sysctl -w kern.timecounter.hardware=i8254
kern.timecounter.hardware: ACPI-fast -> i8254
# while true; do echo `date`; sleep 1; done
Thu Jul 7 19:09:40 EST 2011
Thu Jul 7 19:09:41 EST 2011

I switched to TSC:

# sysctl -w kern.timecounter.hardware=TSC
kern.timecounter.hardware: HPET -> TSC
# while true; do echo `date`; sleep 1; done
Thu Jul 7 19:25:56 EST 2011
Thu Jul 7 19:25:57 EST 2011
Thu Jul 7 19:25:58 EST 2011

Now this looks like it fixed the problem, but actually it is worse. Now the clock matches what you'd expect, but there is still 10 seconds in real time between those date entries. That is, now the system clock is running 10 times too slow as well.


# uname -a
FreeBSD delish.ish.com.au 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011     root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

Base board information
Manufacturer: ASUSTeK Computer INC.
Product Name: P6X58D-E

BIOS information
Vendor: American Megatrends Inc.
Version: 0502
Release Date: 11/16/2010
BIOS Revision: 8.15

CPU Model:	Intel(R) Core(TM) i7 CPU         960  @ 3.20GHz


Thanks in advance for any help.


Ari


-- 
-------------------------->
Aristedes Maniatis
ish
http://www.ish.com.au
Level 1, 30 Wilson Street Newtown 2042 Australia
phone +61 2 9550 5001   fax +61 2 9550 4001
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E157EB9.4030201>