Updating the system_configuration wiki page on wiki.linuxaudio.org

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Updating the system_configuration wiki page on wiki.linuxaudio.org

Post by autostatic »

https://wiki.linuxaudio.org/wiki/system_configuration has been updated but is not fully up to par yet. I've looked at @x42's recommendations and changed the following things:
  • Took out most part of the Timers section.
  • Moved the building your own kernel page to a separate page.
  • All references to excruciatingly old kernels have been removed.
  • Replaced references to realtimeconfigquickscan with references to its successor, rtcqs.
Not sure about the kernel section though, maybe the installation part can go away and maybe the focus should be shifted towards what can be done from user space. Maybe some info on tickless kernels? And I'd like to add a section on power management.

Maybe we could discuss omissions, plain errors, suggestions or improvements in this thread.

Jeremy
User avatar
sunrat
Established Member
Posts: 919
Joined: Wed Jul 22, 2020 2:08 pm
Has thanked: 151 times
Been thanked: 244 times

Re: Updating the system_configuration wiki page on wiki.linuxaudio.org

Post by sunrat »

Nice work Jeremy! I signed up to edit the wiki over a year ago with updating in mind but got overwhelmed trying to sort current recommendations from legacy, and effective tweaks from snake oil. I'm just a mere user who likes tinkering but don't know code or kernel intricacies.

I would like to find more info on tickless timers pursuant to x42's suggestion in that link. (Be aware that project the link is about seems to have fallen by the wayside and is uncompleted). The Liquorix kernel I have used for a few years is not tickless. Where does one even find a tickless kernel without compiling?
I did some testing with the help of xruncounter and found the best results with all the rtcqs recommendations satisfied and this kernel line for my Intel i5-6500:

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_idle.max_cstate=0 processor.max_cstate=1 threadirqs"
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: Updating the system_configuration wiki page on wiki.linuxaudio.org

Post by autostatic »

Hi sunrat, thanks!
sunrat wrote: Thu May 05, 2022 7:30 amI would like to find more info on tickless timers pursuant to x42's suggestion in that link. (Be aware that project the link is about seems to have fallen by the wayside and is uncompleted). The Liquorix kernel I have used for a few years is not tickless. Where does one even find a tickless kernel without compiling?
If your kernel has CONFIG_NO_HZ_IDLE=y then you're running a tickless kernel, see https://www.kernel.org/doc/Documentatio ... /NO_HZ.txt:
An idle CPU that is not receiving scheduling-clock interrupts is said to
be "dyntick-idle", "in dyntick-idle mode", "in nohz mode", or "running
tickless". The remainder of this document will use "dyntick-idle mode".
sunrat wrote: Thu May 05, 2022 7:30 amI did some testing with the help of xruncounter and found the best results with all the rtcqs recommendations satisfied and this kernel line for my Intel i5-6500:

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_idle.max_cstate=0 processor.max_cstate=1 threadirqs"
I've looked at the *.max_cstate parameters too (and also the idle parameter) but since I mainly use Ardour I prefer using the /dev/cpu_dma_latency method Ardour offers. From what I've understood this is effectively the same as the kernel parameters you're using, see also https://www.kernel.org/doc/Documentatio ... erface.txt.
User avatar
sunrat
Established Member
Posts: 919
Joined: Wed Jul 22, 2020 2:08 pm
Has thanked: 151 times
Been thanked: 244 times

Re: Updating the system_configuration wiki page on wiki.linuxaudio.org

Post by sunrat »

autostatic wrote: Thu May 05, 2022 10:34 am Hi sunrat, thanks!
sunrat wrote: Thu May 05, 2022 7:30 amI would like to find more info on tickless timers pursuant to x42's suggestion in that link. (Be aware that project the link is about seems to have fallen by the wayside and is uncompleted). The Liquorix kernel I have used for a few years is not tickless. Where does one even find a tickless kernel without compiling?
If your kernel has CONFIG_NO_HZ_IDLE=y then you're running a tickless kernel, see https://www.kernel.org/doc/Documentatio ... /NO_HZ.txt:
An idle CPU that is not receiving scheduling-clock interrupts is said to
be "dyntick-idle", "in dyntick-idle mode", "in nohz mode", or "running
tickless". The remainder of this document will use "dyntick-idle mode".
Now I'm more confused. Liquorix has CONFIG_NO_HZ_IDLE=y, but what does CONFIG_NO_HZ do? In the wiki is written
the CONFIG_NO_HZ means your kernel is tickless
Robin posted this:
x42
Jul '20
CONFIG_HZ_1000=y
CONFIG_HZ=1000
This is backwards, prefer a tickless kernel for reliable low latency and low jittter MIDI.
Liquorix has:
CONFIG_NO_HZ_COMMON=y
CONFIG_NO_HZ_IDLE=y
# CONFIG_NO_HZ_FULL is not set
# CONFIG_NO_HZ is not set
CONFIG_HZ_1000=y
CONFIG_HZ=1000
I would also like to see more about CPU governors. Maybe hardware frequency scaling in modern processors is better than the kernel software scaling. Again from x42:
On this i7, I don’t even need to change the CPU governor. CPU frequency change are orders or magnitude faster than audio process cycles.
Things I doubt effectiveness:
- Max user watches
- Swappiness

Things I want to know more about:
- Intel C-states and P-states
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: Updating the system_configuration wiki page on wiki.linuxaudio.org

Post by autostatic »

sunrat wrote: Thu May 05, 2022 12:37 pmNow I'm more confused. Liquorix has CONFIG_NO_HZ_IDLE=y, but what does CONFIG_NO_HZ do?
Nothing I think, it has been superseded by CONFIG_NO_HZ_IDLE.
sunrat wrote: Thu May 05, 2022 12:37 pmIn the wiki is written
the CONFIG_NO_HZ means your kernel is tickless
Thanks for spotting that, should be updated too.
sunrat wrote: Thu May 05, 2022 12:37 pm]Liquorix has:
CONFIG_NO_HZ_COMMON=y
CONFIG_NO_HZ_IDLE=y
# CONFIG_NO_HZ_FULL is not set
# CONFIG_NO_HZ is not set
CONFIG_HZ_1000=y
CONFIG_HZ=1000
It has CONFIG_NO_HZ_IDLE=y so it's a tickless kernel.
sunrat wrote: Thu May 05, 2022 12:37 pmI would also like to see more about CPU governors. Maybe hardware frequency scaling in modern processors is better than the kernel software scaling. Again from x42:
On this i7, I don’t even need to change the CPU governor. CPU frequency change are orders or magnitude faster than audio process cycles.
I'll look into that too!
sunrat wrote: Thu May 05, 2022 12:37 pmThings I doubt effectiveness:
- Max user watches
Already comes with extra context in the wiki, does that need any change? See https://wiki.linuxaudio.org/wiki/system ... sysctlconf
sunrat wrote: Thu May 05, 2022 12:37 pm- Swappiness
Already comes with extra context too.
sunrat wrote: Thu May 05, 2022 12:37 pmThings I want to know more about:
- Intel C-states and P-states
Same here, see if I can fathom https://www.kernel.org/doc/Documentatio ... erface.txt.
User avatar
sysrqer
Established Member
Posts: 2523
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 320 times
Been thanked: 152 times
Contact:

Re: Updating the system_configuration wiki page on wiki.linuxaudio.org

Post by sysrqer »

I wonder if some mention of pipewire might be helpful?

As there is a section for SSDs perhaps it might be helpful to add something about NVMe drives. Do they need the same adjustments as SSDs?
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: Updating the system_configuration wiki page on wiki.linuxaudio.org

Post by autostatic »

Hello sysrqer, good point about Pipewire. Haven't tried it myself though so if anyone knows anything sensible to say about it within the context of the article, go ahead! The section about SSDs could use some scrutiny too and I'll look into NVMe.
User avatar
Audiojunkie
Established Member
Posts: 402
Joined: Thu Feb 21, 2019 4:27 pm
Has thanked: 391 times
Been thanked: 156 times

Re: Updating the system_configuration wiki page on wiki.linuxaudio.org

Post by Audiojunkie »

autostatic wrote: Wed May 04, 2022 8:59 pm https://wiki.linuxaudio.org/wiki/system_configuration has been updated but is not fully up to par yet. I've looked at @x42's recommendations and changed the following things:
  • Took out most part of the Timers section.
  • Moved the building your own kernel page to a separate page.
  • All references to excruciatingly old kernels have been removed.
  • Replaced references to realtimeconfigquickscan with references to its successor, rtcqs.
Not sure about the kernel section though, maybe the installation part can go away and maybe the focus should be shifted towards what can be done from user space. Maybe some info on tickless kernels? And I'd like to add a section on power management.

Maybe we could discuss omissions, plain errors, suggestions or improvements in this thread.

Jeremy
Thank you so much for working on this!!
User avatar
Audiojunkie
Established Member
Posts: 402
Joined: Thu Feb 21, 2019 4:27 pm
Has thanked: 391 times
Been thanked: 156 times

Re: Updating the system_configuration wiki page on wiki.linuxaudio.org

Post by Audiojunkie »

As I understand it, Pipewire is quite cool! You can run PulseAudio, JACK, ALSA, and Gstreamer tools on top of it. There is no need to actually mess with pipewire streams themselves (unless you need or want to). On top of Pipewire, all you need are a compatible JACK patch bay (like qpwgraph), the New Session Manager, a grapical front end (like Agordejo), and your JACK apps.

They have their own performance tuning suggestions, which closely mirror what is in the Wiki:

https://gitlab.freedesktop.org/pipewire ... nce-tuning


I'm still trying to wrap my head around all of it, but it looks like its going to make things not only better, but easier. :-)
Post Reply