Hey,
thank you for this small hint!
My Ubuntu Low Latency Kernel running on an i5-8265U (4 Cores / 8 Threads),
checked with "grep ^CONFIG_HZ /boot/config-`uname -r`" resulting in
CONFIG_HZ_1000=y (generally activated)
CONFIG_HZ=1000 (actually set to desired value),
has some decent Performance Index in PTQ7/8Demo of ~56 when running on taskset -c 4,5,6,7 (only the 4 Hyperthreading Cores) @1.6GHz or up to 100-120 Index @"3.9GHz".
I am playing around if I should use 2 physical Cores (Like 2 and 3) with their corresponding HT Cores (6,7), or only use the HT Cores... but I couldnt notice any difference yet.
The only thing bothering me is that Intel seems to not accept all kinds of instructions: I am trying to set for example
sudo cpufreq-set -c 4 -d 1600MHz -u 1610MHz -g performance
sudo cpufreq-set -c 5 -d 1600MHz -u 1610MHz -g performance
sudo cpufreq-set -c 6 -d 1600MHz -u 1610MHz -g performance
sudo cpufreq-set -c 7 -d 1600MHz -u 1610MHz -g performance
But he wont accept this and run maximal CPU clock in performance mode on ALL my Threads as soon as I specify -g performance governor,
but when Im leaving -g performance as governor and use the min/max specifications, he wont follow these and "cpufreq-info" command in a terminal and PTQs Pref Dialog show me some way different min/max values. Weird.
So some selfmade .sh to start PTQ doesnt work as expected at this moment, which is why I use "cpupower-gui" to set the freq., which kinda works.
But here again, even when applying the frequency/governor only to specific Threads in the GUI, it will still alter all threads.
At least the CPU freq. stays stable as specified as long as I keep it under round about ~3.2GHz and use the Performance governor: 1600MHz, 2000MHz, 2500Mhz, 3000MHz - they all seem to stay pretty straight when watching PTQ Perf Dialog, or when hitting "cpufreq-info" into a terminal again,
but as soon as I scratch 3.2 GHz or above (up to 3.9GHz with this CPU), there is a big fluctuation again over several hundred MHz.
Same quirk when setting the min/max freq. but using the Powersave Governor: Huge fluctuations that are outside the specified freq.
To me this concludes that this got something to do with Intel themself, and how strict they follow these commands.
Lets see if I atleast manage to use "cpufreq-set" commands by script for the future, rather than using the GUI program to set the CPU frequencys,
so I at least can have some less complex starting procedure.
The other quirks I kinda could live with and just use 1.6 - 2 GHz, as the power index seems high enaugh and my Laptop doesnt make any noises with that settings (CPU itself, or the Fan), as the CPU makes a ton of noise when clock rates are set in the 3.0 - 3.9GHz range.
But if anyone has some tip for how to get cpufreq-set to work as expected, I would appreciate it.
Thanks again for the info @Groove On - made me again love the decision to use Linux as daily OS and even for music production: Low Latency, setting Clock Rates, specifying CPU cores (and hopefully the USB-MIDI polling rates as mentioned in another thread...)
Another note by me, because I never seen it mentioned in this thread yet, is a small hint I like to recommend:
Skip PulseAudio and JackD1/JackD2!
Use Pipewire!
On my Ubuntu 22.04 LTS it came pre-installed and only needed to be activated with certain steps (deactivating PulseAudio permanently for example), which worked flawlessly.
Because of my personal mess with JackD2 which I installed before using Pipewire, I even took a clean break and removed entire Jack and Pipewire a few times over and over again, which is why I used apt package install of Pipewire with Wireplumber as Session Manager a few times and got to say its super easy to install and doesnt need any in-depth setup (as the Pipewire documentaion mentions for a regular installation procedure, it actually does all this automatically. The docu of Pipewire even specifies the issue with user groups and RT prioritys, and has a cleaner solution for this - check it out.).
I have one small quirk, which is that I still need to start programs with the "pw-jack" prefix if I want them to run by "Jack" (Fake Jack by Pipewire) - which should not be necessary if Pipewire is set up properly and should do it automatically if any application wants to connect to a Jack Server.
Another tiny quirk is that I can not configure Jack Server settings in applications: So just changing the sampling rate or buffer size within PTQ aint possible, but thats a no brainer to me because I just set 48KHz/128 samples globally and could even set "per App" settings by some pipewire config file if I need to.
But both quirks are a small price to pay and more than acceptable to me, because PulseAudio and Jack, all work by PipeWire now and there is never any conflict or never any issue with the sound. ALSA also still works flawlessly, so I got a nice bridge connecting all drivers/servers/sessions together and can use any Patchbay I want to - be QJackCTL (the package is annoying and still wants to install JackD1/D2, which is why I dont use it any longer, but it worked back when I had it even with parallel installs of JackD1/D2 while still running in a pw-jack environment), Hevlum for Pipewire, Carla or what ever you like.
I became a small advocate for PipeWire and can only recommend it for good performance and ease of everything since ~6-12 months,
as it has grown out of the issues that have been reported at the beginning (18 months ago) with it.
Cheers
Last edited by Vepece (04-02-2023 20:28)
Ubuntu 22 + Kernel lowlatency + 1000Hz + PipeWire + WirePlumber | i5-8265U + taskset Limit 4 Cores + CPUPower-GUI fixed clock freq | PTQ8Stage @ 32bit/48kHz/128Buffer/256Polyphony = Perf. Index ~60-90