Why does ionice affect xruns while HDDs are under heavy loads?

crocket <[email protected]> Fri, 23 Aug 2019 22:58:28 +0900
Newsgroups gmane.comp.audio.jackit
Message-ID <CAL0=0H0eUgP3EBV2rMWyXy8DdVoGuir-ssXwtmTMnM6aCR1g9w@mail.gmail.com>
--===============1148980739372682706==
Content-Type: multipart/alternative; boundary="0000000000000bc7520590c934ca"

--0000000000000bc7520590c934ca
Content-Type: text/plain; charset="UTF-8"

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.

--0000000000000bc7520590c934ca
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I have a USB soundcard that I add to netone backend throug=
h zita-a2j and zita-j2a.<div>For software volume control, I put jackminimix=
 between zita-a2j and zita-j2a or between zita-a2j and netone.</div><div><b=
r></div><div>I didn&#39;t know why I got xruns while I compiled kernel or g=
entoo packages.</div><div><br></div><div>Today, I used stress-ng to put var=
ious loads on my computer.</div><div>&quot;nice -n 19 stress-ng --iomix 8 -=
-ionice-class idle -t 5m&quot; caused multiple xruns.<br></div><div>&quot;n=
ice -n 19 stress-ng --cpu 8&quot; didn&#39;t cause xruns.</div><div><br></d=
iv><div>I tried giving real-time ionice priorities to netone backend, zita-=
ajbridge, and jackminimix.</div><div><br></div><div>Eventually, the setup t=
hat seems to withstand &quot;nice -n 19 stress-ng --iomix 8 --ionice-class =
idle --cpu 8 -t 5m&quot; was</div><div><br></div><div>ionice -c 1 -n 3 sudo=
 -u user jackd -P 90 -d netone (&quot;-p 256&quot; inherited from jack_nets=
ource) -n 3<br>ionice -c 1 -n 0 sudo -u user stdbuf -o 0 zita-a2j -j from_a=
lsa -d spdif_in -p 128 -n 2 -r 48000<br>ionice -c 1 -n 0 sudo -u user stdbu=
f -o 0 zita-j2a -j headphones -d xfihd_hdp -p 128 -n 2 -r 48000<br>ionice -=
c 1 -n 6 sudo -u user stdbuf -o 0 jackminimix -c 1 -p 20255 -n hdp-vol<br>i=
onice -c 1 -n 6 sudo -u user stdbuf -o 0 jackminimix -c 1 -p 20256 -n spk-v=
ol<br></div><div><br></div><div>I will have to test more to be sure that th=
is setup really withstands writing to ZFS which amplifies writes many times=
.<br>I guess that writing to ZFS interferes with reading from and writing t=
o USB soundcard or ethernet adaptor. I thought ionice only affected file sy=
stem operations.<br><br>Perhaps, does ionice affect xruns because I log std=
out and stderr of jackd, zita-ajbridge, and jackminimix into files on ZFS w=
ithout buffering? &quot;stdbuf -o 0&quot; removes buffering.</div></div>

--0000000000000bc7520590c934ca--

--===============1148980739372682706==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Jack-Devel mailing list
[email protected]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org

--===============1148980739372682706==--