You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Toy read

https://wiki.archlinux.org/title/CPU_frequency_scaling

EPP Profile by Intel

https://www.intel.com/content/www/us/en/download/819707/epp-tuning-package-for-linux-on-intel-core-ultra-mobile-processor.html

wget https://downloadmirror.intel.com/820388/814712_MTL_TuneD_Static_Profile_RN_Rev1p2.zip
unzip 814712_MTL_TuneD_Static_Profile_RN_Rev1p2.zip
unzip pkg.OPT.EPPprofile-1.05.240206.1-x86_64.zip
cd pkg.OPT.EPPprofile-1.05.240206.1-x86_64/
./deploy.sh
root@ubuntu2404:~# unzip pkg.OPT.EPPprofile-1.05.240206.1-x86_64.zip
Archive:  pkg.OPT.EPPprofile-1.05.240206.1-x86_64.zip
   creating: pkg.OPT.EPPprofile-1.05.240206.1-x86_64/
  inflating: pkg.OPT.EPPprofile-1.05.240206.1-x86_64/deploy.sh
   creating: pkg.OPT.EPPprofile-1.05.240206.1-x86_64/profiles/
   creating: pkg.OPT.EPPprofile-1.05.240206.1-x86_64/profiles/intel-best_power_efficiency_mode/
  inflating: pkg.OPT.EPPprofile-1.05.240206.1-x86_64/profiles/intel-best_power_efficiency_mode/tuned.conf
  inflating: pkg.OPT.EPPprofile-1.05.240206.1-x86_64/profiles/intel-best_power_efficiency_mode/script.sh
   creating: pkg.OPT.EPPprofile-1.05.240206.1-x86_64/profiles/intel-best_performance_mode/
  inflating: pkg.OPT.EPPprofile-1.05.240206.1-x86_64/profiles/intel-best_performance_mode/tuned.conf
  inflating: pkg.OPT.EPPprofile-1.05.240206.1-x86_64/profiles/intel-best_performance_mode/script.sh
  inflating: pkg.OPT.EPPprofile-1.05.240206.1-x86_64/rollback.sh

root@ubuntu2404:~# cd pkg.OPT.EPPprofile-1.05.240206.1-x86_64/

root@ubuntu2404:~/pkg.OPT.EPPprofile-1.05.240206.1-x86_64# ./deploy.sh
on
**************** executing tasks ***************************
**************** copy profiles ***************************
**************** PPD ***************************
**************** re-start daemon ***************************
**************** activate profile ***************************
- intel-best_performance_mode - Intel epp 25 TuneD profile
- intel-best_power_efficiency_mode- Intel epp 70 TuneD profile
- intel-sst                   - Configure for Intel Speed Select Base Frequency
Current active profile: intel-best_performance_mode
**************** done ***************************

root@ubuntu2404:~/pkg.OPT.EPPprofile-1.05.240206.1-x86_64# systemctl status tuned
● tuned.service - Dynamic System Tuning Daemon
     Loaded: loaded (/usr/lib/systemd/system/tuned.service; enabled; preset: enabled)
     Active: active (running) since Mon 2025-05-19 19:33:49 UTC; 3min 14s ago
       Docs: man:tuned(8)
             man:tuned.conf(5)
             man:tuned-adm(8)
   Main PID: 48884 (tuned)
      Tasks: 4 (limit: 153742)
     Memory: 14.3M (peak: 19.0M)
        CPU: 520ms
     CGroup: /system.slice/tuned.service
             └─48884 /usr/bin/python3 -Es /usr/sbin/tuned -l -P

May 19 19:33:49 ubuntu2404 sudo[49230]: pam_unix(sudo:session): session closed for user root
May 19 19:33:49 ubuntu2404 sudo[49233]:     root : PWD=/etc/tuned/intel-best_performance_mode ; USER=root ; COMMAND=/usr/bin/tee /sys/devices/system/cpu/cpu19/cpufreq/energy_performance_preference
May 19 19:33:49 ubuntu2404 sudo[49233]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
May 19 19:33:49 ubuntu2404 sudo[49233]: pam_unix(sudo:session): session closed for user root
May 19 19:33:49 ubuntu2404 sudo[49236]:     root : PWD=/etc/tuned/intel-best_performance_mode ; USER=root ; COMMAND=/usr/bin/tee /sys/devices/system/cpu/cpu20/cpufreq/energy_performance_preference
May 19 19:33:49 ubuntu2404 sudo[49236]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
May 19 19:33:49 ubuntu2404 sudo[49236]: pam_unix(sudo:session): session closed for user root
May 19 19:33:49 ubuntu2404 sudo[49239]:     root : PWD=/etc/tuned/intel-best_performance_mode ; USER=root ; COMMAND=/usr/bin/tee /sys/devices/system/cpu/cpu21/cpufreq/energy_performance_preference
May 19 19:33:49 ubuntu2404 sudo[49239]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
May 19 19:33:49 ubuntu2404 sudo[49239]: pam_unix(sudo:session): session closed for user root


tuned config files

/etc/tuned/active_profile
intel-best_performance_mode


/etc/tuned/cpu-partitioning-powersave-variables.conf
# Examples:
# isolated_cores=2,4-7
# isolated_cores=2-23
#
# Reserve 1 core per socket for housekeeping, isolate the rest.
isolated_cores=${f:calc_isolated_cores:1}

# To disable the kernel load balancing in certain isolated CPUs:
# no_balance_cores=5-10

# Specifies the maximum powerstate for idling cores.
# given to force_latency tuned parameter. To have the same behavior
# as cpu-partitioning profile, set to "cstate.name:C1|10"
max_power_state=cstate.name:C1|10


/etc/tuned/cpu-partitioning-variables.conf
# Examples:
# isolated_cores=2,4-7
# isolated_cores=2-23
#
# Reserve 1 core per socket for housekeeping, isolate the rest.
isolated_cores=${f:calc_isolated_cores:1}

# To disable the kernel load balancing in certain isolated CPUs:
# no_balance_cores=5-10

/etc/tuned/intel-best_performance_mode/

/etc/tuned/intel-best_performance_mode/script.sh
#!/bin/sh

#Copyright (C) 2024 Intel Corporation
#SPDX-License-Identifier: GPL-2.0-or-later

#EPP_PATH "/sys/devices/system/cpu/cpu$i/cpufreq/energy_performance_preference"
#EPB_PATH "/sys/devices/system/cpu/cpu$i/power/energy_perf_bias"

. /usr/lib/tuned/functions

start() {
    n=$(nproc)
    i=0
    while [ "$i" -lt $n ]; do
        echo 64 | sudo tee  /sys/devices/system/cpu/cpu$i/cpufreq/energy_performance_preference
        i=$(( i + 1 ))
    done
    return 0
}

stop() {
    n=$(nproc)
    i=0
    while [ "$i" -lt $n ]; do
        echo "balance_performance" | sudo tee  /sys/devices/system/cpu/cpu$i/cpufreq/energy_performance_preference
        i=$(( i + 1 ))
    done
    return 0
}

process $@

/etc/tuned/intel-best_power_efficiency_mode/script.sh

#!/bin/sh

#Copyright (C) 2024 Intel Corporation
#SPDX-License-Identifier: GPL-2.0-or-later

#EPP_PATH "/sys/devices/system/cpu/cpu$i/cpufreq/energy_performance_preference"
#EPB_PATH "/sys/devices/system/cpu/cpu$i/power/energy_perf_bias"

. /usr/lib/tuned/functions

start() {
    n=$(nproc)
    i=0
    while [ "$i" -lt $n ]; do
        echo 178 | sudo tee  /sys/devices/system/cpu/cpu$i/cpufreq/energy_performance_preference
        echo 8 | sudo tee  /sys/devices/system/cpu/cpu$i/power/energy_perf_bias
        i=$(( i + 1 ))
    done
    return 0
}

stop() {
    n=$(nproc)
    i=0
    while [ "$i" -lt $n ]; do
        echo "balance_performance" | sudo tee  /sys/devices/system/cpu/cpu$i/cpufreq/energy_performance_preference
        echo 6 | sudo tee  /sys/devices/system/cpu/cpu$i/power/energy_perf_bias
        i=$(( i + 1 ))
    done
    return 0
}

process $@



intel-undervolt

https://github.com/kitsunyan/intel-undervolt

git clone https://github.com/kitsunyan/intel-undervolt && cd intel-undervolt/
sudo apt install pkg-config
sudo ./configure --enable-systemd --enable-openrc
make && sudo make install
sudo systemctl daemon reload


/etc/intel-undervolt.conf
# Enable or Disable Triggers (elogind)
# Usage: enable [yes/no]

enable yes

# CPU Undervolting
# Usage: undervolt ${index} ${display_name} ${undervolt_value}
# Example: undervolt 2 'CPU Cache' -25.84

#undervolt 0 'CPU' 80
#undervolt 1 'GPU' 80
#undervolt 2 'CPU Cache' 80
#undervolt 3 'System Agent' 80
#undervolt 4 'Analog I/O' 80

# Power Limits Alteration
# Usage: power ${domain} ${short_power_value} ${long_power_value}
# Power value: ${power}[/${time_window}][:enabled][:disabled]
# Domains: package
# Example: power package 45 35
# Example: power package 45/0.002 35/28
# Example: power package 45/0.002:disabled 35/28:enabled
power package 110/0.02 100/28

# Critical Temperature Offset Alteration
# Usage: tjoffset ${temperature_offset}
# tjoffset -5

# Energy Versus Performance Preference Switch
# Usage: hwphint ${mode} ${algorithm} ${load_hint} ${normal_hint}
# Hints: see energy_performance_available_preferences
# Modes: switch, force
# Load algorithm: load:${capture}:${threshold}
# Power algorithm: power[:${domain}:[gt/lt]:${value}[:[and/or]]...]
# Capture: single, multi
# Threshold: CPU usage threshold
# Domain: RAPL power domain, check with `intel-undervolt measure`
# Example: hwphint force load:single:0.8 performance balance_performance
# Example: hwphint switch power:core:gt:8 performance balance_performance

# Daemon Update Interval
# Usage: interval ${interval_in_milliseconds}

interval 5000

# Daemon Actions
# Usage: daemon action[:option...]
# Actions: undervolt, power, tjoffset
# Options: once

#daemon undervolt:once
daemon power
#daemon tjoffset


systemctl restart intel-undervolt.service
systemctl status intel-undervolt


root@ubuntu2404:~/pkg.OPT.EPPprofile-1.05.240206.1-x86_64# systemctl status intel-undervolt
○ intel-undervolt.service - Intel Undervolt Service
     Loaded: loaded (/usr/lib/systemd/system/intel-undervolt.service; enabled; preset: enabled)
     Active: inactive (dead) since Mon 2025-05-19 19:24:08 UTC; 19min ago
   Main PID: 47405 (code=exited, status=0/SUCCESS)
        CPU: 2ms

May 19 19:24:08 ubuntu2404 systemd[1]: Starting intel-undervolt.service - Intel Undervolt Service...
May 19 19:24:08 ubuntu2404 intel-undervolt[47405]: Short term package power: 110 W, 0.020 s, enabled
May 19 19:24:08 ubuntu2404 intel-undervolt[47405]: Long term package power: 100 W, 28.000 s, enabled
May 19 19:24:08 ubuntu2404 intel-undervolt[47405]: Critical offset: -0°C
May 19 19:24:08 ubuntu2404 systemd[1]: intel-undervolt.service: Deactivated successfully.
May 19 19:24:08 ubuntu2404 systemd[1]: Finished intel-undervolt.service - Intel Undervolt Service.



  • No labels