To read

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

https://www.intel.com/content/www/us/en/developer/tools/software-catalog/overview.html

Intel(R) Memory Latency Checker

https://www.intel.com/content/www/us/en/download/736633/intel-memory-latency-checker-intel-mlc.html

wget https://downloadmirror.intel.com/834254/mlc_v3.11b.tgz
tar xvf mlc_v3.11b.tgz
Linux/mlc


root@ubuntu2404:~# Linux/mlc
Intel(R) Memory Latency Checker - v3.11b
Measuring idle latencies for sequential access (in ns)...
                Numa node
Numa node            0
       0         127.9

Measuring Peak Injection Memory Bandwidths for the system
Bandwidths are in MB/sec (1 MB/sec = 1,000,000 Bytes/sec)
Using all the threads from each core if Hyper-threading is enabled
Using traffic with the following read-write ratios
ALL Reads        :      72184.9
3:1 Reads-Writes :      68601.9
2:1 Reads-Writes :      67809.2
1:1 Reads-Writes :      65918.5
Stream-triad like:      69293.4

Measuring Memory Bandwidths between nodes within system
Bandwidths are in MB/sec (1 MB/sec = 1,000,000 Bytes/sec)
Using all the threads from each core if Hyper-threading is enabled
Using Read-only traffic type
                Numa node
Numa node            0
       0        72186.8

Measuring Loaded Latencies for the system
Using all the threads from each core if Hyper-threading is enabled
Using Read-only traffic type
Inject  Latency Bandwidth
Delay   (ns)    MB/sec
==========================
 00000  305.56    72175.8
 00002  304.53    72235.6
 00008  304.36    72261.3
 00015  286.88    72281.2
 00050  230.44    71347.7
 00100  210.71    70417.4
 00200  157.81    58744.5
 00300  139.04    44531.1
 00400  131.54    34173.6
 00500  128.28    28721.9
 00700  124.30    21731.9
 01000  121.47    16144.8
 01300  120.06    12870.8
 01700  119.35    10185.3
 02500  118.41     7233.5
 03500  118.01     5385.5
 05000  117.91     3964.0
 09000  118.19     2463.5
 20000  119.63     1388.5

Measuring cache-to-cache transfer latency (in ns)...
Local Socket L2->L2 HIT  latency        38.7
Local Socket L2->L2 HITM latency        41.1


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

undervolt and tjoffset do not work on MOREFINE S800 but it still might be used to adjust power limits

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