What's new

[SOLVED] VSL Synchron Player problems on M1 Ultra

Synchron Player is a single threading plugin, so the host application / OS has to decide how threads are spread out on CPU cores. // If I'm not mistaken the host (your DAW or VEP) is responsible for how it manages threads and tells the OS what to do with it.
This isn't really a reply specifically to you Ben, more a "quick note" (ahem) to try to clear up a few things in the last few posts. The really quick version is that plugins aren't single-threaded, and can - and should! - correctly set-up scheduling policies for their threads, e.g. this, in the case of plugin threads in an AU.

The fuller explanation for anyone who's interested... in spoiler blocks to make it seem more interesting :)
Applications can tell the OS (MacOS, Windows, etc) how their processes/threads should be scheduled. This includes whether or not they need real-time processing. If an application doesn't do this, the OS may bump its thread from its CPU when a high-priority task arises, and your video/audio will stutter. This can happen even if the machine is largely idle: simply moving cores can be enough. If the OS does know about the real-time processing, it'll try to protect that thread's CPU time: the app may still stutter, but only under much heavier load.
In a "neat" world, a plugin would use the DAW like a mini operating system: it gets all its threads from the DAW, which gets then from the OS, sets them up properly, and passes them to the plugin. That would mean the DAW sets scheduling up consistently for everything, and it knows about all the plugins' threads. That's important because it means the DAW can intervene even when there are more real-time threads than there are CPU cores, preventing a free-for-all.

In the real world, plugins talk to the DAW about audio processing but are mostly free to talk to the OS about everything else, including the creation of threads. This means different plugins may behave differently because of how they set-up their threads, and that plugins can disrupt processing for an entire project by creating too many.[1]

[1] Things are a bit more organised on MacOS, as Audio Units are loaded in a sandbox where their activities are - at least theoretically - more controlled. This is why I thought Logic might be performing better in @Olympum 's original post.
Firstly, a safety warning: please don't blindly enter commands from random guys on the internet unless you understand them or have checked the man pages, or some other reputable source. That goes double for anything involving sudo.

You can see how a plugin creates threads fairly easily, by typing ps M <pid> at a terminal (this is on MacOS), where <pid> is the Process ID (PID) of your DAW, or - for Logic - AUHostingService. (You can get the PID from Activity Monitor, or using ps x | grep AUHosting.) ps M will show the threads associated with the process you specify, along with their priorities. If you add another plugin and re-run the command, you'll see new threads have been created.

sudo taskinfo --threads <pid> will give you even more information, but it'll only be comprehensible to someone who knows about the details of operating system scheduling and has read the (spotty) Apple documentation. But, if I were trying to find out how a plugin's handling its threads, that's where I'd probably start (if I didn't have the Xcode Instruments anyway.)

Finally, theoretically you can disable cores on MacOS using cpuctl, but I suspect this doesn't work on Apple silicon, or maybe it only works in Recovery/with SIP disabled. I'd definitely put this in the "don't do that" category.
 
Hi @Ben here are two videos showing CPU activity on both VEP builds (3440 and beta 3472) with Studio One.
Compared with previous Synchron Player only project, the VEP one does not product any audio crackle and sincerely I don't notice any difference between those builds, looking at the graphs.

However I'd like to not be forced to change my workflow using VEP instead of multiple Synchron Player instances, specially when working with Logic and its multi instruments and AU audio ports limitations.
It seems that to make Synchron Player work correctly, one must also have VEP and adapt to its workflow. I really hope your developer find out how to make Synchron Player work properly outside of VEP.

VEP_build_3440

VEP_build_3472
 
The really quick version is that plugins aren't single-threaded, and can - and should! - correctly set-up scheduling policies for their threads, e.g. this, in the case of plugin threads in an AU.
In most cases, simple effect plugins, and simple instrument plugins, are not launching any threads internally. The threads processing these plugins are managed by the DAW. Any DAW that I know of uses realtime scheduling policies for the processing threads.

In the case of more complex plugins, there will usually be a bunch of threads involved to produce your result. In the case of Synchron Player, the actual voice and audio processing is single threaded - handled by the host. There are then a bunch of (non-realtime) background threads for handling disk streaming, convolution and such. It is usually not great to run such threads at realtime scheduling policies, because they are inherently non-realtime and buffered.

Logic, and its AU remote XPC host, also uses Audio Workgroups for scheduling. It is *very* important to use the Audio Workgroups API for any plugins requiring synchronization of their own realtime threads on a Mac with an e/p core setup, and even more so for the Ultra, where the e-core count is higher. I expect this to be even more important with the M3, since the e-core count is increased.

At the moment, only the AU format (v2 and v3) have APIs for using Audio Workgroups. This is a severe limitation of any other plugin format at this moment. I'm actually not even sure Cubase (or any non-Apple host for that matter) uses Audio workgroups for its own rendering threads. This may also become more important on Windows now that we have Intel CPUs with e/p core divisions. I'm also not sure if there are any hosts using thread ordering groups on Windows...

In any case, we're currently looking further into performance with Synchron Player on wider CPUs, and hope to get any issues resolved ASAP.
 
The really quick version is that plugins aren't single-threaded
In most cases, simple effect plugins, and simple instrument plugins, are not launching any threads internally. The threads processing these plugins are managed by the DAW.
Yes, fair enough: I was responding to the idea that instruments must be single-threaded if they're in a DAW, but I should have said "...aren't necessarily single-threaded...". I wasn't trying to make a point about VSL's scheduling, though. This is partly because I think the OP's performance issue looks more like it's related to contention than scheduling (insofar as they can be separated), but even then: I've got squinting-at-graphs-on-the-internet, and you've got source code, so... ;)

Since audio plugins are so prone to unconstrained side-effects, I often wonder if they should be entirely restricted to using resources that have been provided and managed by the DAW... but then I think of the API work that'd involve.
 
so @aldous you wouldn’t recommend they try sudo rm -rf? :)
I don't think I could bring myself to type that, not even into a browser... it's like referring to "the Scottish play" by name in a theatre. :) (I recommend forgetting the -r option even exists, and getting used to using "find ... -delete" instead.)
 
At the moment, only the AU format (v2 and v3) have APIs for using Audio Workgroups.
I will be able to test the new VEP7 beta tomorrow with audio workgroups. I am curious now that you mention this, would it be better then from a VEP server perspective to host AU vs VST3 plugins?

FWIW, based on this comment, since my issues were apparent in Cubase, and yet I saw I could make Logic/AU work, I decided to try Studio One using AU. The result is very positive, just like Logic. The only difference is that whereas Logic loads the e-core and p-cores, Studio One is mostly running on the e-cores (and there is no AUHostingService).
 
I will be able to test the new VEP7 beta tomorrow with audio workgroups. I am curious now that you mention this, would it be better then from a VEP server perspective to host AU vs VST3 plugins?

FWIW, based on this comment, since my issues were apparent in Cubase, and yet I saw I could make Logic/AU work, I decided to try Studio One using AU. The result is very positive, just like Logic. The only difference is that whereas Logic loads the e-core and p-cores, Studio One is mostly running on the e-cores (and there is no AUHostingService).
For VEP Server I'd stick to hosting AU plugins on macOS, and also using AU for the VEP plugin. However, we are currently not able to sync up the VEP Server to the DAWs Audio Workgroups, due to some issue with inter-process Audio Workgroups. I hope to resolve this issue with Apple soon, since I have a chance to meet them in person at the ADC in London from today onwards.
 
we are currently not able to sync up the VEP Server to the DAWs Audio Workgroups, due to some issue with inter-process Audio Workgroups.
I just tested the beta earlier this morning and unfortunately the DAW freezes upon connection (Logic, Cubase and Studio One alike).
 
I tested the latest VEP beta and on Studio One the AU version doesn't show any GUI, so I can't connect to any server instance (MIDI track is created so as its related VEP virtual instrument but if I try to open the instrument window nothing is shown).
The AU3 version doesn't work at all: no tracks are created and no instrument are instantiated.
Only VST3 version seems to work correctly in Studio One and the playback is smooth if I use a buffer size of at least 256 (smaller values product audio crackles) and dropout protection to "minimum".

In Logic the AU version doesn't work because as soon as I create a multi-timbral VEP instrument, a warning dialog pops up forcing me to close Logic (!).
Only AU3 version seems to work correctly in Logic and the playback is smooth if I use a buffer size of at least 128 (smaller values produce audio crackles).
The problem with AU3 is that it supports only 25 audio output, so I can't redirect all VEP instruments to Logic. The VEP Event Input plugin doesn't work either:as soon as I create a multi-timbral VEP Event Input instrument, the same warning dialog pops up forcing me to close Logic.
 
Which topic exactly out of curiosity, there are a lot of conflicting things mentioned on this thread
Most, if not all, issues described in this thread comes down to e- and P- core designs of modern Apple and Intel CPUs, and how threads are handles by OS and DAW.
 
@yellow_lupine have you been able to sort this issue out with VSL?
Hi rAC, not yet unfortunately :(
They told me they have an ongoing communication with Apple devs about this issue. There also seem to be an API function that is not working at the moment.
I really hope they find a solution soon.
 
Top Bottom