LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   tickless kernel, 300 Hz timer (https://www.linuxquestions.org/questions/slackware-14/tickless-kernel-300-hz-timer-868255/)

solarfields 03-13-2011 04:12 AM

tickless kernel, 300 Hz timer
 
Hi guys,

I am going to describe a problem I had and how I solved it, in the hope of being helpful to someone with a similar issue.

I have a laptop with a Mobile AMD Sempron(tm) Processor 3100+. In versions of Slackware 13.0 and 13.1, the computer behaved as if there was a constant CPU load. The fan was really noisy and the computer heated a lot, usually around 65 C on an idle system. As a comparison, it used to be around 52 C before in Slackware 12.2.

What I noticed was that when I run powertop, I get the following:

Top causes for wakeups:
89.4% (1001.0) <kernel core> : hrtimer_start_range_ns (tick_sched_timer)

What I did was to recompile the kernel, using config-vmlinuz-generic-2.6.33.4 with the following changes:

“Processor type and features” > “Timer Frequency” > “300 Hz” (it was set to 1000)
“Processor type and features” > “Tickless System (Dynamic Ticks)” (it wasn't set)
“Processor type and features” > “Preemption model” > “Preemptible kernel”

Now the computer is cool and quiet again. I suppose the problem was in the Timer frequency, because in slackware 12.2 iirc in the nosmp kernel it was set to 250 Hz.

regards

solar

ponce 03-13-2011 04:57 AM

I think the 1000Hz freq has been choosen to increase desktop responsiveness (it matters a lot), but has obviously this backside effect on laptops.
Maybe you can have the best results if you leave it at 1000Hz and if you set the dynamic ticks (that should make the difference for your fans/load), preemptible kernel and desktop preemption model in kernel config.

solarfields 03-13-2011 05:08 AM

i had a similar output of powertop on my old PC that had AMD Athlon Processor. However, since it was a PC I couldnt tell if there was extra heat :) So, I thought it had something to do with old AMD CPUs?

Now, after I have upgraded my PC, my CPU is Intel(R) Pentium(R) CPU G6950, using default generic-smp-2.6.33.4-smp, powertop shows

Top causes for wakeups:
41.3% ( 76.6) <kernel core> : hrtimer_start_range_ns (tick_sched_timer)

76.6 is much less than 1001 ;)

btw, at that time when googling for the problem I found this:

https://bugs.launchpad.net/ubuntu/+s...ux/+bug/373245

ponce 03-13-2011 05:32 AM

personally, on this laptop, I got the config above with no dynamic ticks and 2000Hz :D (but I'm not an example to follow, just a speed-freak ;) )

solarfields 03-13-2011 05:38 AM

heh, when the 1337 slack comes, i may play with the kernel configuration. Personally, I found no difference in the performance between 1000 Hz and 300 Hz ;) I guess, when you _know_ it should run better, then you see it :P

H_TeXMeX_H 03-13-2011 06:13 AM

The only difference might be when playing videos or audio.

dugan 03-13-2011 08:57 AM

For comparison, Windows runs at 300hz.

As for the load, the default setting in Slackware is to turn on CPU frequency scaling only when running on battery power. You might want to change that. See here:

http://wiki.linuxquestions.org/wiki/...ncy_scaling.3F

solarfields 03-13-2011 09:01 AM

my issue had nothing to do with cpu frequency scaling. It is not normal for the cpu to heat up that much when idle, even if running at the highest cpu frequency. :(

thanks for the info, though


All times are GMT -5. The time now is 03:08 PM.