[Solved]Clock running slow after switch to ondemand governor

General support questions
Post Reply
JohnC
Posts: 17
Joined: 2007/04/01 08:32:12

[Solved]Clock running slow after switch to ondemand governor

Post by JohnC » 2014/07/14 18:05:42

I installed CentOS7 from the Live CD and all is well except the time display. This is OK using the default performance governor but starts going slow when I use the ondemand governor.
The CPU is AMD Athlon 64 3200+. Doing cat /proc/cpuinfo shows it running at the max speed 2200MHz.
I then do the command:

Code: Select all

cpupower frequency-set --governor ondemand
Checking CPU speed now and it has reduced to 1000MHz but the gnome time display is running slower too.
I ran a command to display the time:

Code: Select all

while true; do hwclock --show;date; echo '------------';sleep 60; done
The output is:
Mon 14 Jul 2014 18:26:34 BST -0.095890 seconds
Mon 14 Jul 18:26:19 BST 2014
------------
Mon 14 Jul 2014 18:28:46 BST -0.794869 seconds
Mon 14 Jul 18:27:19 BST 2014
------------
Mon 14 Jul 2014 18:30:46 BST -0.334412 seconds
Mon 14 Jul 18:28:20 BST 2014
------------
Mon 14 Jul 2014 18:32:55 BST -0.444263 seconds
Mon 14 Jul 18:29:20 BST 2014
------------
Mon 14 Jul 2014 18:35:07 BST -0.413321 seconds
Mon 14 Jul 18:30:21 BST 2014
------------
Mon 14 Jul 2014 18:37:16 BST -0.319098 seconds
Mon 14 Jul 18:31:21 BST 2014
------------
Mon 14 Jul 2014 18:39:22 BST -0.028755 seconds
Mon 14 Jul 18:32:21 BST 2014
------------
Mon 14 Jul 2014 18:41:34 BST -0.115671 seconds
Mon 14 Jul 18:33:21 BST 2014

The system time is getting further behind the hardware clock time.
I stopped/disabled chronyd but still the same.

These messages from dmesg:
0.000000] Important: In CentOS 7, single threaded, single CPU 64-bit physical systems are unsupported. Please see http://wiki.centos.org/FAQ for more information

0.000000] tsc: Fast TSC calibration using PIT
0.000000] tsc: Detected 2202.802 MHz processor
0.002004] Calibrating delay loop (skipped), value calculated using timer frequency.. 4405.60 BogoMIPS (lpj=2202802)

So the CPU is not supported but the FAQ doesn't say any more. It seems to work OK apart from slow clock.
Last edited by JohnC on 2014/07/18 06:53:56, edited 1 time in total.

nbritton
Posts: 38
Joined: 2014/07/09 23:38:46

Re: Clock running slow after switch to ondemand governor

Post by nbritton » 2014/07/15 23:38:35

I think your processor doesn't support constant_tsc, try processor.max_cstate=1 at boot up, refer to here for more details: https://access.redhat.com/documentation ... ement.html

Do you have an option in your BIOS to enable an alternative timer? For instance, HPET? Alternatively if you don't want to disable C states you could force linux to use a different timer, like the HPET timer: http://www-01.ibm.com/support/docview.w ... wg21443045

JohnC
Posts: 17
Joined: 2007/04/01 08:32:12

Re: Clock running slow after switch to ondemand governor

Post by JohnC » 2014/07/16 07:30:18

Thanks for the info. I tried processor.max_cstate=1 but no joy. Also I don't see anything in the BIOS for an alternative timer.

I've reverted to running the cpu at max speed all the time (cpupower frequency-set --governor performance) and the time display is OK then.
I guess this is what they meant with the message 'single threaded, single CPU 64-bit physical systems are unsupported'.
https://access.redhat.com/solutions/544423 says they are not supported because the upstream kernel doesn't support them.

I think it's a hint I should be upgrading my system.

nbritton
Posts: 38
Joined: 2014/07/09 23:38:46

Re: Clock running slow after switch to ondemand governor

Post by nbritton » 2014/07/16 15:01:18

JohnC wrote:I guess this is what they meant with the message 'single threaded, single CPU 64-bit physical systems are unsupported'.
https://access.redhat.com/solutions/544423 says they are not supported because the upstream kernel doesn't support them.

I think it's a hint I should be upgrading my system.
You can find an Athlon X2 for less then $20 on ebay. Are they seriously saying that uni-processor systems are no longer supported? What upstream change are they referring to? I don't understand, how are uni-processor virtual machines any different from uni-processor physical machines? Saying you can support one but not the other seems ludicrous.

JohnC
Posts: 17
Joined: 2007/04/01 08:32:12

Re: Clock running slow after switch to ondemand governor

Post by JohnC » 2014/07/18 06:52:23

After a bit more experimentation I found a solution.

Just add this to the kernel line:

Code: Select all

clocksource=acpi_pm
Thanks for the help.

Post Reply