Author Topic: kernel and cpu governor  (Read 344 times)

Offline Yankee

  • Hero Member
  • *****
  • Posts: 1477
  • In theory, theory=practice, in practice ???
kernel and cpu governor
« on: February 05, 2013, 04:48:43 PM »
Probably should direct this @gseaman, the kernel man


Question :    Is it possible to get the kernel built with the cpu governor
set to performance by default ?

I think 90 % of ther users would prefer it as only laptop users might
want to scale speed down to conserve battery life.    Then the cpufreq
utilities could be used.    Otherwise not needed, the speed is already set.

THX

Y
ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Online gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3791
Re: kernel and cpu governor
« Reply #1 on: February 05, 2013, 07:18:47 PM »
I don't make changes like that on my own. If the gurus want it changed, then I change it. ;)

Galen

Offline veronicathecow

  • Full Member
  • ***
  • Posts: 185
Re: kernel and cpu governor
« Reply #2 on: February 06, 2013, 12:39:18 AM »
Hi Yankee, with respect I must be one of the 10% because I would prefer defaults that save energy and reduce the damage to the planet.
A few million PCs saving 20 watts (or more) each is a lot of power. If you have a need for speed then you probably know how to adjust it or can find it on the net.
The average PC user probably does not even know such a thing exists.
Cheers
Tony

Offline Yankee

  • Hero Member
  • *****
  • Posts: 1477
  • In theory, theory=practice, in practice ???
Re: kernel and cpu governor
« Reply #3 on: February 07, 2013, 09:46:49 AM »
The average PC user probably does not even know such a thing exists.

Hi,

I think every iso in the country is stuck on "ondemand".
Trying to install and the thing is stuck at 800 mhz, well
it just takes twice as long.   The bigger the slower.   Something
else I discovered that slows things down.

My power supply is only 20 watts  I think, the print is micro-micro.   

Thanks for the response(s)

Y
ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline veronicathecow

  • Full Member
  • ***
  • Posts: 185
Re: kernel and cpu governor
« Reply #4 on: February 07, 2013, 10:51:27 AM »
Hi Yankee, I am wondering if there is a problem with the power control of your system.? Is the maximum frequency you CPU 1.6 Ghz?
If your PSU is 20 watts I am guessing you are using the Atom based PC? I had one but the built in Intel graphics chip support was dire. One with an Nvidia built in graphics was so much faster.
I have an AMD that can run at 3000Mhz and most of the time it is running at 800Mhz.
Perhaps we can help? I overclocked my 1.6Ghz atom and it was stable at 2GHz
Would Puppy linux suit this machine better?
Cheers


« Last Edit: February 07, 2013, 11:30:26 AM by veronicathecow »

Offline Yankee

  • Hero Member
  • *****
  • Posts: 1477
  • In theory, theory=practice, in practice ???
Re: kernel and cpu governor
« Reply #5 on: February 07, 2013, 12:46:38 PM »
Hi Yankee, I am wondering if there is a problem with the power control of your system.? Is the maximum frequency you CPU 1.6 Ghz?
If your PSU is 20 watts I am guessing you are using the Atom based PC? I had one but the built in Intel graphics chip support was dire. One with an Nvidia built in graphics was so much faster.
I have an AMD that can run at 3000Mhz and most of the time it is running at 800Mhz.
Perhaps we can help? I overclocked my 1.6Ghz atom and it was stable at 2GHz
Would Puppy linux suit this machine better?
Cheers

Actually the ASUS900 w/Atom 1.6 works quite well.    So I just set the governor
to performance/1600mhz and it runs and runs and runs.    Not hot at all.

I'm wondering if there's a kernel option in menu.lst that would set the governor ?

My next machine I'll get at least a Nvidia Ion or an Intel HD 4000.

Cheers,

Thanks for the response.

Y
ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline veronicathecow

  • Full Member
  • ***
  • Posts: 185
Re: kernel and cpu governor
« Reply #6 on: February 07, 2013, 02:05:24 PM »
Hi Yankee, I had an ion MB I found to be very good.
I am assuming that your other machine is also an atom based device?

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
gives me ondemand conservative powersave userspace performance on my system, does it give you the same?

Not sure but this is an in depth article that might help you
http://www.ibm.com/developerworks/library/l-cpufreq-2/

Combined with this part cpufreq_performance of here
http://blog.peacon.co.uk/wiki/Enabling_power_management_on_Debian

I have found the following in /etc/rc.d/init.d/cpufreq and have to wonder if changing the value highlighted in red to the the maximum would  work.
I should point out that I have reached (and probably well exceeded) the limit of my knowledge so hope I am not sending you on the wrong path. So please only try this if you are desperate and don't mind blowing up your machine okay?  8-)
There is probably a lot simpler way but I have spent the last 20 minutes looking but not found anything that I can translate to PCLiunxos
Fingers crossed
Tony

#!/bin/bash
#
### BEGIN INIT INFO
# Provides: cpufreq
# Default-Start: 2 3 4 5
# Short-Description: Set CPU frequency settings
# Description: Set CPU frequency settings
### END INIT INFO

# Source function library.
. /etc/rc.d/init.d/functions

RETVAL=0

start() {
   gprintf "Setting CPU frequency settings: "
   touch /var/lock/subsys/cpufreq
   test -f /etc/sysconfig/cpufreq && . /etc/sysconfig/cpufreq
   for cpu in /sys/devices/system/cpu/* ; do
      [ "x$GOVERNOR" != "x" ] && [ -f  $cpu/cpufreq/scaling_governor ] && echo $GOVERNOR > $cpu/cpufreq/scaling_governor
      [ "x$MAX_FREQ" != "x" ] && [ -f  $cpu/cpufreq/scaling_max_freq ] && echo $MAX_FREQ > $cpu/cpufreq/scaling_max_freq
      [ "x$MIN_FREQ" != "x" ] && [ -f  $cpu/cpufreq/scaling_min_freq ] && echo $MIN_FREQ > $cpu/cpufreq/scaling_min_freq
   done
   success
   echo





Offline Yankee

  • Hero Member
  • *****
  • Posts: 1477
  • In theory, theory=practice, in practice ???
Re: kernel and cpu governor
« Reply #7 on: February 07, 2013, 04:29:27 PM »
#change cpu freq to 1600mhz
cpufreq-set -r -g performance -u 1600mhz

I add the above two lines to /etc/rc.local.

Sometimes each cpu or thread has to be addressed.   The cpufrequtils
package has to be installed.   

I installed some distro a few weeks ago and the darn thing was
actually stuck at 100mhz ondemand.    Now I know how a
486 DX100 works, again.    Best machine I ever had.     ;D

Actually conservative mode works better than ondemand, low
and high set to whatever they are correctly.
ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline veronicathecow

  • Full Member
  • ***
  • Posts: 185
Re: kernel and cpu governor
« Reply #8 on: February 07, 2013, 05:12:01 PM »
Hi Yankee, well done for sorting that, I am sure you won't be the only person interested in doing this.
DX100, yup they really moved. I'm pretty sure I had one that was a lot faster than a P90 (The processor and not the gun used in Stargate which is where my mind first wandered...... 8-)
I will try conservative mode sometime but I read that it make things a bit laggy.
Have fun
Tony

Offline Yankee

  • Hero Member
  • *****
  • Posts: 1477
  • In theory, theory=practice, in practice ???
Re: kernel and cpu governor
« Reply #9 on: February 07, 2013, 05:53:04 PM »
DX100, yup they really moved.

Yeah, and every time the upped the processor speed 100mhz
they wanted another $1200 per computer for a whole office
full of new computers, or the new program wouldn't work.

Can't help but think there wouldn't have been a better way to do that.
Seems to have stabilized recently.

Conservative starts low and just moves to high.  OnDemand,
it must have a bug.   I've seen it start high and move to low and
just plain stick at a low speed.

Have a good one too, Tony


Patrick
ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE