AVLinux / MXLinux Tuning - on two machines (different results)

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
User avatar
lilith
Established Member
Posts: 1698
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Has thanked: 117 times
Been thanked: 57 times
Contact:

AVLinux / MXLinux Tuning - on two machines (different results)

Post by lilith »

Hi,

still testing AVLinux and it's working great so far. I'm using it on a persistent USB stick at the moment and I just did some tests with Bitwig to compare it to my Ubuntustudio system. In Ubuntustudio loading 10 instances of DIVA with the second preset looks like this:

Image

In AVLinux playing the same project with the same audio settings and Jack I get this:

Image

Before Ubuntustudio I was running Debian and I optimized the audio by myself. I never reached such a good and smooth DSP load in Bitwig (i'm using Bitwig here, cause the DSP load graph is quite illustrative) like in Ubuntustudio. I wonder what's the crucial setting here or where to look as both Distros should be optimized out of the box. Governor is of course set to performance in both cases. I wonder if the difference comes from the kernel or from some boot parameter?

If you want to test yourself you can download the Bitwig file from here: https://e1.pcloud.link/publink/show?cod ... iXJbgaji27

Both - Bitwig and Diva - can run in Demo mode. I was using DIVA VST3 from here: https://www.kvraudio.com/forum/viewtopic.php?t=564393

Code: Select all

System:    Host: avl-mxe-live Kernel: 6.0.0-10.1-liquorix-amd64 x86_64 bits: 64 
           Desktop: Xfce 4.16.0 Distro: Debian GNU/Linux 11 (bullseye) 
Machine:   Type: Desktop Mobo: MSI model: H81M-E34 (MS-7817) v: 3.0 serial: <superuser required> 
           UEFI: American Megatrends v: 17.5 date: 03/30/2015 
CPU:       Info: Quad Core model: Intel Core i5-4460 bits: 64 type: MCP cache: L2: 6 MiB 
           Speed: 3296 MHz min/max: 800/3201 MHz Core speeds (MHz): 1: 3358 2: 3318 3: 3376 
           4: 3358 
Graphics:  Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics 
           driver: i915 v: kernel 
           Display: x11 server: X.Org 1.20.14 driver: loaded: modesetting unloaded: fbdev,vesa 
           resolution: 1920x1080~60Hz 
           OpenGL: renderer: Mesa Intel HD Graphics 4600 (HSW GT2) v: 4.6 Mesa 22.0.5 
Audio:     Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio driver: snd_hda_intel 
           Device-2: Intel 8 Series/C220 Series High Definition Audio driver: snd_hda_intel 
           Device-3: BEHRINGER UMC204HD 192k type: USB driver: snd-usb-audio 
           Device-4: AKAI Professional M.I. MPK Mini Mk II type: USB 
           driver: hid-generic,snd-usb-audio,usbhid 
           Sound Server-1: ALSA v: k6.0.0-10.1-liquorix-amd64 running: yes 
           Sound Server-2: JACK v: 1.9.21 running: yes 
           Sound Server-3: PulseAudio v: 14.2 running: yes 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169 
           IF: enp2s0 state: down mac: d8:cb:8a:e8:e9:99 
           Device-2: Realtek RTL8153 Gigabit Ethernet Adapter type: USB driver: r8152 
           IF: enx00e04c000176 state: up speed: 1000 Mbps duplex: full mac: 00:e0:4c:00:01:76 
Drives:    Local Storage: total: 304.9 GiB used: 22.9 GiB (7.5%) 
           ID-1: /dev/sda vendor: Samsung model: SSD 850 EVO 250GB size: 232.89 GiB 
           ID-2: /dev/sdb type: USB vendor: SanDisk model: Ultra size: 57.3 GiB 
           ID-3: /dev/sdc type: USB vendor: Transcend model: JetFlash Transcend 16GB 
           size: 14.71 GiB 
Swap:      ID-1: swap-1 type: file size: 4 GiB used: 457.3 MiB (11.2%) 
           file: /live/boot-dev/swap-file 
Sensors:   System Temperatures: cpu: 29.8 C mobo: 27.8 C 
           Fan Speeds (RPM): N/A 
Info:      Processes: 248 Uptime: 1h 24m Memory: 7.22 GiB used: 4.46 GiB (61.8%) Shell: Bash 
           inxi: 3.3.06 
Last edited by lilith on Fri Dec 30, 2022 8:08 pm, edited 1 time in total.
User avatar
erlkönig
Established Member
Posts: 200
Joined: Tue May 31, 2022 8:58 am
Has thanked: 39 times
Been thanked: 46 times

Re: AVLinux Tuning - what's missing here?

Post by erlkönig »

Interesting. Average loads are close to each other, maximum loads do really differ. Does Ubuntustudio use Jack2?

Why are there different latencies?

Currently working with
https://www.honeysuckers.rocks/?lang=en
https://de-de.facebook.com/SatanicVoices2019
Fiddling with sequencers does not evolve into music necessarily and Mac users have smelly feet and guzzle little children.

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

Re: AVLinux Tuning - what's missing here?

Post by sunrat »

Is Ubuntustudio also running from a USB stick?

User avatar
lilith
Established Member
Posts: 1698
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Has thanked: 117 times
Been thanked: 57 times
Contact:

Re: AVLinux Tuning - what's missing here?

Post by lilith »

Just booted into Ubuntustudio Live 22.04, which luckily worked, because my PC is maybe dying (will open another thread).
First the result in Bitwig was worse, but after putting the user Ubuntustudio to the audio group I got this

Image

Here is the output of rtcqs for Ubuntustudio live image. Be back later...

Code: Select all

rtcqs - version 0.5.3

Root User
=========
[ OK ] Not running as root.

Audio Group
===========
[ OK ] User ubuntu-studio is in the audio group.

CPU Frequency Scaling
=====================
[ OK ] The scaling governor of all CPU's is set at performance.

Kernel Configuration
====================
[ OK ] Valid kernel configuration found.

High Resolution Timers
======================
[ OK ] High resolution timers are enabled.

Tickless Kernel
===============
[ OK ] System is using a tickless kernel.

Preempt RT
==========
[ WARNING ] Kernel 5.15.0-43-lowlatency without 'threadirqs' parameter or real-time capabilities found. See also https://wiki.linuxaudio.org/wiki/system_configuration#do_i_really_need_a_real-time_kernel

Spectre/Meltdown Mitigations
============================
[ WARNING ] Kernel with Spectre/Meltdown mitigations found. This could have a negative impact on the performance of your system. See also https://wiki.linuxaudio.org/wiki/system_configuration#disabling_spectre_and_meltdown_mitigations

RT Priorities
=============
[ OK ] Realtime priorities can be set.

Swappiness
==========
[ OK ] Swappiness is set at 10.

Filesystems
===========
[ OK ] The following mounts can be used for audio purposes: /var/log, /var/crash
[ WARNING ] The following mounts should be avoided for audio purposes: /run/user/999/doc. See also https://wiki.linuxaudio.org/wiki/system_configuration#filesystems

IRQs
=====
[ OK ] USB port ehci_hcd:usb1 with IRQ 16 does not share its IRQ.
USB port ehci_hcd:usb2 with IRQ 23 does not share its IRQ.
USB port xhci_hcd with IRQ 31 does not share its IRQ.
USB port xhci_hcd with IRQ 32 does not share its IRQ.
USB port xhci_hcd with IRQ 33 does not share its IRQ.
Soundcard snd_hda_intel:card0 with IRQ 37 does not share its IRQ.
Soundcard snd_hda_intel:card1 with IRQ 38 does not share its IRQ.

Power Management
================
[ WARNING ] Power management can't be controlled from user space, the device node /dev/cpu_dma_latency can't be accessed by your user. This prohibits DAW's like Ardour and Reaper to set CPU DMA latency which could help prevent xruns. For enabling access see https://wiki.linuxaudio.org/wiki/system_configuration#quality_of_service_interface

And installed jack Version for Ubuntustudio 22.04

Image

User avatar
lilith
Established Member
Posts: 1698
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Has thanked: 117 times
Been thanked: 57 times
Contact:

Re: AVLinux Tuning - what's missing here?

Post by lilith »

erlkönig wrote: Sat Dec 24, 2022 8:03 am

Interesting. Average loads are close to each other, maximum loads do really differ. Does Ubuntustudio use Jack2?

Why are there different latencies?

Not sure yet about the latencies, I think it comes from different output connections in Bitwig and I think this can be ignored.

User avatar
lilith
Established Member
Posts: 1698
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Has thanked: 117 times
Been thanked: 57 times
Contact:

Re: AVLinux Tuning - what's missing here?

Post by lilith »

I disabled threadirqs in AVLinux, but bascially the same:

Image

The overhead peaks correlate with system activity (e.g. using Firefox with LAN, Saving screenshots, etc.).

User avatar
lilith
Established Member
Posts: 1698
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Has thanked: 117 times
Been thanked: 57 times
Contact:

Re: AVLinux Tuning - what's missing here?

Post by lilith »

Seems my PC is still running fine. To boot MXLinux I had to set the

Code: Select all

intel_iommu=off

boot option.

This is plain MXLinux running from a stick after editing limits.conf and setting the CPU governor to performance. I also installed QJackctl and set realtime prios.

Image

with governor to on demand:

Image

kernel: Linux mx1 5.10.0-18-amd64 #1 SMP Debian 5.10.140-1 (2022-09-02) x86_64 GNU/Linux

Tomorrow I will check AVLinux again. Maybe the Liquorix Kernel makes a problem on my system.

User avatar
lilith
Established Member
Posts: 1698
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Has thanked: 117 times
Been thanked: 57 times
Contact:

Re: AVLinux Tuning - what's missing here?

Post by lilith »

This is now a bit odd: I installed MXLinux on my Laptop T440P from Lenovo which has an i7 that is newer than the i5 from my desktop PC (see above).
Configuration is the same like in the MXLinux example from above where with my old PC I got a super flat DSP load in Bitwig.

This is what I get now on the laptop:
Image

Actually it's much worse. And here is the output from rtcqs:

Code: Select all

Root User
=========
[ OK ] Not running as root.

Audio Group
===========
[ OK ] User fox is in the audio group.

CPU Frequency Scaling
=====================
[ OK ] The scaling governor of all CPU's is set at performance.

Kernel Configuration
====================
[ OK ] Valid kernel configuration found.

High Resolution Timers
======================
[ OK ] High resolution timers are enabled.

Tickless Kernel
===============
[ OK ] System is using a tickless kernel.

Preempt RT
==========
[ WARNING ] Kernel 5.10.0-20-amd64 without 'threadirqs' parameter or real-time capabilities found. See also https://wiki.linuxaudio.org/wiki/system_configuration#do_i_really_need_a_real-time_kernel

Spectre/Meltdown Mitigations
============================
[ WARNING ] Kernel with Spectre/Meltdown mitigations found. This could have a negative impact on the performance of your system. See also https://wiki.linuxaudio.org/wiki/system_configuration#disabling_spectre_and_meltdown_mitigations

RT Priorities
=============
[ OK ] Realtime priorities can be set.

Swappiness
==========
[ OK ] Swappiness is set at 10.

Filesystems
===========
[ OK ] The following mounts can be used for audio purposes: /, /home
[ WARNING ] The following mounts should be avoided for audio purposes: /run/user/1000/gvfs, /run/user/1000/doc. See also https://wiki.linuxaudio.org/wiki/system_configuration#filesystems

IRQs
=====
[ OK ] USB port ehci_hcd:usb1 with IRQ 23 does not share its IRQ.
USB port xhci_hcd with IRQ 28 does not share its IRQ.
Soundcard snd_hda_intel:card0 with IRQ 33 does not share its IRQ.
Soundcard snd_hda_intel:card1 with IRQ 34 does not share its IRQ.

Power Management
================
[ WARNING ] Power management can't be controlled from user space, the device node /dev/cpu_dma_latency can't be accessed by your user. This prohibits DAW's like Ardour and Reaper to set CPU DMA latency which could help prevent xruns. For enabling access see https://wiki.linuxaudio.org/wiki/system_configuration#quality_of_service_interface
User avatar
lilith
Established Member
Posts: 1698
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Has thanked: 117 times
Been thanked: 57 times
Contact:

Re: AVLinux / MXLinux Tuning - on two machines (different results)

Post by lilith »

I disabled Hyperthreading in the BIOS --> :mrgreen: Not as perfect as with UbuntuStudio, but in practice I doubt it will play any role.

Image

Blindekinder
Established Member
Posts: 112
Joined: Sat Jan 26, 2013 11:42 pm
Has thanked: 1 time
Been thanked: 1 time

Re: AVLinux / MXLinux Tuning - on two machines (different results)

Post by Blindekinder »

Hi,
this is my "benchmark":

CPU-Btwg-Diva.png
CPU-Btwg-Diva.png (22.49 KiB) Viewed 1442 times

Hyperthreading was already disabled on my P15s Thinkpad.

the two peaks are related to another bug I'm trying to solve since months:
viewtopic.php?t=24882

Kubuntu 22.04
KX repositories
KDE Plasma Version: 5
Kernel Version: 5.15-lowlatency (64-bit)
Processors: 8 × 11th Gen Intel® Core™ i7-1185G7 @ 3.00GHz
Memory: 31.1 Gio of RAM
Graphics Processor: Mesa Intel® Xe Graphics / Nvidia Quadro T500 Mobile
Jack2
Post Reply