Hello,
if MAX_SHM_ID is an OS constant, why is it defined in JACK source code then?
I understand issues with context switching. But I am designing system that
can easily split into multiple machines, so instead of having 1 huge JACK
with 100 clients I can have 10 x 10 etc. But still, I need to know what is
the limit, and it seem to be quite unknown… I can obviously do crash
testing, but I would prefer to rely on certain design principles, no luck
that I won’t encounter some hardcoded limits...
Any advice how to compute max number of clients?
Any experience about that in practice?
Marcin
dnia 10 czerwca 2016 o 16:39:17, Paul Davis (paul(a)linuxaudiosystems.com)
napisał:
client limits: i will leave the developer(s) of jack2 to comment on the
specifics. jack2 hard-codes more values than jack1.
the shared memory registry: you can't make its configuration a run-time
thing, because you'd have to ensure that the library and the server are
both given the same value.
MAX_SHM_ID is an operating system constant.
you are hitting the limit almost certainly because you are running far more
clients than JACK was designed to support.
every client with a process callback implies at least 1 extra context
switch during the process cycle. this does not and cannot scale with
contemporary operating systems and processors. context switches are cheap
but not free. doing hundreds of them per process cycle steals significant
amounts of time from what is available for actual signal processing.
On Fri, Jun 10, 2016 at 9:46 AM, marcin(a)saepia.net <marcin(a)saepia.net>
wrote:
Well I understand but what I observe is that JACK has
unpredictable amount
of total clients which is an issue, regardless if it's closer to 10 than
1000.
I have found out at least 3 conditions that affect this:
- compilation flags, which by the way may cause jack to segfault if they
are set too high
- parameter to jackd
- MAX_SHM_ID
I suggest integrating this into one runtime command line parameter.
M.