Plugins - measured
One worker per chain, or one process per plugin.
plugin-hostd can run a chain of plugins inside one worker process, or give every plugin its own process. This page is one measurement of the two on a Raspberry Pi 5, with every row, and with what was not measured.
01
What came out.
- Memory: with 16 plugins, resident memory (RSS) is 14x smaller grouped (125.4 MB against 1764.6 MB at 48 kHz) and proportional memory (PSS) is 2.8x smaller (42.9 MB against 118.2 MB).
- CPU: 1.2 to 1.9x less when grouped, across 3, 8 and 16 plugins at 48 and 96 kHz.
- Context switches: up to about 14x fewer when grouped, 13.9x at 48 kHz and 14.8x at 96 kHz with 16 plugins.
- Xruns over the 12 runs of each mode: 10 grouped against 41 with one process per plugin.
RSS counts a shared library once for every process that maps it, so a design with many processes looks larger than it is. PSS divides shared pages between the processes that use them, so it is the honest figure, and both are shown. Do not read the RSS ratio as the saving in real memory.
Each run is one window of 10 seconds and the xruns in it are few and unevenly spread, so the 10 against 41 is suggestive and not proof. Read it as a count and not as a rate.
02
How it was measured.
Raspberry Pi 5 with 4 cores running Zynthian, CPU governor on performance during the runs. plugin-hostd 0.12.0 with omx-clap-host 0.22.1 as the worker. N instances of omx plugins in series (chorus, comp, deesser, delay, drive, eq8, flanger and geq, in turn), a sine in, 256 frames, on a private JACK server with a dummy driver. The JACK server of the live system was not touched. Both modes produce the same output signal (peaks equal within 1%).
Each run is one window of 10 seconds after 1 second of warm-up. N is 3, 8 or 16, the rate 48 or 96 kHz, each with and without stress (8 busy-loop processes on the 4 cores). That is 12 runs of each mode.
Memory and CPU are summed over plugin-hostd and its workers. CPU is a percentage of one core. Context switches are voluntary plus involuntary ones of all their threads in the window. DSP is the JACK load, average and maximum, read once a second. Xruns are the JACK xrun callbacks in the window.
03
What was not measured.
- Only 256 frames. 128 frames were not run.
- Only plugin-hostd, with omx plugins. No other plugin host, and no third-party plugin, is in these numbers.
- The grouping planner that will decide which plugins share a worker is not part of this result. The numbers compare the two fixed modes and no default has been changed because of them.
- DSP load and xruns are those of the JACK dummy driver. No claim about real audio hardware is made.
04
The ratios.
One process per plugin divided by grouped, without stress. Processes are shown as individual / grouped. For CPU and context switches a ratio above 1 means the grouped run used less.
| Rate (Hz) | Plugins | Processes | RSS | PSS | CPU | Context switches |
|---|---|---|---|---|---|---|
| 48000 | 3 | 4 / 2 | 2.92x | 1.90x | 1.24x | 2.71x |
| 48000 | 8 | 9 / 2 | 7.46x | 2.60x | 1.62x | 7.02x |
| 48000 | 16 | 17 / 2 | 14.07x | 2.76x | 1.86x | 13.92x |
| 96000 | 3 | 4 / 2 | 2.92x | 1.90x | 1.21x | 2.83x |
| 96000 | 8 | 9 / 2 | 7.46x | 2.60x | 1.43x | 7.41x |
| 96000 | 16 | 17 / 2 | 14.07x | 2.76x | 1.60x | 14.78x |
05
Every row.
The 24 runs as measured. Memory in MB, CPU as percent of one core, DSP as average / maximum percent.
| Rate (Hz) | Plugins | Stress | Mode | Processes | JACK clients | RSS MB | PSS MB | CPU % | Context switches | DSP avg / max % | Xruns |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 48000 | 3 | no | grouped | 2 | 1 | 113.4 | 31.0 | 2.1 | 2795 | 2.1 / 2.27 | 0 |
| 48000 | 3 | no | one per plugin | 4 | 3 | 331.0 | 59.0 | 2.6 | 7579 | 2.34 / 2.37 | 0 |
| 48000 | 3 | yes | grouped | 2 | 1 | 113.4 | 30.9 | 2.4 | 2838 | 2.11 / 2.23 | 0 |
| 48000 | 3 | yes | one per plugin | 4 | 3 | 330.9 | 58.9 | 2.7 | 7616 | 2.4 / 2.45 | 0 |
| 48000 | 8 | no | grouped | 2 | 1 | 118.1 | 35.6 | 3.9 | 2793 | 3.86 / 3.88 | 0 |
| 48000 | 8 | no | one per plugin | 9 | 8 | 881.6 | 92.7 | 6.3 | 19612 | 4.86 / 4.9 | 0 |
| 48000 | 8 | yes | grouped | 2 | 1 | 118.1 | 35.6 | 4 | 2809 | 3.89 / 3.99 | 0 |
| 48000 | 8 | yes | one per plugin | 9 | 8 | 881.7 | 92.6 | 6.49 | 19820 | 4.92 / 5.33 | 0 |
| 48000 | 16 | no | grouped | 2 | 1 | 125.4 | 42.9 | 7.2 | 2801 | 7.25 / 7.29 | 0 |
| 48000 | 16 | no | one per plugin | 17 | 16 | 1764.6 | 118.2 | 13.39 | 38985 | 9.83 / 9.98 | 0 |
| 48000 | 16 | yes | grouped | 2 | 1 | 125.4 | 42.9 | 7.3 | 2795 | 7.24 / 7.31 | 0 |
| 48000 | 16 | yes | one per plugin | 17 | 16 | 1764.5 | 118.0 | 13.15 | 39219 | 9.94 / 12.49 | 18 |
| 96000 | 3 | no | grouped | 2 | 1 | 113.4 | 31.0 | 3.8 | 4678 | 4.05 / 4.11 | 0 |
| 96000 | 3 | no | one per plugin | 4 | 3 | 330.9 | 59.0 | 4.6 | 13233 | 4.52 / 4.57 | 0 |
| 96000 | 3 | yes | grouped | 2 | 1 | 113.4 | 30.9 | 3.9 | 4749 | 4.16 / 4.26 | 0 |
| 96000 | 3 | yes | one per plugin | 4 | 3 | 330.9 | 59.0 | 4.8 | 13397 | 4.62 / 4.82 | 0 |
| 96000 | 8 | no | grouped | 2 | 1 | 118.1 | 35.6 | 7.5 | 4679 | 7.62 / 7.79 | 2 |
| 96000 | 8 | no | one per plugin | 9 | 8 | 881.5 | 92.7 | 10.69 | 34674 | 9.38 / 9.45 | 0 |
| 96000 | 8 | yes | grouped | 2 | 1 | 118.1 | 35.6 | 7.4 | 4696 | 7.59 / 7.76 | 3 |
| 96000 | 8 | yes | one per plugin | 9 | 8 | 881.7 | 92.6 | 11.38 | 34875 | 9.53 / 10.15 | 10 |
| 96000 | 16 | no | grouped | 2 | 1 | 125.4 | 42.9 | 14.2 | 4700 | 14.41 / 14.79 | 0 |
| 96000 | 16 | no | one per plugin | 17 | 16 | 1764.5 | 118.2 | 22.68 | 69466 | 19.16 / 22.33 | 13 |
| 96000 | 16 | yes | grouped | 2 | 1 | 125.4 | 42.9 | 14.2 | 4717 | 14.37 / 14.61 | 5 |
| 96000 | 16 | yes | one per plugin | 17 | 16 | 1764.4 | 118.0 | 23.33 | 76520 | 19.52 / 19.94 | 0 |
The plugins themselves are described on the page on the shipped plugins.