MacOS – Acceptable CPU usage for 4 core 3.4gHz i7

activity-monitorcpumacosperformance

Creating a kiosk application for the Mac and am testing performance and CPU usage.
The activity monitor shows a total of roughly 90 to 150% CPU usage for the always up, kiosk processes.

My first confusion is how CPU usage can be over 100% but I understand it is related to the number of cores.

So my question is, is 150% total CPU usage acceptable for a kiosk based mac with constantly running 24-7 applications? Or is that too high?

addendum> the application is processing video constantly, the only 'interaction' is the video feed coming from a webcam.

Best Answer

Zero is Ideal

Ideally, your kiosk application should use 0% CPU when not actively being used. It is unlikely you will achieve this without considerable effort but even a target of 5 – 10% use is good.

At 150% constant CPU use, the application would likely be considered faulty by Apple's Mac App Store reviewers – and by many customers.

Hints: Offload to the Right Framework

If your kiosk application is animating or showing moving content such as adverts or movies, do as much as you can with AVFoundation/QuickTime. This will typically offload the processing to the GPU and allow the CPU to idle.

For other animations be sure to adopt CoreGraphics and CoreAnimation. They will dramatically improve your application's energy impact.

Energy Efficiency Guide for Mac Apps

Study Apple's Energy Efficiency Guide for Mac Apps. The introduction sets out Apple's intentions:

Your Obligation as a Developer

Even small inefficiencies in apps add up across the system, significantly affecting battery life, performance, responsiveness, and temperature. As an app developer, you have an obligation to make sure your app runs as efficiently as possible. Use recommended APIs so the system can make smart decisions about how best to manage your app and the resources it uses. Whenever possible, avoid unnecessary updates to the user interface and I/O. Power-intensive operations should be under the user’s control. If a user initiates a large iMovie render, Automator batch job, Compressor conversion, or Xcode compile, for example, the user should not be surprised if the activity consumes power. Strive to make your app absolutely idle when it is not responding to user input.

Use the developer tools to profile your application's energy impact and ask away on Stack Overflow for ways to reduce CPU load. Good luck!