I’ve written a basic raytracer and use Grand Central Dispatch to calculate the pixels in parallel, using 4 separate rendering blocks.
This all works fine on my 2014 MacBook Pro under Yosemite 10.10.1. Now, I started the same application the first time on a new iMac to check for speed improvements. (The CPUs on both systems have 4 cores.) Suddenly, I see messages „thread caught burning CPU“ in the Console log:
28.11.14 03:19:45,000 kernel[0]: process edXCG_hw3-Cocoa[510] thread 50878 caught burning CPU! It used more than 50% CPU (Actual recent usage: 97%) over 180 seconds. thread lifetime cpu usage 90.016272 seconds, (89.714813 user, 0.301459 system) ledger info: balance: 90003522038 credit: 90003522038 debit: 0 limit: 90000000000 (50%) period: 180000000000 time since last refill (ns): 91932078384
28.11.14 03:19:45,832 spindump[486]: Saved cpu_resource.diag report for edXCG_hw3-Cocoa version 1.0 (1) to /Library/Logs/DiagnosticReports/edXCG_hw3-Cocoa_2014-11-28-031945_Chriss-iMac.cpu_resource.diag
(I quit the application at that point.)
Now I'm wondering...
Heavy thermal cycling can shorten the life of a machine, independent of whether the internal core can handle the heat.
So, I'm guessing you're interested in "best performance" within thermal parameters which are appropriate for the machine design.
Try breaking the problem into smaller chunks and use lower Grand Central Dispatch "Quality of Service" settings like either QOS_CLASS_UTILITY or QOS_CLASS_BACKGROUND.
Smaller dispatch chunks and lower "Quality of Service" settings will allow the operating system to manage the interrelated energy/thermal/cpu load by appropraitely throttling the queue dispatch rate of needed.
WWDC2015 Session 718 "Building Responsive and Efficient Apps with GCD" briefly discusses the above approach relative to the first fanless Mac.
Imagine you have an app … driving the machine hard, using a lot of energy and we need to help control that amount of energy in order to keep the machine at a reasonable temperature.
Well, what we can do is we can start to squeeze the amount of work we are going to do at the less important Quality of Service classes.