Apple - Why is kernel_task using so much CPU?
You have classic symptoms that thermal issues are causing kernel task to preemptively use up CPU to prevent overheating. If you haven't reset the SMC, try that one time. If the System Management Controller is actually stuck, the response to changing thermal measurements might lag or leave blowers on higher than they should be.
- kernel_task hundreds of % CPU yet cpu frequency is being lowered
- CPU usage is too high with Yosemite and an external monitor
- kernel_task consumes 500% CPU on AC power, sometimes
- MBP early '11 kernel_task over 300% when unplugged
- MacBookAir kernel_task at 300% and rising
The answers above all point to things you can do to measure swap, processes, etc... but focus on thermal sensors (hardware issue) or external temperature (environment) which you can cool artificially to remove the slow down that's designed to manage heat.
If you can't measure the case temperature accurately with an infrared thermometer, try software like https://bjango.com/mac/istatmenus/ to check on the individual temp sensors and correlate them with the "spikes in CPU usage" by kernel_task. Also, resetting the SMC one time might be worth your while. If it's stuck, the response to changing thermal measurements might lag or leave blowers on higher than they should be.
Take a look at your fans ! For my Macbook Pro ( 2015 ) it wasn't a software problem. The Mac was completely unusable. I opened the Macbook dusted the fans with a toothbrush. I also cleaned the heatsink. After removing the heatsink, I found that the thermal paste was dry. I cleaned the old thermal paste and put some new paste, with care. Result: no more problems with kernel_task. The fans went from a steady speed of 6000 RPM to 2000 RPM (total silence).
High temperature in a part of the chassis from charging together with peripherals plugged in can cause this issue, at least on a 2017 MBP. Simply moving the charging cable from the left to the right ports can be enough to cool the hotspot and resolve the problem. On a machine with MagSafe charging try unplugging peripherals from the left ports until the battery is full.
CPU usage has nothing to do with this, as a hot CPU is throttled by reducing its clockspeed not by scheduling no-op load.
See https://apple.stackexchange.com/a/363933/27135 for proof.