Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

kernel_task consuming 150% CPU; system unusable

I am having an issue where the kernel is consuming an inordinate amount of CPU time. I am not sure whether the number given by activity monitor is a percentage, but it's ~150.

I have run dtrace on the kernel and it seems that it's spending a lot of time in the log_level function:

twiggy:Documents remenda$ sudo ./hotkernel.pl
Password:
Sampling... Hit Ctrl-C to end.

FUNCTION COUNT PCNT
<snip>
mach kernel`ml_set_interruptsenabled 2049 5.3%
mach kernel`machineidle 9827 25.4%
mach kernel`loglevel 22406 57.8%

My CPU temperature is 66 degrees C. Both cores are active, so I believe this problem to be distinct from the temperature-related core shutdowns in other threads.

Macbook Air, Mac OS X (10.5.4)

Posted on Sep 6, 2008 8:19 AM

Reply
74 replies

Jun 18, 2009 1:46 AM in response to Joseph Kiniry

I have to say having used coolbook this is not really the solution maybe for some, but coolbook just keeps the processor temperatures down, unfortunately the processor temp is not really entirely the cause for the heat issue, there are other sensors. I had situations with the processor at 85 degrees c which is perfectly fine according to the processor specs, and no kernel task but then processor temperatures at 60 degrees c and the kernel task went haywire. My guess is the graphics card and the power supply sensors also have something to say about when the entire thing triggers!
Coolbook might help somewhat but in my experience it does not resolve the problem, only a better cooling one way or the other really helps!

Jun 18, 2009 2:55 AM in response to ibosie

I had such a situation a few hours ago (admittably while I was stress testing for the repair next week) as usual external cooling especially around the power plug area resolved the situation within a few minutes.

Also I found out, removing the spindump daemon helps somewhat, spindump seems to be tiggered a lot especially if you run safari and adds additional stress to the machine.
Not sure what spindump really does except collecting usage data, but given the current situation, I really dont care anymore!

Jun 18, 2009 9:20 AM in response to ibosie

Well the situation has improved on my machine with spindump off. The way I see it. Spindump seems to start if something takes longer than expected or blocks task switching on a core.
Which means it probably starts when the processor is slowed down and slows everything down even more, a classical deadlock situation.

I have been working all day on an uncooled machine with videos partially in the background and a 1920x1200 pixel monitor attached as well as a USB keyboard and I did not run into the kernel task problem unless I hit the machine really hard to stress it out. Since my ambient temperature in the room was around 22 degrees I assume the situation will get worse once it is higher again, but for now knock on wood. I will do additional testing the next days regarding various temperature conditions.

And yes I agree spindump is a symptom not the cause, the cause still is thermally related!

Jul 3, 2009 3:08 AM in response to Rob1977

Yes, unfortunately I have not had time to give the machine to the repair center, but following, turning off spindump helped a lot the kernel task problem is mostly gone (the ambient temperatures in the mid 20c helped also). Also make sure that the machine if you push it is loaded fully, there seems to be a sensor at the battery loading, if you load the area gehts really hot and you reach the point of no return faster.

My plan for now is to give the machine around the 20th of july to the repair center, which is a time I can afford not to have it for a few weeks, once I get it back I will post about the results!
But for now with turning off spindump and keeping the machine a little bit higher (by putting a small elevating usb hub underneath it) helps that I can work with it as expected!

My personal guess is if you use one of those notebook cooling stands, this might help as well to get rid of the excessive heat which the machine has problems with!

Jul 5, 2009 11:35 AM in response to werpu

it seems to be temperature issue, i.e. the system tries with the kernel task to avoid an overheating of the cpu/gpu. those guys here

- http://plasmadesign.wordpress.com/2008/04/02/macbook-air-core-shutdown/ (how-to)
- http://plasmadesign.wordpress.com/2008/08/23/apple-fix-macbook-air-core-shutdown -issue/ (update)

recommend a cpu undervolting to reduce this heating. they use CoolBook

- http://www.coolbook.se/CoolBook.html

you can get it for $10. i just installed it and hope that it helps...

on your own risk...

Jul 24, 2009 10:34 AM in response to cognita

It seems that kernel_task is indeed working to occupy the cpu/gpu to prevent overheating. In my case any sustained relatively high cpu load (e.g., watching ten minutes of Flash video) will set off kernel_task. Apparently Apple has confirmed that kernel_task in this situation is kicking in to effectively underclock the cpu--i.e. it's serving the same function as the core shutdown behavior of the first version of the MBA. So says this blog, anyway:
http://gogotechnology.blogspot.com/2009/07/macbook-air-and-kerneltask-apple-spea ks.html

I have gotten desperate (well, really just annoyed) enough to install CoolBook, despite my wariness to mess with such a basic system-level function. Once you pay $10 and register it to enable the undervolting function, kernel_task no longer kicks in--it seems to take over cpu speed/voltage/temperature management.

As I have no experience messing around with undervolting or overclocking my cpu, at first I just set the voltages and clock speed steps to their system defaults. Kernel_task no longer kicked in and I was able to watch high-res video for the first time in a long time, but without kernel_task getting in the way the cpu was running at unprecedented temperatures, over 90 degrees (according to iStat--CoolBook was reporting temperatures 10 degrees cooler for some reason). Next, I set a lower maximum temperature in CoolBook, which drops the cpu to lower clock speeds to keep the temperature down, while still keeping the voltage levels at the Apple system defaults. Amazingly, just doing this kept the temperatures at a normal level and kept my system running smoothly watching the same video that it was choking on before--as I understand it, CoolBook is effectively doing the same thing as kernel_task, but doing a better job. I have since changed the voltage settings to moderately undervolt the cpu (1.025V at 1862Mhz and .9625V at 1596Mhz), while keeping the same low maximum temperature limit (70 degrees in CoolBook, which translates into ~80 degrees in iStat), and the cpu can now run at full speed for a sustained period without having to drop to a lower clock speed.

The CoolBook interface is not intuitive for someone who doesn't know what they're doing, but I figured it out with the documentation included. The instructions tell you how to get the most (i.e., least power consumption, best battery life) out of your undervolting by lowering the voltage settings until your system is unstable and then backing off to the lowest stable setting. I was more cautious and just went a moderate setting, reducing the voltage half as much as others are reporting doing. Seems to have solved my problems, so I'm satisfied.

Sep 8, 2009 11:04 PM in response to werpu

As i was sitting on my bed, wondering why I could not nav a website on my new macbook air. I check the activity monitor and found that the kernel was 150+ I then found this tread. Ironically i was icing my back after a long workout...so I took the 2 ice packs from behind my back and put them under my mac (under a towel) not as I type my back hurts but my mac has cooled down and i can use it.

What a mess...i am in my room and it is NOT hot. Did i buy I computer that i need to ice to use?????

So this is logically a heat issue. What can we do about it???

Adam

kernel_task consuming 150% CPU; system unusable

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.