Scaling Jack (and Jacktrip?) by using section-routing

This is really fast/early draft stuff.

The puzzler:  Building a 20-person mix-delete audio routing template in my Pretty Good Jacktrip Toolkit crashes (moderately-sized) Linode servers.  They seem to crash when automating large numbers of Jack-connection adds or deletes — issuing a delete-all with JMESS for example.

The hypothesis: Jack works OK, it’s the number of connections per endpoint that’s causing the trouble.

The idea to get around this (so far): split the mix-minus routing in two by putting players in sections.

There are now two mix-minus routings (“Each-player-in-section to All-other-players-in-section” and “Each-section to All-other-sections”), which still grow geometrically but result in much lower endpoint counts and thus will hopefully scale larger.

I’m testing this idea with 20-person-ensemble Ardour and JMess templates.  The Ardour template configures the mixer/DAW, the JMess template sets up the audio routing in Ardour each time players join.  They will be included in the Toolbox once I’m convinced they’ll work.

The Configuration:

Here’s the puzzler: a 20 person mix-minus routing (where every person is connected to everybody else).  That’s N(N-1) or 20×19 or 380 connections (19 connections per endpoint) times 2 (because there are two endpoints per connection) for a total of 760.  This is an old picture, so its got 21 players and is also in stereo, multiply by 2 again.

This is the pretty picture representing a challenging puzzler:

Here’s the proposed mix-minus routing for people within four groups – everybody in the group can hear everybody else.  See?  Not nearly as many connections at each endpoint.

The swooping-up curvy wires are bringing all-other-sessions audio to each person — see the next picture.

Here’s the mix-minus routing between the four groups.  People in every group can hear a mix of every other group.  This is another way to visualize the lower number of endpoint connections.

The swooping-down curvy wires are bringing player-audio into session-mixes — see the last picture.

A bonus.  This routing gives us “section mixes.”  Here’s a picture of the mix panel where they appear.

The results:

Aug 27, 2021  The 20-player x 4-group configuration runs, JMess can delete and reload routings and this setup can accept at least 1 Jacktrip connection in Linode’s smallest configuration (a “Nanode” which has 1 CPU, 1GB Ram, 512k swap, 25Gbyte disk, and costs $.0075/hour capped at $5.00/month).

It’s taxing the Linode right to the max (almost no memory or swap left, CPU routinely running between 50-80%).  JMess takes about a minute to tear down and refresh all the connections).  Moving up a notch or two runs more crisply — I’ve been routinely hosting sessions and doing development in a Linode 4GB ($.03/hour capped at $20/month).

Nanode test1.  I want to see how much load the tiny Nanode can handle.  This test was of the full mix-minus routing even though there was only one connected Jacktrip session.  That generates hundreds of additional audio channel connections to the stress-test.

All the channels worked.  Audio recording works — I recorded both the regular and broadcast channels of the  session.  A click click appears at exactly the same point in both recordings (presumably it came from me) — it’s a little more pronounced in the Broadcast-channel recording.

Here are audio-recording snippets, downloaded from the Nanode:

–  Regular-channels – stereo – 17seconds – 48k – wave

–  Broadcast-channels – stereo – 17seconds – 48k – wave