I encountered some issues with extremely high CPU load when I tried to classify live images (using Dynamic and CurrentImage[]). Because I couldn't figure out what went wrong I tried to find a simpler example and found that the following produces the same high CPU load:

trainingset = {1 -> "A", 2 -> "A", 3.5 -> "B", 4 -> "B"}; 
c = Classify[trainingset]; 
Dynamic[c@RandomReal[4], UpdateInterval -> 1] 
  • For UpdateInterval->1 the WolframKernel process produces a CPU load between 80% and 120%.

  • For UpdateInterval->0 the WolframKernel process produces a CPU load around 300%.

I already asked this question in the chat a few days ago and one user could confirm this while another could not replicate the behavior.

I run Mathematica on a 2014 Retina Macbook Pro (2.2 GHz i7-4770HQ) under OS X 10.11.3.

The picture below shows the CPU load as reported by the OS X activity monitor (load >100% can be interpreted as multiple cores being stressed; thus on a 4-core machine with hyper-threading 800% load equals 100% for the processor as a whole)

activity monitor

  • $\begingroup$ What exactly does a CPU load greater than 100% mean? $\endgroup$ – MarcoB Jun 29 '16 at 17:05
  • $\begingroup$ It is a 4-core machine, the maximum load is 400% (100% per physical core) as reported by activity monitor in OS X $\endgroup$ – Sascha Jun 29 '16 at 17:06
  • $\begingroup$ I just figured out that the virtual cores (due to hyper threading) are accounted for in the total CPU load too. Thus on a 4(physical)-core machine the maximum load is 800%. I actually didn't look at the CPU load at first but wondered why my machine ran hot. Is this behavior expected from classification? I assumed once trained classification would be computationally cheap. $\endgroup$ – Sascha Jun 29 '16 at 17:21
  • $\begingroup$ With UpdateInterval -> 2 does the CPU stay high or does it work and rest? What version are you using? $\endgroup$ – Edmund Jun 29 '16 at 22:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.