4 ms·
high CPU usage by kernel_task is caused by high Thunderbolt Left Proximity temperature, which is caused by charging and having normal peripherals plugged in at
by causi 5y ago
high CPU usage by kernel_task is caused by high Thunderbolt Left Proximity temperature, which is caused by charging and having normal peripherals plugged in at the same time.
Did anyone ever figure out why exactly the temperature sensor was making kernel_task go crazy?
- mkl 5y agoThe comment by jksoegaard may explain it: "the purpose of the thread is to force idleness". I guess it uses up all the CPU without actually making the CPU do anything, so other processes can't use the CPU and produce more heat than it can handle.
- causi 5y agoThat's very interesting. I didn't know it was possible for a process to use the CPU without using the CPU, as it were. Rather I thought the CPU usage was more or less a direct measurement.
- vnorilo 5y agoFrom [1] On processors that have a halt instruction that stops the CPU until an interrupt occurs, such as x86's HLT instruction, it may save significant amounts of power and heat if the idle task consists of a loop which repeatedly executes HLT instructions. -- I don't know how it is implemented in darwin, HLT is a privileged instruction, then again it's kernel_task. 1: https://en.m.wikipedia.org/wiki/Idle_(CPU) https://en.m.wikipedia.org/wiki/Idle_(CPU)
- remram 5y agoI would expect that the CPU frequency would throttle down, rather than regularly running halt instructions.
- shrx 5y agoDocumented here: https://support.apple.com/en-us/HT207359 https://support.apple.com/en-us/HT207359
- wongarsu 5y ago> 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 If it's about CPU temperature, why does Apple schedule a task instead of just downclocking the CPU, like everyone else? This question predates the release of M1 Macbooks, and everyone else does thermal management of Intel Core processors via clock speed, not artificial idle load.
- p_l 5y agoThe high cpu usage is essentially the evidence for running certain power-saving measures that "look" like the task is using a lot of CPU time (it does, sleeping the cpu). There's similar behaviour on linux but it shows as specific kernel threads related to intel power throttling, so it's more obvious what's happening.
- majou 5y agoIt would reduce latency of tasks to do it this way.
- spuz 5y agoThey almost certainly do adjust CPU frequency as well (although I don't have a 2020 Mac to check this). Lowering the frequency would mean fewer instructions can be processed per second which means you are more likely to see a higher CPU usage for all tasks. What you see is probably the combination of both of these effects. It's annoying that the process monitor does not provide any way to distinguish high CPU load due to demand and high CPU load due to a low clock frequency but there is software that can display a CPU frequency chart which can give some insight: https://pietschsoft.com/post/2020/02/15/macos-monitor-cpu-usage-info https://pietschsoft.com/post/2020/02/15/macos-monitor-cpu-us...
- netr0ute 5y ago> does not provide any way to distinguish high CPU load due to demand and high CPU load due to a low clock frequency If you're on Linux, then the "tiptop" utility does just this.
- neogodless 5y agoWow! This brings back memories. I don't remember which generation of CPUs this was.. maybe Pentium III or AthlonXP. But there was an issue in Windows where the chip would overheat when idle. There was an app called Rain that you could download and it would just keep the idle process from running away and causing heat. I may need to research this on my lunch break and report back. EDIT: Here's a related thread: https://arstechnica.com/civis/viewtopic.php?f=8&t=1060257 https://arstechnica.com/civis/viewtopic.php?f=8&t=1060257
- vikingerik 5y agoThat wasn't exactly an issue, more like a feature that didn't exist yet. The Pentium IIIs were the first CPUs that could consume enough power to cause heat problems if not throttled. OSes didn't yet anticipate that; they didn't yet have the concept of issuing halt instructions when there was no application work to do, they just let the CPU spin faster on a waiting-for-message loop. The OS makers soon recognized the need, and halting the CPU became built in to the OS by the time of either Windows 98 or 2000, so yeah, in the interim, tools like Rain were what you used.