Announcement

Collapse
No announcement yet.

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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    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

    Comment


    • #3
      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)

      Comment


      • #4
        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.

        Comment


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

          Comment


          • #6
            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?

            Comment


            • #7
              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.

              Comment


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

                Comment


                • #9
                  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; 02 September 2014, 06:51 AM.

                  Comment


                  • #10
                    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?

                    Comment

                    Working...
                    X