Has MacOS Sonoma finally fixed real time threading issues on Apple Silicon?
-
Blue Cat Audio Blue Cat Audio https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=39981
- KVRAF
- Topic Starter
- 5822 posts since 8 Sep, 2004 from Paris (France)
[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?
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?
Last edited by Blue Cat Audio on Mon Nov 06, 2023 4:13 pm, edited 1 time in total.
-
- KVRian
- 1143 posts since 26 Feb, 2006 from Fartland
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 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(...)"
https://jstuff.wordpress.com
"MIDI 2.0 is an extension of MIDI 1.0. It does not replace MIDI 1.0(...)"
-
Blue Cat Audio Blue Cat Audio https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=39981
- KVRAF
- Topic Starter
- 5822 posts since 8 Sep, 2004 from Paris (France)
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.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.
-
- KVRian
- 1143 posts since 26 Feb, 2006 from Fartland
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".
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(...)"
https://jstuff.wordpress.com
"MIDI 2.0 is an extension of MIDI 1.0. It does not replace MIDI 1.0(...)"
-
Blue Cat Audio Blue Cat Audio https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=39981
- KVRAF
- Topic Starter
- 5822 posts since 8 Sep, 2004 from Paris (France)
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!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".
-
- KVRian
- 1143 posts since 26 Feb, 2006 from Fartland
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(...)"
https://jstuff.wordpress.com
"MIDI 2.0 is an extension of MIDI 1.0. It does not replace MIDI 1.0(...)"
-
Blue Cat Audio Blue Cat Audio https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=39981
- KVRAF
- Topic Starter
- 5822 posts since 8 Sep, 2004 from Paris (France)
- KVRAF
- 23103 posts since 7 Jan, 2009 from Croatia
Just asking, are you aware of Audio Workgroups?
https://developer.apple.com/documentati ... workgroups
https://developer.apple.com/documentati ... workgroups
-
Blue Cat Audio Blue Cat Audio https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=39981
- KVRAF
- Topic Starter
- 5822 posts since 8 Sep, 2004 from Paris (France)
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!EvilDragon wrote: ↑Fri Oct 13, 2023 11:05 am Just asking, are you aware of Audio Workgroups?
https://developer.apple.com/documentati ... workgroups
- u-he
- 28067 posts since 8 Aug, 2002 from Berlin
-
- KVRAF
- 2393 posts since 28 Mar, 2005
Audio workgroup are supported by Logic since one or two versions
- u-he
- 28067 posts since 8 Aug, 2002 from Berlin
-
Tone2 Synthesizers Tone2 Synthesizers https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=680600
- KVRist
- 210 posts since 18 Oct, 2023
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
-
Blue Cat Audio Blue Cat Audio https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=39981
- KVRAF
- Topic Starter
- 5822 posts since 8 Sep, 2004 from Paris (France)
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...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.
Anyway the problem seems to be gone with the latest OS. Knock on wood.