Announcement

Collapse
No announcement yet.

Noctua NH-U9S Performance For The AMD Ryzen 9 3950X + Ondemand vs. Performance Governors

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

  • M@yeulC
    replied
    Originally posted by atomsymbol View Post

    Are you sure you have frequency scaling enabled in BIOS and in kernel config?
    I'd have to double check the BIOS, but seems OK to me (albeit built as modules).

    Code:
    % zgrep -i freq /proc/config.gz
    CONFIG_ACPI_CPU_FREQ_PSS=y
    # CPU Frequency scaling
    CONFIG_CPU_FREQ=y
    CONFIG_CPU_FREQ_GOV_ATTR_SET=y
    CONFIG_CPU_FREQ_GOV_COMMON=y
    CONFIG_CPU_FREQ_STAT=y
    # CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
    # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
    # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
    # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
    # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
    CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y
    CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
    CONFIG_CPU_FREQ_GOV_POWERSAVE=m
    CONFIG_CPU_FREQ_GOV_USERSPACE=m
    CONFIG_CPU_FREQ_GOV_ONDEMAND=m
    CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
    CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
    # CPU frequency scaling drivers
    CONFIG_CPUFREQ_DT=m
    CONFIG_CPUFREQ_DT_PLATDEV=y
    CONFIG_X86_PCC_CPUFREQ=m
    CONFIG_X86_ACPI_CPUFREQ=m
    CONFIG_X86_ACPI_CPUFREQ_CPB=y
    CONFIG_X86_AMD_FREQ_SENSITIVITY=m
    # end of CPU Frequency scaling
    CONFIG_DEVFREQ_THERMAL=y
    CONFIG_PM_DEVFREQ=y
    # DEVFREQ Governors
    CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=m
    CONFIG_DEVFREQ_GOV_PERFORMANCE=m
    CONFIG_DEVFREQ_GOV_POWERSAVE=m
    CONFIG_DEVFREQ_GOV_USERSPACE=m
    CONFIG_DEVFREQ_GOV_PASSIVE=m
    # DEVFREQ Drivers
    CONFIG_PM_DEVFREQ_EVENT=y
    # Frequency Synthesizers DDS/PLL
    # Phase-Locked Loop (PLL) frequency synthesizers
    # end of Phase-Locked Loop (PLL) frequency synthesizers
    # end of Frequency Synthesizers DDS/PLL

    Leave a comment:


  • atomsymbol
    replied
    Originally posted by [email protected] View Post
    Thanks for the insight... About setting the governor, though, I was never able to do so (currently on Arch with zen kernel, used vanilla until yesterday with same result, though).
    Are you sure you have frequency scaling enabled in BIOS and in kernel config?

    Code:
    $ zgrep -i freq /proc/config.gz
    CONFIG_ACPI_CPU_FREQ_PSS=y
    # CPU Frequency scaling
    CONFIG_CPU_FREQ=y
    CONFIG_CPU_FREQ_GOV_ATTR_SET=y
    CONFIG_CPU_FREQ_GOV_COMMON=y
    CONFIG_CPU_FREQ_STAT=y
    CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
    CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
    CONFIG_CPU_FREQ_GOV_POWERSAVE=y
    CONFIG_CPU_FREQ_GOV_USERSPACE=y
    CONFIG_CPU_FREQ_GOV_ONDEMAND=y
    # CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
    CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
    # CPU frequency scaling drivers
    # CONFIG_X86_PCC_CPUFREQ is not set
    CONFIG_X86_ACPI_CPUFREQ=y
    CONFIG_X86_ACPI_CPUFREQ_CPB=y
    CONFIG_X86_AMD_FREQ_SENSITIVITY=y
    # end of CPU Frequency scaling
    # CONFIG_PM_DEVFREQ is not set

    Leave a comment:


  • M@yeulC
    replied
    Originally posted by atomsymbol View Post

    According to my measurements, ondemand saves about 10 Watts on desktop Ryzen at the outlet when performing light tasks such as playing a Youtube video.

    But tasks tend to run 5% slower with ondemand governor compared to performance, so the performance governor returns to idle sooner than ondemand when the task completes.

    In CPU-intensive scenarios, ondemand (by definition) saves no power.

    The turbostat tool can be used to measure power consumption from a Linux terminal ("linux-tools" package in Ubuntu), although it isn't exactly the same as measuring power at the outlet.



    Code:
    sudo cpupower frequency-set -g performance
    Thanks for the insight... About setting the governor, though, I was never able to do so (currently on Arch with zen kernel, used vanilla until yesterday with same result, though).

    Code:
     ~ % head /proc/cpuinfo
    processor    : 0
    vendor_id    : AuthenticAMD
    cpu family    : 23
    model        : 8
    model name    : AMD Ryzen 7 2700X Eight-Core Processor
    stepping    : 2
    microcode    : 0x800820d
    cpu MHz        : 3504.598
    cache size    : 512 KB
    physical id    : 0
     ~ % LC_ALL=C sudo cpupower frequency-info
    analyzing CPU 0:
      no or unknown cpufreq driver is active on this CPU
      CPUs which run at the same hardware frequency: Not Available
      CPUs which need to have their frequency coordinated by software: Not Available
      maximum transition latency:  Cannot determine or is not supported.
    Not Available
      available cpufreq governors: Not Available
      Unable to determine current policy
      current CPU frequency: Unable to call hardware
      current CPU frequency:  Unable to call to kernel
      boost state support:
        Supported: yes
        Active: yes
        Boost States: 0
        Total States: 3
        Pstate-P0:  3700MHz
        Pstate-P1:  3200MHz
        Pstate-P2:  2200MHz
     ~ % LC_ALL=C sudo cpupower frequency-set -g performance
    Setting cpu: 0
    Error setting new values. Common errors:
    - Do you have proper administration rights? (super-user?)
    - Is the governor you requested available and modprobed?
    - Trying to set an invalid policy?
    - Trying to set a specific frequency, but userspace governor is not available,
       for example because of hardware which cannot be set to a specific frequency
       or because the userspace governor isn't loaded?
    (I also get that after modprobing cpufreq_userspace)

    Leave a comment:


  • torsionbar28
    replied
    Originally posted by GreenReaper View Post
    The monsters - no one kernel should have all that power! It's the MCP all over again....
    Yeah, you're right, we should move that functionality and power into systemd!

    Leave a comment:


  • GreenReaper
    replied
    Originally posted by Linuxxx View Post
    Exactly! It's all about giving the Linux kernel control over the whole hardware-stack, from top-to-bottom!
    The monsters - no one kernel should have all that power! It's the MCP all over again....

    Leave a comment:


  • Linuxxx
    replied
    Originally posted by GreenReaper View Post
    I don't think the ondemand governor is going to be optimal for a benchmark usage pattern, which naturally has a higher level of usage than usual.

    That said, I've always preferred use of the performance governor and I think especially on modern CPUs it works out well because it delegates the decision to the processor, essentially just setting a performance bias. The CPU is probably in the best position to make the fast decisions about how to use power most effectively.
    Then, please explain, why do Linux kernel developers want AMD to move over to the schedutil governor for their Zen CPUs?

    Here's a hint:
    They don't want the CPU to have the final word in the decision-making queue, since the Linux kernel has way more knowledge about what is currently happening than the dumb firmware/microcode inside the CPU!

    An analogy can be seen in NVMe-SSDs:
    Why do You think Facebook developed the >>Kyber<< IO-scheduler, when they could have delegated the decision-making to the embedded micro-controller on those drives, since, You know, they are smart enough already?

    Exactly! It's all about giving the Linux kernel control over the whole hardware-stack, from top-to-bottom!

    Leave a comment:


  • atomsymbol
    replied
    Originally posted by [email protected] View Post
    I'd be really interested in power usage figures.
    According to my measurements, ondemand saves about 10 Watts on desktop Ryzen at the outlet when performing light tasks such as playing a Youtube video.

    But tasks tend to run 5% slower with ondemand governor compared to performance, so the performance governor returns to idle sooner than ondemand when the task completes.

    In CPU-intensive scenarios, ondemand (by definition) saves no power.

    The turbostat tool can be used to measure power consumption from a Linux terminal ("linux-tools" package in Ubuntu), although it isn't exactly the same as measuring power at the outlet.

    How do you set the governor on Ryzen CPUs, BTW?
    Code:
    sudo cpupower frequency-set -g performance

    Leave a comment:


  • angrypie
    replied
    Originally posted by atomsymbol View Post

    You probably mean sampling_down_factor, not sampling_rate. The sampling_rate on my machine is 20000 (by default).
    Yeah, you're right. I always confuse the two.

    Leave a comment:


  • torsionbar28
    replied
    Originally posted by GreenReaper View Post
    I don't think the ondemand governor is going to be optimal for a benchmark usage pattern, which naturally has a higher level of usage than usual.

    That said, I've always preferred use of the performance governor and I think especially on modern CPUs it works out well because it delegates the decision to the processor, essentially just setting a performance bias. The CPU is probably in the best position to make the fast decisions about how to use power most effectively.
    I think you're probably right, however I've observed idle power consumption being significantly higher on the same system when using performance vs. on demand. Even on my 6 year old desktop peecee, There's a 26 watt difference at the wall socket between the two.

    Edit: Isn't the feral gamemode daemon supposed to manage this in a better way? i.e. automatically switching to performance governor when you start playing a game, and then switching back to ondemand after you're finished.
    Last edited by torsionbar28; 02-11-2020, 01:07 PM.

    Leave a comment:


  • microcode
    replied
    I too approve of the memory bling, DIMM shady.

    Leave a comment:

Working...
X