[Jack-Devel] Port number limitation

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Jack-Devel] Port number limitation

Hannes Helmholz
I have noticed the JACK server limitation of port numbers in some
specific applications ("Maximum number of output ports is reached for
application ref = 2"). I have noticed the "-p" / "--port-max" parameter
and was able to artificially scale down or up the available number. But,
I seem to have reached and upper limit at around 800. Due to possibly
already existing ports like system input and output I am not certain of
the exact number.

To be fair, the available number is high enough for general use cases
(also for me). But in these certain conditions it definitely limits my
possibilities without an apparent workaround.

Is there a way monitor if the port-max is passed correctly? Or where the
limitation arises otherwise? Or how to possibly circumvent it?

Best,
/Hannes


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

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Port number limitation

John Rigg
On Mon, Aug 19, 2019 at 08:54:04PM +0200, Hannes Helmholz wrote:
> I have noticed the JACK server limitation of port numbers in some
> specific applications ("Maximum number of output ports is reached for
> application ref = 2"). I have noticed the "-p" / "--port-max" parameter
> and was able to artificially scale down or up the available number. But,
> I seem to have reached and upper limit at around 800. Due to possibly
> already existing ports like system input and output I am not certain of
> the exact number.

jack_lsp should show a list of all ports.
 
> To be fair, the available number is high enough for general use cases
> (also for me). But in these certain conditions it definitely limits my
> possibilities without an apparent workaround.
>
> Is there a way monitor if the port-max is passed correctly? Or where the
> limitation arises otherwise? Or how to possibly circumvent it?

In jack2 (don't know about jack1) PORT_NUM_MAX is set in
JackConstants.h. It's currently set to 4096.

There are other numbers in JackConstants.h like DRIVER_PORT_NUM
(currently 256 which is too small for multiple MADI cards,
for example).

If you can't get enough ports you might have to raise one or
more of those numbers and recompile.

John
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Port number limitation

Hannes Helmholz


On 2019-08-21 22:52, John Rigg wrote:

> On Mon, Aug 19, 2019 at 08:54:04PM +0200, Hannes Helmholz wrote:
>> I have noticed the JACK server limitation of port numbers in some
>> specific applications ("Maximum number of output ports is reached for
>> application ref = 2"). I have noticed the "-p" / "--port-max" parameter
>> and was able to artificially scale down or up the available number. But,
>> I seem to have reached and upper limit at around 800. Due to possibly
>> already existing ports like system input and output I am not certain of
>> the exact number.
>
> jack_lsp should show a list of all ports.
>  
>> To be fair, the available number is high enough for general use cases
>> (also for me). But in these certain conditions it definitely limits my
>> possibilities without an apparent workaround.
>>
>> Is there a way monitor if the port-max is passed correctly? Or where the
>> limitation arises otherwise? Or how to possibly circumvent it?
>
> In jack2 (don't know about jack1) PORT_NUM_MAX is set in
> JackConstants.h. It's currently set to 4096.
>
> There are other numbers in JackConstants.h like DRIVER_PORT_NUM
> (currently 256 which is too small for multiple MADI cards,
> for example).
>
> If you can't get enough ports you might have to raise one or
> more of those numbers and recompile.
>
> John
> _______________________________________________
> Jack-Devel mailing list
> [hidden email]
> http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
>
Ahh, thank you for the hint. The wall I was actually running into here
was PORT_NUM_FOR_CLIENT being 768.

What is the reasoning for these limits, since just like that they seem
very arbitrary? But at least there is a known source for the limitations
now. :)

Sadly recompiling is certainly not trivial, mostly because I need to
work with OSX and eventually Windows. Which both are not officially
supported atm, I believe.
In case I manage, should it be feasible to raise some of the limits? Or
what might happen that I will have to look out for?

/Hannes


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

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Port number limitation

John Rigg
On Fri, Aug 23, 2019 at 01:36:13PM +0200, Hannes Helmholz wrote:

>
> On 2019-08-21 22:52, John Rigg wrote:
> > In jack2 (don't know about jack1) PORT_NUM_MAX is set in
> > JackConstants.h. It's currently set to 4096.
> >
> > There are other numbers in JackConstants.h like DRIVER_PORT_NUM
> > (currently 256 which is too small for multiple MADI cards,
> > for example).
> >
> > If you can't get enough ports you might have to raise one or
> > more of those numbers and recompile.
>
> Ahh, thank you for the hint. The wall I was actually running into here
> was PORT_NUM_FOR_CLIENT being 768.
>
> What is the reasoning for these limits, since just like that they seem
> very arbitrary? But at least there is a known source for the limitations
> now. :)
>
> Sadly recompiling is certainly not trivial, mostly because I need to
> work with OSX and eventually Windows. Which both are not officially
> supported atm, I believe.
> In case I manage, should it be feasible to raise some of the limits? Or
> what might happen that I will have to look out for?

I'm not a JACK developer, but I think at least some of those limits
are arbitrary. I know of one user on this list who needed to increase
DRIVER_PORT_NUM to accommodate two RME MADI cards, but the limit
hasn't yet been changed in the git source (probably due to lack of
time). Hopefully a developer will chime in with a more knowledgeable
answer.

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