[LAA] jackfreqd 0.2.0

osamarin68 at gmail.com osamarin68 at gmail.com
Fri Feb 28 20:29:24 CET 2020


Hi, all!

A lot of time ago Robin Gareus created jackfreqd: a daemon that changes
the CPU frequency based on the jack DSP load. It used the 'userspace'
cpu scaling governor.

Then the newer CPUs appeared. The newer Linux kernel started using the
'intel_pstate' cpu scaling driver that supports a lot of features of
the new cpus, including turbo bust. CPU frequency raises automaticaly
when CPU is loaded and it returns back to the minimal value (usually
800mhz) when CPU is idle.

But when using jack audio connection kit with several application
threads, these threads are spreading across cpu cores, and cpu load is
not sufficient for required rasing cpu frequency. It causes XRuns and
the sound distortion.

Unfortunately, the intel_pstate driver does not provide the 'userspace'
governor required by jackfreqd. provides only two cpu scaling
governors: 'powersave' - cpu itself selectss the frequency to work at -
and 'performance, that locks CPU frequency at the hihest value
available for 100% load on all cores. Most of linux audio tuning guides
recommend to set governor to 'performance' all the time.

But there are some disadvantages of this solution.
1. The cpu frequency is high even this is not necessary.
2. It causes high CPU voltage that lowers the CPU time to live.
3. It is unable to achieve tfor he maximum frequency for single-core
load, that is usually higher then all cores. It may be not desirable if
the computer is not dedicated for audio tasks and there are some
single-thread applications that are preferred to run at the higest
single-core frequency.

The resolution of this chalange: to set the 'powersave' governor when
no jack audio alpplications are active and switch it to 'performance'
when jack DSP load is exceeds a configured threshold (50% by default).

The new version of jackfreqd makes this automatically when the
'intel_pstate' driver is active. It continues to use the old
'userspace' governor for elder drivers.

The sourcecode of jackfreqd is available at 
https://github.com/oleg68/jackfreqd

Both rpm and source rpm packages are available rpm-based linux
distributions (I've tested it in Fedora 31).

https://github.com/oleg68/jackfreqd/releases/download/v0.2.0/jackfreq-0.2.0-0.x86_64.rpm

https://github.com/oleg68/jackfreqd/releases/download/v0.2.0/jackfreq-0.2.0-0.src.rpm

I'd like to add it to the Planet CCRMA repository, but I couldn't find
any information how to add a new package there.


More information about the Linux-audio-announce mailing list