Forums > MaxMSP

OSX & MSP cpu confusion

January 2, 2010 | 8:11 pm

One of my patches is registering 20-30% cpu in MaxMSP when it’s fully up and running (…..desparately needs some optimizing), but Activity Monitor is telling me that MaxMSP is using 60-70% of my cpu.

That’s with no apps other than Max5 running, and only that one patch open. With audio off, Activity Monitor is still showing that Max is using 25% cpu. Bearing in mind that this patch is about 95% MSP, with a very minimal interface (and all buffers empty), that seems very strange to me.

I’m using 10 instances of elasticindex~ (autosmooth setting IS off, but they still account for a lot of the processing), but it appears that Max is using what seems to be a massive percentage of my cpu. Even with audio off and no patches open, it is still showing 20% in Activity Monitor.

Does this seem strange to anyone else?


January 4, 2010 | 12:31 am

I have the same question. I have noticed that in activity monitor always shows double cpu usage than the one it shows in Max cpu.


January 4, 2010 | 3:42 am

It makes sense that the cpu usege is showing only the DSP, but I was under the impression that MaxMSP doesn’t do multi-core processing (apart from in poly~), so no matter how heavy a non-poly~ patch gets, it wouldn’t be peaking above 50% in Activity Monitor. Or am I completely misunderstanding how all these factors interact? Probably am…..I’ll read through the docs again to see if they shed any light.

It’s not a massive issue for me at the moment, just an observation.

All things considered, I’m learning that 10 channels of granular phrase sample-munging is not particularly kind to my laptop……never mind.


January 4, 2010 | 7:07 am

In Activity Monitor, two cores maxed out will show up as 200% activity, not 100%. Quad cores can go up to 400%.


January 4, 2010 | 8:53 am

Mmmm…

Not sure Jean-Marc,

I have an old powerbook g4 (single core) and I’ve always had the same question.

Why does activity monitor show a different % than in Max’s DSP ?

phil


January 4, 2010 | 9:17 am

Max’s DSP cpu usage only shows you the cost of the DSP computation. the idea is that for every signal vector it shows you the ratio between the time spent in calculating the audio and the actual duration of the vector – does it make sense?

But at the same time Max is doing lots of other stuff – all the non-MSP things, messages, UI, its internal workings and much more… Activity monitor also shows you all of this.

And yes, Max does use your cores. You have the main thread, the high priority thread if you have overdrive on, the DSP thread and one or more threads if you have a poly~ @parallel 1. Potentially, each thread runs on a different core or processor.

If this sounds mysterious, and you want an in-depth look on the subject, there’s a great article by JKC

http://cycling74.com/2004/09/09/event-priority-in-max-scheduler-vs-queue/#more-604

Hope this helps…
aa


January 4, 2010 | 10:18 am

Phil,

I’m surprised Apple hasn’t documented this better, but from a third party source:

http://macperformanceguide.com/Mac-MonitoringTips.html

Of course, that’s only one reason why there is a discrepancy. Andrea’s post explains the rest.


Viewing 7 posts - 1 through 7 (of 7 total)