I have a USB soundcard that I add to netone backend through zita-a2j and
zita-j2a.
For software volume control, I put jackminimix between zita-a2j and
zita-j2a or between zita-a2j and netone.
I didn't know why I got xruns while I compiled kernel or gentoo packages.
Today, I used stress-ng to put various loads on my computer.
"nice -n 19 stress-ng --iomix 8 --ionice-class idle -t 5m" caused multiple
xruns.
"nice -n 19 stress-ng --cpu 8" didn't cause xruns.
I tried giving real-time ionice priorities to netone backend,
zita-ajbridge, and jackminimix.
Eventually, the setup that seems to withstand "nice -n 19 stress-ng --iomix
8 --ionice-class idle --cpu 8 -t 5m" was
ionice -c 1 -n 3 sudo -u user jackd -P 90 -d netone ("-p 256" inherited
from jack_netsource) -n 3
ionice -c 1 -n 0 sudo -u user stdbuf -o 0 zita-a2j -j from_alsa -d spdif_in
-p 128 -n 2 -r 48000
ionice -c 1 -n 0 sudo -u user stdbuf -o 0 zita-j2a -j headphones -d
xfihd_hdp -p 128 -n 2 -r 48000
ionice -c 1 -n 6 sudo -u user stdbuf -o 0 jackminimix -c 1 -p 20255 -n
hdp-vol
ionice -c 1 -n 6 sudo -u user stdbuf -o 0 jackminimix -c 1 -p 20256 -n
spk-vol
I will have to test more to be sure that this setup really withstands
writing to ZFS which amplifies writes many times.
I guess that writing to ZFS interferes with reading from and writing to USB
soundcard or ethernet adaptor. I thought ionice only affected file system
operations.
Perhaps, does ionice affect xruns because I log stdout and stderr of jackd,
zita-ajbridge, and jackminimix into files on ZFS without buffering? "stdbuf
-o 0" removes buffering.