What kernel_task Is Doing When It's Using Your CPU
Jake MarshWhen a Mac gets sluggish and Activity Monitor shows kernel_task near the top of the CPU list, it looks like kernel_task is the problem. Apple says it’s the other way around. From If kernel_task is using a large percentage of your Mac CPU:
One of the functions of kernel_task is to help manage CPU temperature by making the CPU less available to processes that are using it intensely. In other words, kernel_task responds to conditions that cause your CPU to become too hot, even if your Mac doesn’t feel hot to you. It does not itself cause those conditions.
So the number is a symptom. Something else is making the heat, and the kernel is taking CPU time away from it until things cool off. Howard Oakley put it well: “kernel_task isn’t causing the thermal problem, it’s part of your Mac’s response to it.”
kernel_task is the kernel’s own entry in the process list, PID 0, running as root. top shows it. ps doesn’t, since its listing starts at PID 1. And temperature is only one of the kernel’s jobs, so some kernel_task CPU on a busy Mac proves nothing. Check the thermal state before blaming heat.
Checking The Thermal State#
On Apple silicon, the answer I trust is the one apps get from ProcessInfo.thermalState. Two lines of Swift print it:
import Foundation
print(ProcessInfo.processInfo.thermalState.rawValue) // 0 nominal, 1 fair, 2 serious, 3 criticalRun it with swift thermal.swift. My M1 Max printed 1 (fair) while a pile of agent sessions kept it busy, even though pmset -g therm said “No thermal warning level has been recorded.” Apple’s ThermalState docs describe fair as slightly elevated, with fans running and background services that aren’t needed right away stopped. At serious, the system reduces performance and the fans are at maximum. A high kernel_task with serious or critical is the throttling Apple describes. With nominal, look somewhere other than heat.
I don’t run that script much anymore. Multimeter keeps a thermal pressure meter in my menu bar next to a CPU meter, so I can see the moment the Mac starts heating up and check whether kernel_task is reacting to it.
Where The Heat Comes From#
- Heavy work. Apple’s fan article names compressing HD video, graphics-heavy games and Spotlight indexing after a migration. Indexing after an update “can take hours or even days” (About Spotlight indexing).
- The room and the surface. Apple wants a Mac laptop used between 50° and 95° F, on a hard surface with the vents clear (operating temperatures).
- The left-side ports on some Intel MacBook Pros. Oakley traced a run of complaints to “a thermal sensor placed by the left USB-C ports in many MacBook Pro models.” Charging on the left alone made those Macs overheat, and moving the charger to a right-side port fixed it.
What To Do#
Sort Activity Monitor’s CPU tab by % CPU and find what’s busy besides kernel_task. That’s the process Apple says to quit, and when the CPU cools, kernel_task backs off on its own. If it’s Spotlight after an update, leave the Mac plugged in and let it finish. If the Mac stays warm with nothing obvious running, I wrote up how I hunt for the cause in Finding Out Why Your Mac Is Hot While It’s Idle.