Multi Thread Audio Unit plugin on apple silicon

I am developing a multi thread instrument plugin for audio unit V2. This topic is about a software synthesizer that has been proven to work on intel macs, and has been converted to apple silicon native.

I have a problem when I use logic pro on apple silicon macs.

  • Plug the created software synthesizer to the instrument track.
  • Make the track not exist other than the track you created.
  • Put it in recording mode.

When the above steps are followed, the performance meter on the logic pro will show that the load is concentrated on one specific core and far exceeds the total load when the load is divided.

This load occurs continuously and is resolved when another track is created and the track is selected.

It is understandable as a specification that the load is concentrated on a particular core. However, the magnitude of the load is abnormal. In fact, when the peak exceeds 100%, it leads to the generation of acoustic noise.

Also, in this case, the activity monitor included with macOS does not show any increase in the usage of a specific CPU core. Also, the time profiler included with XCode did not identify any location that took a large amount of time.

We have examined various experimental programs and found that there is a positive correlation between the frequency of thread switches in multi threaded areas and the peak of this CPU spike. We even found a positive correlation between the frequency of thread switches in the multithreaded area and the peak of this CPU spike. Mutex is used for thread switch.

In summary In summary, we speculate that performance seems to be worse when multi thread processing is done on a single core. Is there any solution to this problem at the developer level or at the customer level of logic pro?

Symptom environment

  • MacBookePro 16inch 2021
    • CPU: apple m1 max
    • OS: macOS 12.6.3
    • Memory: 32GB
  • Logic pro 10.7.9
  • Built-in speaker
  • autido buffer size: 32 sample

Performance meter before symptoms occurred

A view of the performance meter with symptoms after the recording condition