Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Ondemand vs. Performance CPU Governing For AMD FX CPUs On Linux 3.17

  1. #1
    Join Date
    Jan 2007
    Posts
    14,829

    Default Ondemand vs. Performance CPU Governing For AMD FX CPUs On Linux 3.17

    Phoronix: Ondemand vs. Performance CPU Governing For AMD FX CPUs On Linux 3.17

    Given recent comments by Phoronix readers, here are some fresh results from the AMD FX-9590 Eight-Core CPU when testing the different CPU scaling governors with the CPUfreq driver on the Linux 3.17 kernel.

    http://www.phoronix.com/vr.php?view=20839

  2. #2

    Default

    What happens if you change cpufreq's up_threshold to something lower than 95%?

    Try:
    # echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
    (Sets cpufreq to scale higher when load hits 50%)
    # echo 100 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor 50
    (Reduces frequency of the "Do I need to scale back down?" question at higher clocks)

    More reading: https://www.kernel.org/doc/Documenta.../governors.txt

  3. #3
    Join Date
    Jan 2008
    Location
    South Africa
    Posts
    233

    Default

    Quote Originally Posted by A Laggy Grunt View Post
    What happens if you change cpufreq's up_threshold to something lower than 95%?

    Try:
    # echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
    (Sets cpufreq to scale higher when load hits 50%)
    # echo 100 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor 50
    (Reduces frequency of the "Do I need to scale back down?" question at higher clocks)

    More reading: https://www.kernel.org/doc/Documenta.../governors.txt
    +1

    I found even:
    echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
    echo 100 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
    provided me with rather noticeable performance improvements (especially browser smoothness)

  4. #4
    Join Date
    Mar 2011
    Posts
    219

    Default

    Quote Originally Posted by grigi View Post
    +1

    I found even:
    echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
    echo 100 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
    provided me with rather noticeable performance improvements (especially browser smoothness)
    I have been doing the same for a while now. The default values give good power savings on laptops, but for desktops is this not really critical and one can increase its aggressiveness a notch. I use the sysfs tools for it and added it into my /etc/sysfs.conf file:

    Code:
    # set ondemand CPU governor to switch up at 50% load and stay up 10x longer
    devices/system/cpu/cpufreq/ondemand/up_threshold = 50
    devices/system/cpu/cpufreq/ondemand/sampling_down_factor = 10
    
    devices/system/cpu/cpu0/cpufreq/scaling_governor = ondemand
    devices/system/cpu/cpu1/cpufreq/scaling_governor = ondemand
    devices/system/cpu/cpu2/cpufreq/scaling_governor = ondemand
    devices/system/cpu/cpu3/cpufreq/scaling_governor = ondemand
    
    # enable power saving on SATA links
    class/scsi_host/host0/link_power_management_policy = min_power
    class/scsi_host/host1/link_power_management_policy = min_power
    class/scsi_host/host2/link_power_management_policy = min_power
    class/scsi_host/host3/link_power_management_policy = min_power
    
    # Seagate ST1000DM003-1CH162
    # set scheduler and KB size for read-ahead operations
    block/sda/queue/scheduler = cfq
    block/sda/queue/read_ahead_kb = 1024
    
    # INTEL SSDSA2MH080G1GC
    # set scheduler and KB size for read-ahead operations
    block/sdb/queue/scheduler = deadline
    block/sda/queue/read_ahead_kb = 256
    This is an example. One can tweak other settings with it as well as you can see here.

  5. #5
    Join Date
    Jan 2008
    Location
    South Africa
    Posts
    233

    Default

    I am using those values on a notebook, and have noticed no impact on battery life at all :-)

  6. #6
    Join Date
    Mar 2012
    Posts
    318

    Default

    Quote Originally Posted by sdack View Post
    I have been doing the same for a while now. The default values give good power savings on laptops, but for desktops is this not really critical and one can increase its aggressiveness a notch. I use the sysfs tools for it and added it into my /etc/sysfs.conf file:

    Code:
    # set ondemand CPU governor to switch up at 50% load and stay up 10x longer
    devices/system/cpu/cpufreq/ondemand/up_threshold = 50
    devices/system/cpu/cpufreq/ondemand/sampling_down_factor = 10
    
    devices/system/cpu/cpu0/cpufreq/scaling_governor = ondemand
    devices/system/cpu/cpu1/cpufreq/scaling_governor = ondemand
    devices/system/cpu/cpu2/cpufreq/scaling_governor = ondemand
    devices/system/cpu/cpu3/cpufreq/scaling_governor = ondemand
    
    # enable power saving on SATA links
    class/scsi_host/host0/link_power_management_policy = min_power
    class/scsi_host/host1/link_power_management_policy = min_power
    class/scsi_host/host2/link_power_management_policy = min_power
    class/scsi_host/host3/link_power_management_policy = min_power
    
    # Seagate ST1000DM003-1CH162
    # set scheduler and KB size for read-ahead operations
    block/sda/queue/scheduler = cfq
    block/sda/queue/read_ahead_kb = 1024
    
    # INTEL SSDSA2MH080G1GC
    # set scheduler and KB size for read-ahead operations
    block/sdb/queue/scheduler = deadline
    block/sda/queue/read_ahead_kb = 256
    This is an example. One can tweak other settings with it as well as you can see here.
    is this also advisable for old intel core2quad cpus? Or only amd?

  7. #7
    Join Date
    Jan 2008
    Location
    South Africa
    Posts
    233

    Default

    Quote Originally Posted by tomtomme View Post
    is this also advisable for old intel core2quad cpus? Or only amd?
    This is for any system that uses ondemand, which is anything from Intel, AMD, ARM, etc... Very likely your Core2, yes.

  8. #8
    Join Date
    Feb 2008
    Posts
    943

    Default

    Only Intel SandyBridge+ are special and uses pstate, if you have any other processor from pretty much any other vendor you can use this .

  9. #9
    Join Date
    Jan 2013
    Posts
    989

    Default

    Please see this

    You must measure your values individually! But the culprit is that "Active" task on server and on desktop are different things!
    On Desktop, *any* task that is not idling task, should already wake CPU.
    Last edited by brosis; 09-02-2014 at 06:51 AM.

  10. #10
    Join Date
    Mar 2012
    Posts
    318

    Default

    Quote Originally Posted by grigi View Post
    +1

    I found even:
    echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
    echo 100 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
    provided me with rather noticeable performance improvements (especially browser smoothness)
    Do I have to restart the PC or is it applied immediately?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •