Gentoo Archives: gentoo-user

From: Matt Garman <garman@××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] bad jack(?) performance
Date: Thu, 13 Oct 2005 01:18:59
Message-Id: 20051013011235.GA4263@raw-sewage.net
In Reply to: Re: [gentoo-user] bad jack(?) performance by Mark Knecht
1 On Thu, Oct 06, 2005 at 10:39:44AM -0700, Mark Knecht wrote:
2 > 1) First, let's determine whether you need a new kernel. su to
3 > ...
4 > jackd -R -dalsa -r44100 -dhw -p128 -n2
5 > alsaplayer -o jack
6 > ...
7 > longer test. Any skipping?
8
9 Nope, not when running jackd+alsaplayer as root.
10
11 However, when running jackd+alsaplayer as a regular user, I get lots
12 of skipping.
13
14 > If you have skipping at this point then you most likely need a
15 > real-time kernel. My 32-bit machines do not. They run fine with
16 > gentoo-sources, but my amd64 doesn't run well and needed a new
17 > realtime kernel to work right.
18
19 FWIW, before posting this message, I followed a jack howto (can't
20 remember the exact source), which walked me through recompiling my
21 kernel (with "[*] Enable different security models" and "<M>
22 Default Linux Capabilities"), as well as installing and setting
23 realtime-lsm up correctly...
24
25 > 2) Assuming that your tests as root go well, then emerge
26 > realtime-lsm. This may require a new kernel if you don't have the
27 > right Linux Securities stuff enabled:
28
29 ...but because I'm error-prone, I double-check my configuration. As
30 far as I can tell, I have everything set up correctly.
31
32 >From what I can tell, it appears that when I run jackd and
33 alsaplayer as a non-root user, they automatically get nice'ed, and I
34 believe this is what is causing the skipping.
35
36 For example, as root:
37
38 # ps ax | grep jack
39 9430 pts/1 SLl 0:08 jackd -R -dalsa -r44100 -dhw -p128 -n2
40 9434 pts/1 SLl 0:09 alsaplayer -o jack
41
42 # top
43 PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
44 9430 root 18 0 28196 27m 2344 S 2.3 2.7 0:08.68 jackd
45 9434 root 15 0 61852 60m 9336 S 2.0 6.0 0:09.89 alsaplayer
46
47 But as a regular user:
48
49 # ps ax | grep jack
50 9661 pts/11 SNLl 0:00 jackd -R -dalsa -r44100 -dhw -p128 -n2
51 9665 pts/11 SNLl 0:00 alsaplayer -o jack
52
53 # top
54
55 PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
56 9665 garman 20 5 61868 60m 9336 S 2.0 6.0 0:00.86 alsaplayer
57 9661 garman 22 5 28200 27m 2344 S 1.7 2.7 0:00.82 jackd
58
59 Notice the "N" (nice) flag for ps, and the niceness value of 5 in
60 top?
61
62 I even tried invoking jackd with the nice program (e.g. "nice -n 0
63 jackd ..."), but still got stuck the result above.
64
65 Hopefully I'm missing something simple... any thoughts?
66
67 Thanks!
68 Matt
69
70 --
71 Matt Garman
72 email at: http://raw-sewage.net/index.php?file=email
73 --
74 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] bad jack(?) performance Mark Knecht <markknecht@×××××.com>