I am trying to figure out some performance issues in a complex synth I have built.
At maximum settings, it takes about 4-5 ms to render 1024 samples through it (CPU + GPU processing time together as it uses GPU also).
In theory then, as long as I do not run out of GPU cores (and parallel coordination capacity) and CPU threads/cores, then I should be able to run as many instances as I want, right?
I mean, if each synth is run on a different thread and as a parallel GPU process (hypothetically without hitting any parallel GPU processing bottlenecks), and each only processes for 4-5 ms, then one should be able to have 10-32 or however many cores worth of instances, right?
I have read that when you run synths or multiple tracks through an audio bus, this typically then forces that into a single threaded pathway, however. So if you had three synths going to one bus, they are all processed on the same thread. Or are the threads still separate for the synths, then passed into a different mix thread?
What about the mix bus? Does that converge the threads? Or is that treated as a separate thread to mix the results of the other threads?
Are DAW synth threads typically stable over the sequential buffers? Or do the threads they are assigned to change randomly?
I have done a bit of research and found:
std::thread::id this_id = std::this_thread::get_id();
std::osyncstream(std::cout) << "thread " << this_id << " sleeping...\n";
I am thinking perhaps the only way to know is to run this get_id() in the audio processing of the synth and debug it to the GUI of the synth and then just see what I get from one instance to another in the DAW as it plays back.
Is that a reasonable way to see what is going on?
Essentially, I am just trying to narrow down where my performance bottleneck from stacking 3-5+ synths in the project is. Perhaps it is a GPU bottleneck, but that is tough to evaluate. Iâd like to be sure they are not running in series or sharing threads on the CPU/DAW processing somehow first.
Thanks for any thoughts.
