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

kernel_task consumes a lot of RAM in early 2011 MBP, sometimes Finder too

Hi,

My old MBP3,1 (late 2007, 2.4 GHz Core 2 Duo) worked quite well with 4 GB of RAM, even after weeks without restarting. In fact, I used all available RAM only on some larger analyses using R, which loads the entire dataset in memory. To be able to run these few analyses faster on my new machine (early 2011 MBP), I bought the 8 GB RAM option.

In Activity Monitor, I noticed something strange. Whereas my old MBP shows kernel_taks as using between 100 and 200 MB of RAM, the new MBP uses about 550 MB just after the machine started up and often shows over 600 after a few hours or days of use. A one year old iMac, again Core 2 Duo with 4 GB of RAM, gives a kernel_task memory usage below 200 MB after weeks of use.

I've not been able to find what kernel_task does. Is this amount (around 600 MB, but it has gone up to 800) normal? Is it managiing the additional number of cores that requires this behind the scenes amount of RAM?

Anyway, I now quite often have more than 4 GB of RAM in use even when I have only a few applications running (not even including R!), which surprises me.

Also today, after moving a lot of files back and forth between an external drive and the new MBP, after emptying the garbage can that contained a hefty number of files and doing a first Time Machine backup, the Finder ended up using 2,4 GB of RAM according to Activity Monitor. I have never seen anything like this (although I admit not having Activity Monitor on all the time). Even after the backup was finished and the external drive disconnected (in fact the machine was left idling for a few hours) cpu usage was down to nearly zero, the Finder kept its 2.4 GB of RAM. I restarted and the new RAM usage for the Finder was 26 MB. I have a screen shot showing the 2.4 GB, but I could not find a way to attach it to this message. I can send it by email on request. I don't think this Finder behavior was normal.

Somewhat worried,

Denis

MacBook Pro 2.2 GHz i7, 8 GB RAM, Mac OS X (10.6.6)

Posted on Mar 16, 2011 12:04 AM

Reply
216 replies

Jun 7, 2012 9:43 AM in response to DChabot

Cyberpundit: Don't wax too nostalgic for Snow Leopard. That's what I'm running, and I'm having huge problems.


Hoping it was FileVault, I did the (extensive) work required to move all large files out of my homedir until turning off file vault would happen in less than 5 hours. Turned off FileVault. Problem still exists.


In the vain hopes that some techie at Apple who can actually do something about this is reading, your memory model is broken. You need to fix it.


I'm sure you don't know what the problem is, so you need to provide those (many) of us who have the problem some tool to diagnose the problem. I suggest something that will break out the RAM usage of kernel_task at the very least.


If we're running atMonitor, here's what we see in our RAM chart:

User uploaded file

Notice that giant red bar at the bottom? 50% of my RAM (2.1GB) is consumed by... what?


Activity monitor shows 400MB used by "kernel_task" - so what is that 400MB? Is it page buffers? Is it entropy seed data? What applications or processes requested that data be stored there? WindowServer gets another 160MB. For what? Which windows? Which applications?


Help us help you fix this really bad problem, Apple. Please?

Jun 11, 2012 4:12 PM in response to eww

eww wrote:


Because many (most?) users of Lion with 8, 12, or 16GB of RAM see no such outlandish RAM hogging by the kernel task as you have seen, it's clear that something is amiss on your MBP that isn't amiss on all of them, and probably isn't amiss on most of them.


I think that can be said for many problems. That does not mean it doesn't need a real fix.


No matter what you think, adding RAM is not a solution. It is a workaround. Those are two entirely different things. One fixes the problem, the other masks the symptom(s).


I have a Mac Pro with 16GB RAM. kernel_task is consuming about 500MB of RAM to Wired memory every day. I am a couple hours shy of 6 days uptime at the moment, and Wired memory is at ~3.5GB. It is the rate of memory consumption that is alarming. I used to be able to go a month without restarting, and not have Wired memory get even half that high, even as recently as with 10.7.3. Now, half my Mac's memory will be consumed by kernel_task after two weeks. I expect the rate of memory consumption will increase if I increase the amount of memory, so your workaround may not even work. Regardless, I am interested in a solution, not a workaround.

Jun 11, 2012 4:53 PM in response to mrhooks

So just a general wonderment out to everyone using this forum. I'll admit, I'm somewhat a Mac newbie (only a year now), but I'm surprised that this thread is three months old and there's not already some official Apple response.


Is this typical? I'm used to Linux/Windows/MySQL technical threads where by now there would be some strong encouragement by deep internals folks telling us at least they're working on it and even if no timeframe, at least a reason why it's complex and hard to fix.


Am I getting the wrong impression? Is this forum just a place for people having difficulties to go vent, with no real technical purpose? Is there some other place where I should go to try to help Apple solve this problem?


In technical terms, this is a problem with a solid repeatable reproduction path, so I'm really surprised we don't either have a fix or a known bug link or something. What more does Apple need? I'm starting to suspect that no Apple technical staff read these forums.

Jun 11, 2012 8:24 PM in response to timelessness

Some Apple engineering staff monitor these forums for threads indicating real problems that may require serious attention, but it is Apple's nearly invariant practice never to respond in the forums, and not to respond anywhere else either until after a fix is released. This may not be the best way to handle problems, and I'm not arguing in favor of it. But it is what Apple does.

Jun 11, 2012 8:49 PM in response to timelessness

@timelessness


On that note, I wish we at least had some decent way to debug the kernel or see what it is doing, with 100% visibility. There are no such utilities for doing this on OS X, as far as I know. Any utilities that report which kexts are loaded and how much RAM they are using report a total RAM allocation (for kexts) that is far less than what kernel_task is using in total.

Jun 30, 2012 5:40 AM in response to DChabot

Running Snow Leopard w/ 18GB RAM on Mac Pro 2008 & w/ 8GB RAM on MPB 2009


For work I have 2 to 3 VMs running with 2-3GB RAM each. It would be more RAM, but critical applications can't handle MAC OS X in 64bit mode. All my favourite apps go crazy with memory leakage, you name it. Safari, Chrome, Opera, Firefox, Aperture, iTunes etc..


It seems to me there has been a recent LION based update that has been pushed out which has exacerbated what was already very poor memory mgt. You just know when the UI hangs that either Spotlight has inexplicably tried to interrupt when you are obviously busy or that Free RAM is between 50-60MB.


I am now doing the bulk of my work on the Mac Pro as the MBP is forever displaying the wheel of doom.


'purge' has been my saving grace but takes quite a while to get through 18GB. With all the GBs of paging it really wasn't that surprising when the HDDs failed in both machines at the same time. Disabling Spotlight helped for a few hours but just changing directories in Finder would take 5mins so I was forced to re-enable it. 😟


Upgrading to 24GB RAM next week which is supposed to be even faster than the the full 32GB from a bus speed/bottleneck perspective but I have no expectations that this will fix what is a broken OS.


Full speed ahead now building an illumos (OpenIndiana) ZFS server (that uses the same RAM) for both stable NAS storage and VM usage.


Saving for a Lenevo Linux laptop



P.S. Kernel Task is at 1GB

P.P.S Why can't OSX put swap on a separate physical disk?


<Edited by Host>

Jun 30, 2012 8:52 PM in response to missingsnowman

MissingSnowman, yes, it's frustrating, true.


I actually DID purchase a Lenovo laptop onto which I installed Linux, funny you should say that. I got the W520, which given the sorts of things you're saying you'll do with a computer is probably the model you're looking for, too.


Now that I'm back in CA, I'm getting hardcore on this problem: popped in the original Snow Leopard DVD that came with the computer and let it go through the installation process. This didn't work, but then on the other hand, it didn't totally blow away my OS install (I still have much of my software and preferences intact, although now Homebrew is totally horked due to Xcode being missing). Still have the annoying low-RAM issue.


My next troubleshooting step will be to completely format the hard drive, install Snow Leopard, and then see if the problem is eliminated. If it is, reload my prefs etc using Time Machine. Hopefully the problem will still not reappear, but I suspect it will.

Jul 6, 2012 4:01 PM in response to timelessness

Latest news:


Re-installed OSX after re-partitioning and reformatting the HDD. Still have the problem. At least I was able to make room to install Linux on it.


Bought 8GB of RAM and dropped it in. Now my wired memory is 1.2GB and kernel_task has 620MB right after booting. This is AWESOME. I like having 1.2GB of my memory wasted on nothing. I also like spending $50 and an afternoon "upgrading" my RAM to make my computer less useless.


I paid $3k for this piece of crap because Mac fanboys convinced me I wouldn't have to waste so much time working around the shortcomings of the OS. What a crock.

Jul 30, 2012 9:56 PM in response to Warren Liu

What does it pretty much explain? It's a writeup on what Kernel Task is supposed to be.


But that article is absolutely utterly useless for what is being discussed here. We need to know WHY Kernel Task is taking over 3.5GB of RAM from a total of 8GB, with only Chrome, Coda (text editor) and Terminal open.


An OS as "advanced" as OSX needs to do much, much, much better than that.


If you have any article that "pretty much explains everything" about this problem, please post it in this thread. Thanks.

Jul 31, 2012 2:24 AM in response to Nearly-Normal

Nearly-Normal wrote:


What does it pretty much explain? It's a writeup on what Kernel Task is supposed to be.


But that article is absolutely utterly useless for what is being discussed here. We need to know WHY Kernel Task is taking over 3.5GB of RAM from a total of 8GB, with only Chrome, Coda (text editor) and Terminal open.


An OS as "advanced" as OSX needs to do much, much, much better than that.


If you have any article that "pretty much explains everything" about this problem, please post it in this thread. Thanks.

It seems that you may have missed the part where the writer stated kext will be executed by the kernel_task process and even if you kill -9 the process that is calling the kext, ie your WIFI or whatever, the kext is still running. I am assuming that different kext will have different timeout or shutdown times thus releasing the ram at different times, which in most cases is WAY TOO LONG, I'm sure we can agree on that.


I have also done a test on the writer's claims on this using the discrete/integrated graphics switching. kernel_task cough back about 8 megs of ram in about 15 secs after I switched and then ate another 8-9 megs when I switched back.


I think the reply I was giving the guy had mysql and what not running as well and iirc for the linux kernel there were kext for mysql that one could compile into the kernel thus making the kernel eat more ram. I would not be surprised that it could be a misconfigured compile of a kext that he is using that is causing the issue or some other background processes. Also the guy said he had skype running with means the iSight kext is up as well, plus mic plus blah blah blah...


i.e. on my system, with just Finder running, I still have Little Snitch, Sophos, Xmarks, TotalFinder running in the background which increases the immediate ram requirements of kernel_task upon bootup (why I have not bothered to figure out as it is really a waste of time to me). Even if I kill Little Snitch monitoring, the filtering process is still running in the background. So for someone to claim that only 3 applications are running, are you sure it is really only 3 applications?


The biggest problem with OSX, in terms of mem management, is how long it caches stuff in inactive memory. For example, after a long session of SC2 or Vuze for that matter (yes I've moved to uT already), even after I quit SC2 or Vuze, my inactive mem will almost always stay at 3-4 gigs with no other applications running.


My only suggestion is to use applications like freememory (appstore), ifreemem (google it), or use the cmdline (no clue on that since I found the app way back during Leopard era). This immediately frees up all inactive mem and (don't hold me to this) some active mem at least that's how it looks like on my system.


What I don't get in a similar vein is how Finder and WindowServer can eat up to 1gig of active mem.


Yes OSX should do a better job on this but in all things especially in development of which since you use Coda I'm assuming you are in the industry, that compromises are always made and in this case for the majority of OSX's userbase, they don't even notice the issue.


My best guess is OSX developers wanted to stuff as much stuff into ram for as long as possible so that things feel fast when its running and their user habits focus groups probably gave feedback that most of their users probably close the Window of a program instead of cmd-Q and assumed that its "CLOSED" (Windows paradigm right?) and that they probably use the same 3-4 programs all the time thus it made sense to keep things active in kernel_task or cache in inactive mem for longer than it is acceptable to the IT industry userbase.

Jul 31, 2012 6:45 AM in response to Warren Liu

Here's the thing. On Mountain Lion with 16 gigs of RAM, Kernel_task takes up anywhere from 750 megs to 1.5 gigs of RAM. Considering the fact that this is larger than many full-blown OSs, I really doubt the fact that this ram is all being used to just store needed kexts.


If I can run Ubuntu in less RAM than the kernel on OS X uses, we have a problem.

Jul 31, 2012 10:04 AM in response to wyager

I'm with wyager - I can't see how that article really helps anything. It sort of explains things for a normal running system, but not for a system having the problems we on this thread are having.


I'm no longer on the case of figuring this out. I installed Ubuntu 12.04 and am back to an OS that works. On Ubuntu, I'm running about 15 Chrome tabs, 9 GNOME3 terminals, 9 GNOME2 (MATE) terminals (don't ask), Pidgin, Skype, KeePassX, two Libre Office documents, process viewer, MySQL 5.5.24.


RAM used? 1.8GB.


If I boot back into Snow Leopard, which I never do anymore, then I'm lucky if I can just run some terminals and a few Chrome windows before I'm at 4GB. Forget OpenOffice documents or photo editing software.


I'm a little ****** at Apple, though, because:


  • a 17" Macbook Pro is overkill for running Linux,
  • I paid for Logic Pro, which doesn't run too well under Ubuntu,
  • I've wasted HOURs trying to find an alternative to GotoMeeting,
  • and to get various VPN softwares working on Linux (my job requires me to use every VPN software that exists, and none of them are easy under Linux),
  • I take pictures with a Canon EOS 7D, and I can't even edit two pictures in Snow Leopard (I find I can edit up to about 15 in Ubuntu before RAM becomes an issue).


I guess this is becoming long and rambly, so I'll stop talking. Suffice it to say, I'm limping by with Ubuntu, which makes this very pretty paperweight useful again.


By the way, if any of you are running Linux on your MBP, here's a useful set of trackpad settings that make it act a lot like it is in OS/X:


#!/bin/bash


# acceleration and the stuff

synclient MinSpeed=1

synclient MaxSpeed=2.50

synclient AccelFactor=0.0200000


# edge motion! - seems to do nothing?

synclient EdgeMotionMinZ=90

synclient EdgeMotionMaxZ=360

synclient EdgeMotionMinSpeed=0

synclient EdgeMotionMaxSpeed=0


# corners aren't needed as mouse presses

# they just **** with me anyway

synclient RTCornerButton=0

synclient RBCornerButton=0

synclient LTCornerButton=0

synclient LBCornerButton=0


# must press a little more than default 30 to use

synclient FingerHigh=50


# keep palm from doing crazy ****

synclient PalmDetect=1

## # these are defaults

synclient PalmMinWidth=8

synclient PalmMinZ=180


# like the Apple I got used to

synclient LockedDrags=1

synclient LockedDragTimeout=1500


# tap buttons

synclient TapButton1=1 #left

synclient TapButton2=3 #right

synclient TapButton3=2 #middle

synclient ClickFinger1=1 #left

synclient ClickFinger2=3 #right

synclient ClickFinger3=2 #middle


# coasting rules

synclient CoastingSpeed=25

synclient CoastingFriction=45

Jul 31, 2012 11:15 AM in response to timelessness

I am still not sure whether this is a problem or not. Apparently it seems when I have 16GB of RAM, 512MB is allocated to Intel HD3000 graphic card, and I think it is included in kernel_task.


Right now my kernel_task is taking 1.15GB. That is still over 500MB of RAM taken into Kernel for unknown reason. Mountain Lion didn't make the situation any better. I remember the days when kernel_task only takes about 100MB.

kernel_task consumes a lot of RAM in early 2011 MBP, sometimes Finder too

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