Playing with tuned and tuned-adm

So you know me … anything to squeeze just a little bit more out of my octagenarian machine … so I’ve been playing with the tuneddaemon and tuned-adm … to make a short story even shorter I wasn’t quite satisfied with the “balanced” profile so I made my own profile and got some nice little gains

Either sudo or as root in a terminal

mkdir /etc/tuned/profiles/desktop-max

then

nano /etc/tuned/profiles/desktop-max/tuned.conf

and paste in the following

#
# tuned configuration
#

[main]
summary=Optimized for maximum desktop performance

[cpu]
priority=10
governor=ondemand|schedutil
sampling_down_factor = 1000
energy_perf_bias=performance|balance_performance
energy_performance_preference=performance|balance_performance
boost=1

[acpi]
platform_profile=performance

[audio]
timeout=10

[disk]
# Comma separated list of devices, all devices if commented out.
# devices=sda
readahead=>4096

# cat /sys/block/<device>/queue/scheduler
# current (6.14.4-1-default) none [mq-deadline] kyber bfq
# mq-deadline was my default but kyber seems to work the best for me 
elevator=kyber

[scsi_host]
# 
alpm=max_performance

Now when you do tuned-adm list you should see a “desktop-max” option … lemme know if it works worth a dang or tweak it yourself and make it even better … you could even piggy-back some of the network stuff on top of it with tuned-adm profile desktop-max <network-something> for gaming … :thinking:

2 Likes

And then I went to /etc/tuned/tuned-main.conf and changed this line

dynamic_tuning = 0

to

dynamic_tuning = 1

then systemctl restart tuned

No problems so far … whole desktop was smooth before … we’ll see how it reacts after it runs for a while

2 Likes

Made a couple of changes to my desktop-max file and so far I’m very pleased with the results

My ancient Unigine Heaven benchmark (opengl) only gained 1 fps but the minimum fps nearly doubled … so no stutters and it is visibly smoother

Browserbench got significant gains in every test … I went from 6.05 to 6.35 in the speedometer test … for me even 6.15 would have been cause for celebration …

vkmark also got gains across the board and when it did use 55% (give or take) of my GPU now it uses 65% (give or take)

Tuned also sets my IO scheduler to kyber instead of mq-deadline and things are much smoother on the desktop now … the kernel complains when I set elevator=kyber on the cmdline and says it is no longer valid and I should use sysfs instead but I guess I’m not looking in the right place … but no matter … tuned does it for me

My internet connection is already maxxed out but now that I have a new/old laptop I’ll be able to test network latency/throughput on my local network … that’s next …

Current desktop-max/tuned.conf profile:

dart@windeath:~/Downloads/Unigine_Heaven-4.0> cat /etc/tuned/profiles/desktop-max/tuned.conf 
#
# tuned configuration
#

[main]
summary=Optimize for maximum desktop performance

[sysctl]
kernel.sched_autogroup_enabled=1

[cpu]
priority=10
governor=ondemand|schedutil
sampling_down_factor = 1000
energy_perf_bias=performance|balance_performance
energy_performance_preference=performance|balance_performance
boost=1

[acpi]
platform_profile=performance

[audio]
timeout=10

[disk]
# Comma separated list of devices, all devices if commented out.
# devices=sda
readahead=>4096

# cat /sys/block/<device>/queue/scheduler
# current (6.14.4-1-default) none [mq-deadline] kyber bfq
# mq-deadline was my default but kyber seems to work the best for me 
elevator=kyber

[scsi_host]
# 
alpm=max_performance
2 Likes

Tuned is interesting, but I don’t use it myself, since the default profiles seem aimed at servers. I’ll try your profile sometime.

Awesome … would like to hear how (if) it works out … :+1:

Did run browserbench and got 6.34 ± 0.51. Then did read the instructions and started a clean other browser and got 6.6 ± 0.75. Wondering if it are just random variations, that could well be with those confidence intervals.

My computer is fast enough so I focus on idle power consumption and did chose for the governor “powersave”:

> sudo turbostat --Summary --quiet --show Busy%,Avg_MHz,PkgTmp,PkgWatt --interval 5
Avg_MHz Busy%   PkgTmp  PkgWatt
14      1.47    30      0.94
16      1.60    29      1.03
16      1.53    28      1.09
57      3.94    29      2.32
44      3.59    29      1.91
37      3.91    29      1.55
23      2.52    28      1.23
17      1.87    29      1.12
19      1.94    29      1.08

sudo cpupower monitor shows the CPU’s are ~85% in C10 idle state.

Still I see the CPU following the max power profile when I stress the CPU running a certain update I run that runs for ~15 minutes:

261     8.36    46      13.08
1688    37.81   57      55.38
3678    80.55   59      111.47
3683    80.58   62      109.83
3695    81.01   63      114.76
3702    81.08   64      116.13
3723    81.64   65      111.46
3622    79.78   65      110.24
3783    83.30   67      116.60
3728    81.91   68      110.88
3714    82.00   63      115.58
3769    87.08   62      97.77
3715    85.35   65      94.10
3705    84.92   65      94.34
3709    85.23   65      95.30
3741    86.07   64      93.92

So 10 seconds at the boost power PL2 of 110 Watt after which it drops and stays on the TDP/PL1 power of 95 Watt as long as the update is running. Probably good to check if your computer also is and keeps running at it’s TDP when CPU stressed, if not you should look at cooling.

Yes I do get “variations” depending on time of day but all my tests that involve local files (Unigine/vkmark) are consistent

I don’t see that behavior and is why I chose “ondemand” instead of the true max of “performance” … Thanks for the info

BTW the Tuned Github page says to uninstall cpupower and the profiles …