Has MacOS Sonoma finally fixed real time threading issues on Apple Silicon?

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

[EDIT: it looks like I was wrong and there is actually no multicore magic in Sonoma :-(]

If like us you have been developing plug-ins or apps doing multicore parallel processing lately, you may have encountered many threading priority issues on Apple Silicon since the release of MacOS Ventura because of the asymmetric nature of Apple Silicon processors.

I don't know if you have found a viable solution to these scheduling issues, but we have not (yet)!

It seems however that this is all gone with Mac OS Sonoma... So maybe we should just forget about QOS-based priority for pthreads and Audio WorkGroups? Have you noticed the same improvements with your own software?

Has MacOS Sonoma Fixed Multicore Performance for Apple Silicon?

Image
Last edited by Blue Cat Audio on Mon Nov 06, 2023 4:13 pm, edited 1 time in total.

Post

I would not bother too much. Computers get faster, API's get deprecated...

I have had enough of messing around with thread scheduling API's, when all of a sudden something in a new OS upgrade can override all the thread scheduling optimization code you spent lots of time working on...

Ultimately, it is on the user's end the responsibility of optimizing the machine for the purpose they intend.
Free MIDI plugins and other stuff:
https://jstuff.wordpress.com
"MIDI 2.0 is an extension of MIDI 1.0. It does not replace MIDI 1.0(...)"

Post

umd wrote: Fri Oct 13, 2023 9:40 am I would not bother too much. Computers get faster, API's get deprecated...

I have had enough of messing around with thread scheduling API's, when all of a sudden something in a new OS upgrade can override all the thread scheduling optimization code you spent lots of time working on...

Ultimately, it is on the user's end the responsibility of optimizing the machine for the purpose they intend.
I agree with the deprecation of APIs, especially in the case of Apple's fancy concepts... But in this case it was not even a matter of optimization: the previous MacOS had serious problems with how it scheduled threads on various types of cores, resulting in audio dropouts and very bad performance when doing real time audio processing in thread pools. Ut's good news that these issues seem to be gone with the OS.

Post

I wish you success.

I stopped caring about thread scheduling many years ago ( Well, unless I can tweak the kernel's code, which is not the case here ), since the trend became letting the OS decide for you what scheduling priorities should be set, no matter what priority you code for your app/threads. The marketing department proudly boasts it as something like "increased battery life".
Free MIDI plugins and other stuff:
https://jstuff.wordpress.com
"MIDI 2.0 is an extension of MIDI 1.0. It does not replace MIDI 1.0(...)"

Post

umd wrote: Fri Oct 13, 2023 10:22 am I stopped caring about thread scheduling many years ago ( Well, unless I can tweak the kernel's code, which is not the case here ), since the trend became letting the OS decide for you what scheduling priorities should be set, no matter what priority you code for your app/threads. The marketing department proudly boasts it as something like "increased battery life".
Well, yes that's indeed the plan: let the system decide for you as it is supposed to be smart enough. Unfortunately on Ventura it looks like the scheduler was really awful at doing its job!

Post

I think the system will be as smart as the marketing department. But, nevermind me, I am just a Dilbert fan.
Free MIDI plugins and other stuff:
https://jstuff.wordpress.com
"MIDI 2.0 is an extension of MIDI 1.0. It does not replace MIDI 1.0(...)"

Post

umd wrote: Fri Oct 13, 2023 10:35 am I think the system will be as smart as the marketing department. But, nevermind me, I am just a Dilbert fan.
:lol:

Post

Just asking, are you aware of Audio Workgroups?

https://developer.apple.com/documentati ... workgroups

Post

EvilDragon wrote: Fri Oct 13, 2023 11:05 am Just asking, are you aware of Audio Workgroups?

https://developer.apple.com/documentati ... workgroups
Yes, it is actually cited in the article above. My personal opinion is that it looks like a "hack" to fix an otherwise faulty scheduler. It should be only an additional feature used to improve real time performance under heavy load. Also it conflicts with Apple's own recommended QoS-based thread priorities, so I am quite skeptical about it!

Post

It is reading these indeterminate things that clouds the consumer's judgement; Is the next OS update going to fix all these problems?

Post

Audio Workgroups are still not supported by Logic. Or did that change lately?

Post

Audio workgroup are supported by Logic since one or two versions
Olivier Tristan
Developer - UVI Team
http://www.uvi.net

Post

otristan wrote: Fri Oct 13, 2023 12:26 pm Audio workgroup are supported by Logic since one or two versions
Oi! We had implemented them almost 3 years ago, and then apparently missed the opportunity to finally test them :lol: :lol: :lol:

Post

We are using multithreading and support multicore CPUs on the Mac without problems since over a decade. I do not think that the scheduler on the Mac is 'faulty'. But it is was tricky to setup as it works differently than on the PC. Make sure that you set the priority high enough on the Mac.
We do not have a support forum on kvr. Please refer to our offical location: https://www.tone2.com/faq.html

Post

Tone2 Synthesizers wrote: Wed Oct 18, 2023 8:13 am We are using multithreading and support multicore CPUs on the Mac without problems since over a decade. I do not think that the scheduler on the Mac is 'faulty'. But it is was tricky to setup as it works differently than on the PC. Make sure that you set the priority high enough on the Mac.
Never had a single problem either, until recently, and only on Apple Silicon (Intel have been working like a charm). I think it happened when they introduced the Audio Workgroups mentioned earlier. From what I have read on the Internet, it broke for many others. I guess it indeed depends on how thread pools have been implemented, but there is no (good) reason why it would break suddenly with a new OS release...

Anyway the problem seems to be gone with the latest OS. Knock on wood. :party:

Post Reply

Return to “DSP and Plugin Development”