CPU frequency scaling setting

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • oceanwave
    Member
    Forum Explorer
    • Dec 2024
    • 44

    #1

    CPU frequency scaling setting

    Is there a software setting in Cloudlinux 9 to enable/disable CPU frequency scaling?

    Looking at munin graphs, I have one CL9 server that is a 2236G cpu that shows CPU frequency scaling cur 4.5G min 824M avg 4.54G Max 4.7G
    Two different CL9 servers brought online a year later with 2388G cpus, munin graphs show CPU frequency scaling cur 3.2G min 3.19G avg 3.2G max 3.21G

    Is there a setting to enable/disable or configure cpu frequency scaling, or is this setting all in the server's bios before it boots?
  • Answer selected by bogdan.sh at 05-14-2026, 06:55 AM.
    bogdan.sh
    Administrator
    • Nov 2016
    • 1298

    Yes, the intel_pstate is newer. Researched a bit and the decision flow is the following during the boot process:

    1. The kernel first checks if the processor is a supported Intel model. If it is, it looks for Hardware P-States (HWP).

    2. If the CPU reports HWP support via the CPUID instruction and the feature is enabled in the hardware (the ACPI table provided by BIOS), the kernel attempts to load intel_pstate.

    3. If the BIOS has "Intel Speed Shift" or "Autonomous Core Power Management" set to Disabled, the CPU hides its HWP capabilities - the kernel falls back to the generic acpi-cpufreq driver.

    So, next time you might want to check the options in BIOS. I also don't think it's a real issue, while finding the roto cause seems reasonable

    Comment

    • bogdan.sh
      Administrator
      • Nov 2016
      • 1298

      #2
      The best help page for years is https://wiki.archlinux.org/title/CPU_frequency_scaling . There could be multiple places where CPUscaling is enabled, not specially in CloudLinux.

      Same time worth checking this (and result from a test machine):

      Code:
      # tuned-adm active
      Current active profile: cloudlinux-default-cgv1
      While `tuned-adm list` will provide you a bunch of options, including profiles shipped with CloudLinux.

      Comment

      • oceanwave
        Member
        Forum Explorer
        • Dec 2024
        • 44

        #3
        Thanks.

        On both the E2236 and E2388 servers, #tuned-adm active returns:
        Current active profile: cloudlinux-default-cgv1

        However, I notice a difference as follows:

        The older Intel E-2236 CL9 server has
        # cpupower frequency-info = driver: intel_pstate
        and shows max frequency 4.80 Ghz
        # lscpu shows max 4800 Mhz

        The newer E-2388G CL9 server has
        # cpupower frequency-info = driver: acpi-cpufreq
        and shows max frequency 3.20 Ghz
        # lscpu shows max 3201 Mhz (+1 over 3200), but
        # turbostat shows BzyMhz scaling up to 5Ghz.

        /etc/default/grub does not contain "intel_pstate=disable" (or any reference to intel_pstate)

        Question:

        Why does the Intel E-2236 CL9 server use intel_pstate and the newer Intel E-2388G CL9 server use acpi-cpufreq?

        I find conflicting info online on which is an advantage for optimal performance.

        Any thoughts on which delivers better performance for a nweer E-2388G CPU?

        Comment

        • oceanwave
          Member
          Forum Explorer
          • Dec 2024
          • 44

          #4
          E-2236
          Code:
          ----------
          
          # cpupower frequency-info
          
          analyzing CPU 10:
            driver: intel_pstate
            CPUs which run at the same hardware frequency: 10
            CPUs which need to have their frequency coordinated by software: 10
            energy performance preference: performance
            hardware limits: 800 MHz - 4.80 GHz
            available cpufreq governors: performance powersave
            current policy: frequency should be within 800 MHz and 4.80 GHz.
                            The governor "performance" may decide which speed to use
                            within this range.
            current CPU frequency: 4.60 GHz (asserted by call to kernel)
            boost state support:
              Supported: yes
              Active: yes
          
          ----------
          
          # lscpu
          
          Architecture:                x86_64
            CPU op-mode(s):            32-bit, 64-bit
            Address sizes:             39 bits physical, 48 bits virtual
            Byte Order:                Little Endian
          CPU(s):                      12
            On-line CPU(s) list:       0-11
          Vendor ID:                   GenuineIntel
            BIOS Vendor ID:            Intel(R) Corporation
            Model name:                Intel(R) Xeon(R) E-2236 CPU @ 3.40GHz
              BIOS Model name:         Intel(R) Xeon(R) E-2236 CPU @ 3.40GHz
              CPU family:              6
              Model:                   158
              Thread(s) per core:      2
              Core(s) per socket:      6
              Socket(s):               1
              Stepping:                10
              CPU(s) scaling MHz:      87%
              CPU max MHz:             4800.0000
              CPU min MHz:             800.0000
              BogoMIPS:                6799.81
              Flags:                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr ss
                                       e sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nop
                                       l xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 s
                                       dbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c
                                       rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb pti ssbd ibrs ibpb stibp tpr_shadow flexpriority ep
                                       t vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt in
                                       tel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp
                                       vnmi md_clear flush_l1d arch_capabilities
          Virtualization features:    
            Virtualization:            VT-x
          Caches (sum of all):        
            L1d:                       192 KiB (6 instances)
            L1i:                       192 KiB (6 instances)
            L2:                        1.5 MiB (6 instances)
            L3:                        12 MiB (1 instance)
          NUMA:                        
            NUMA node(s):              1
            NUMA node0 CPU(s):         0-11
          E-2388G
          Code:
          # cpupower frequency-info
          
          analyzing CPU 0:
            driver: acpi-cpufreq
            CPUs which run at the same hardware frequency: 0
            CPUs which need to have their frequency coordinated by software: 0
            maximum transition latency: 10.0 us
            hardware limits: 800 MHz - 3.20 GHz
            available frequency steps:  3.20 GHz, 3.20 GHz, 3.10 GHz, 3.00 GHz, 2.90 GHz, 2.80 GHz, 2.70 GHz, 2.60 GHz, 2.50 GHz, 2.40 GHz, 2.30 GHz, 2.20 GHz, 2.10 GHz, 2.00 GHz, 1.90 GHz, 1.80 GHz, 1.70 GHz, 1.60 GHz, 1.50 GHz, 1.40 GHz, 1.30 GHz, 1.20 GHz, 1.10 GHz, 1000 MHz, 900 MHz, 800 MHz
            available cpufreq governors: conservative ondemand userspace powersave performance schedutil
            current policy: frequency should be within 800 MHz and 3.20 GHz.
                            The governor "performance" may decide which speed to use
                            within this range.
            current CPU frequency: 3.96 GHz (asserted by call to kernel)
            boost state support:
              Supported: yes
              Active: yes
          
          ----------
          
          # lscpu
          
          Architecture:                x86_64
            CPU op-mode(s):            32-bit, 64-bit
            Address sizes:             39 bits physical, 48 bits virtual
            Byte Order:                Little Endian
          CPU(s):                      16
            On-line CPU(s) list:       0-15
          Vendor ID:                   GenuineIntel
            BIOS Vendor ID:            Intel(R) Corporation
            Model name:                Intel(R) Xeon(R) E-2388G CPU @ 3.20GHz
              BIOS Model name:         Intel(R) Xeon(R) E-2388G CPU @ 3.20GHz
              CPU family:              6
              Model:                   167
              Thread(s) per core:      2
              Core(s) per socket:      8
              Socket(s):               1
              Stepping:                1
              Frequency boost:         enabled
              CPU(s) scaling MHz:      100%
              CPU max MHz:             3201.0000
              CPU min MHz:             800.0000
              BogoMIPS:                6384.00
              Flags:                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp
                                        lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cp
                                       l vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3
                                       dnowprefetch cpuid_fault epb ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 e
                                       rms invpcid mpx avx512f avx512dq rdseed adx smap avx512ifma clflushopt intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves
                                       dtherm ida arat pln pts vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm md
                                       _clear flush_l1d arch_capabilities
          Virtualization features:    
            Virtualization:            VT-x
          Caches (sum of all):        
            L1d:                       384 KiB (8 instances)
            L1i:                       256 KiB (8 instances)
            L2:                        4 MiB (8 instances)
            L3:                        16 MiB (1 instance)
          NUMA:                        
            NUMA node(s):              1
            NUMA node0 CPU(s):         0-15
          
          ----------
          
          # turbostat
          
          turbostat version 2025.04.06 - Len Brown <lenb@kernel.org>
          Kernel command line: BOOT_IMAGE=(hd0,gpt2)/vmlinuz-5.14.0-611.54.1.el9_7.x86_64 root=UUID=<removed> ro resume=UUID=<removed> selinux=0 crashkernel=1G-2G:192M,2G-64G:256M,64G-:512M selinux=0 cgroup.memory=nokmem systemd.unified_cgroup_hierarchy=0 systemd.legacy_systemd_cgroup_controller
          CPUID(0): GenuineIntel 0x1b CPUID levels
          CPUID(1): family:model:stepping 0x6:a7:1 (6:167:1) microcode 0x65
          CPUID(0x80000000): max_extended_levels: 0x80000008
          CPUID(1): SSE3 MONITOR SMX EIST TM2 TSC MSR ACPI-TM HT TM
          CPUID(6): APERF, TURBO, DTS, PTM, No-HWP, No-HWPnotify, No-HWPwindow, No-HWPepp, No-HWPpkg, EPB
          cpu0: MSR_IA32_MISC_ENABLE: 0x00850089 (TCC EIST MWAIT PREFETCH TURBO)
          CPUID(7): SGX No-Hybrid
          cpu0: MSR_IA32_FEATURE_CONTROL: 0x00020005 (Locked )
          CPUID(0x15): eax_crystal: 2 ebx_tsc: 266 ecx_crystal_hz: 24000000
          TSC: 3192 MHz (24000000 Hz * 266 / 2 / 1000000)
          CPUID(0x16): base_mhz: 3200 max_mhz: 5100 bus_mhz: 100
          cpu0: MSR_PLATFORM_INFO: 0x8080838f1812000
          8 * 100.0 = 800.0 MHz max efficiency frequency
          32 * 100.0 = 3200.0 MHz base frequency
          cpu0: MSR_TURBO_RATIO_LIMIT: 0x2e2f303131323233
          46 * 100.0 = 4600.0 MHz max turbo 8 active cores
          47 * 100.0 = 4700.0 MHz max turbo 7 active cores
          48 * 100.0 = 4800.0 MHz max turbo 6 active cores
          49 * 100.0 = 4900.0 MHz max turbo 5 active cores
          49 * 100.0 = 4900.0 MHz max turbo 4 active cores
          50 * 100.0 = 5000.0 MHz max turbo 3 active cores
          50 * 100.0 = 5000.0 MHz max turbo 2 active cores
          51 * 100.0 = 5100.0 MHz max turbo 1 active cores
          .....

          Comment

          • bogdan.sh
            Administrator
            • Nov 2016
            • 1298

            #5
            The intel_pstate is set by hardware during the initial OS installation, and the only option to disable CPU frequency scaling is to edit grub, rebuild grub and reboot server.


            The acpi-cpufreq is more 'soft' and can be adjusted on fly, first check options per core:

            Code:
            cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
            And if not "performance" just echo to that file and it's done during runtime:

            Code:
            for CPUFREQ in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do [ -f $CPUFREQ ] || continue; echo -n performance > $CPUFREQ; done
            While solid settings can be set to /etc/sysconfig/cpupower
            Last edited by bogdan.sh; 05-11-2026, 05:35 AM.

            Comment

            • oceanwave
              Member
              Forum Explorer
              • Dec 2024
              • 44

              #6
              The datacenter installed the Cloudlinux 9 OS on the servers:
              -in 2024 on the Intel 2236 (shows intel_pstate driver)
              -in 2025 and 2026 on Intel 2388 servers (shows acpi-cpufreq driver)

              Is AI correct that intel_pstate driver is newer and preferred for intel cpus and default for cloudlinux 9 on intel cpus?

              Question:
              Did cloudlinux 9 change the preferred driver from intel_pstate ​(2024 CL9 installation) to acpi-cpufreq (2025 and newer CL9 installation) ?
              Or is it something about Intel E-2388G CPU that makes cloudlinux 9 use the acpi-cpufreq driver instead of intel_pstate?

              I started this question because of a munin graphing anomaly not graphing cpu frequency correctly on the 2388 cpus; turbostat shows it scaling fine, and whm cpu info also shows cores at speeds of 5Ghz. So no real problem with frequency scaling delivering performance, but I'm left with the question of why the newer Cloudlinux 9 installs on newer CPUs seem to be using the older acpi-cpufreq driver rather than the intel_pstate driver which AI seems to indicate is preferred for intel cpus and by cloudlinux 9 ... I don't see intel_pstate disabled in grub, so why are the newer installs using acpi-cpufreq?


              Comment

              • bogdan.sh
                Administrator
                • Nov 2016
                • 1298

                #7
                Yes, the intel_pstate is newer. Researched a bit and the decision flow is the following during the boot process:

                1. The kernel first checks if the processor is a supported Intel model. If it is, it looks for Hardware P-States (HWP).

                2. If the CPU reports HWP support via the CPUID instruction and the feature is enabled in the hardware (the ACPI table provided by BIOS), the kernel attempts to load intel_pstate.

                3. If the BIOS has "Intel Speed Shift" or "Autonomous Core Power Management" set to Disabled, the CPU hides its HWP capabilities - the kernel falls back to the generic acpi-cpufreq driver.

                So, next time you might want to check the options in BIOS. I also don't think it's a real issue, while finding the roto cause seems reasonable

                Comment

                • oceanwave
                  Member
                  Forum Explorer
                  • Dec 2024
                  • 44

                  #8
                  Thank you very much, as always, for the correct answer.

                  Going through the bios, Intel SpeedStep was Enabled but Intel Speed Shift (HWP) was Disabled -- changing Intel Speed Shift to "Native" and rebooting allows CL9 to use the intel_pstate driver now.

                  I'm not sure why, but it appears Supermicro ships (some?) motherboards with Intel Speed Shift Disabled by default; as far as I read, it appears windows and linux both usually benefit slightly in terms of performance.

                  Thanks again.

                  Comment

                  • bogdan.sh
                    Administrator
                    • Nov 2016
                    • 1298

                    #9
                    Happy to hear it was sorted!

                    Comment

                    • oceanwave
                      Member
                      Forum Explorer
                      • Dec 2024
                      • 44

                      #10
                      Just to make sure my reply isn't ambiguous if read later on, I should have added:
                      I'm not sure why, but it appears Supermicro ships (some?) motherboards with Intel Speed Shift Disabled by default; as far as I read, it appears windows and linux both usually benefit slightly in terms of performance by having Speed Shift (HWP) Enabled
                      Thanks again!

                      Comment

                      • bogdan.sh
                        Administrator
                        • Nov 2016
                        • 1298

                        #11
                        I worry I have no answer for this, while seems enabling it is generally considered the "modern" best practice. If we trust AI and I have zero reason not to trust it:

                        • Speed Shift allows the CPU to ramp its frequency up and down much faster (in about 1ms compared to ~30ms for SpeedStep). While great for bursts, some ultra-low-latency enterprise applications (like high-frequency trading or specific real-time processing) prefer the CPU to stay at a locked frequency to avoid the jitter caused by rapid state switching.
                        • Supermicro often ships boards with "Performance" or "Workstation" profiles that prioritize stability over the aggressive, autonomous frequency hopping that HWP provides.

                        Comment

                        Working...