Diff for /wikisrc/tutorials/cpu_frequency_scaling.mdwn between versions 1.1 and 1.2

version 1.1, 2011/11/21 03:22:58 version 1.2, 2012/02/05 07:14:36
Line 1 Line 1
 How to throttle your CPU  How to throttle your CPU 
   
 Basic support is in generic kernels by default. sysctl and sysutils/estd do the rest.  Basic support is in generic kernels by default. sysctl and sysutils/estd do the rest. 
   
 **Contents**  **Contents**
   
 [[!toc levels=3]]  [[!toc levels=3]]
   
 #  i386  #  i386 
   
 ##  AMD PowerNow!  ##  AMD PowerNow! 
          
       options   POWERNOW_K7        options   POWERNOW_K7
          
   
 or  or 
          
       options   POWERNOW_K8        options   POWERNOW_K8
          
   
 accessible through e.g.  accessible through e.g. 
          
       sysctl machdep.powernow.frequency.current        sysctl machdep.powernow.frequency.current
       sysctl machdep.powernow.frequency.available        sysctl machdep.powernow.frequency.available 
       sysctl -w machdep.powernow.frequency.target=600        sysctl -w machdep.powernow.frequency.target=600
          
   
 ##  Intel Speedstep  ##  Intel Speedstep 
          
       options   ENHANCED_SPEEDSTEP        options   ENHANCED_SPEEDSTEP
          
   
 accessible through e.g.  accessible through e.g. 
          
       sysctl machdep.est.frequency.current        sysctl machdep.est.frequency.current
       sysctl machdep.est.frequency.available        sysctl machdep.est.frequency.available
       sysctl -w machdep.est.frequency.target=600        sysctl -w machdep.est.frequency.target=600
          
   
 ##  speedstep-ich  ##  speedstep-ich 
   
   * Available since NetBSD 2.0    * Available since NetBSD 2.0 
          
       ichlpcib* at pci? dev ? function ?        ichlpcib* at pci? dev ? function ?
       isa0 at ichlpcib?        isa0 at ichlpcib?
          
   
 accessible through  accessible through 
          
       sysctl -w machdep.speedstep_state=[0/1]        sysctl -w machdep.speedstep_state=[0/1]
          
   
 where 0 is a low state and 1 is a high state.  where 0 is a low state and 1 is a high state. 
   
 ##  speedstep-smi  ##  speedstep-smi 
   
   * Available since NetBSD 4.0    * Available since NetBSD 4.0 
          
       piixpcib* at pci? dev ? function ?        piixpcib* at pci? dev ? function ?
       isa0 at piixpcib?        isa0 at piixpcib?
          
   
 also accessible through  also accessible through 
          
       sysctl -w machdep.speedstep_state=[0/1]        sysctl -w machdep.speedstep_state=[0/1]
          
   
 ##  Transmeta longrun  ##  Transmeta longrun 
   
   * Should be activated by default    * Should be activated by default 
   
 accessible through  accessible through 
          
       machdep.tm_longrun_mode        machdep.tm_longrun_mode
       machdep.tm_longrun_frequency        machdep.tm_longrun_frequency
       machdep.tm_longrun_voltage        machdep.tm_longrun_voltage
       machdep.tm_percentage        machdep.tm_percentage
          
   
 #  amd64  #  amd64 
   
 ##  Cool'n'Quiet  ##  Cool'n'Quiet 
   
 Same procedure as with PowerNow!:  Same procedure as with PowerNow!: 
          
       options   POWERNOW_K8        options   POWERNOW_K8
          
   
 accessible through e.g.  accessible through e.g. 
          
       sysctl machdep.powernow.frequency.current        sysctl machdep.powernow.frequency.current
       sysctl machdep.powernow.frequency.available        sysctl machdep.powernow.frequency.available 
       sysctl -w machdep.powernow.frequency.target=600        sysctl -w machdep.powernow.frequency.target=600
          
   
 #  Setting up estd for automatic scaling  #  Setting up estd for automatic scaling 
   
 The estd daemon dynamically sets the frequency on SpeedStep and PowerNow!-enabled CPUs depending on current CPU-utilization. It is written for systems running NetBSD or DragonFly.  The estd daemon dynamically sets the frequency on SpeedStep and PowerNow!-enabled CPUs depending on current CPU-utilization. It is written for systems running NetBSD or DragonFly. 
          
       cd /usr/pkgsrc/sysutils/estd        cd /usr/pkgsrc/sysutils/estd
       make install clean        make install clean
          
   
 To make it start at boot-time  To make it start at boot-time 
          
       cp /usr/pkg/share/examples/rc.d/estd /etc/rc.d/        cp /usr/pkg/share/examples/rc.d/estd /etc/rc.d/
       chmod +x /etc/rc.d/estd        chmod +x /etc/rc.d/estd
          
   
 and add to /etc/rc.conf  and add to /etc/rc.conf 
          
       estd="yes"        estd="yes"
       estd_flags=""        estd_flags=""
          
   
 then as root  then as root 
          
       /etc/rc.d/estd restart        /etc/rc.d/estd restart
          
   
   * Examples    * Examples 
   
 Maximize battery lifetime by limiting CPU-frequency to 1000 MHz and switching to lower speeds fast:  Maximize battery lifetime by limiting CPU-frequency to 1000 MHz and switching to lower speeds fast: 
          
       estd_flags="-d -b -M 1000"        estd_flags="-d -b -M 1000"
          
   
 Maximize performance by running at least at 1400MHz and switching to higher speeds real fast:  Maximize performance by running at least at 1400MHz and switching to higher speeds real fast: 
          
       estd_flags="-d -a -m 1400"        estd_flags="-d -a -m 1400"
          
   
 Alternatively, you can start estd directly from /etc/rc.local instead of rc.conf/rc.d.  Alternatively, you can start estd directly from /etc/rc.local instead of rc.conf/rc.d. 
   
 More in the manual.  More in the manual. 
   

Removed from v.1.1  
changed lines
  Added in v.1.2


CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb