kernel_task using *way* too much memory

I have a 2008 Mac Mini with 4 GB of RAM. Recently (post installation of Lion), it started to behave extremely sluggishly, so I used Activity Monitor to see what was using up the system resources. Turns out that kernel_task is using 2.95 GB of RAM. Not a typo: it's using ~3 GB of RAM.

I use this Mac Mini as a home media server, connected to a TV and a Drobo. In other words, beyond running iTunes, I don't really use it for much. I don't have a ton of applications running, nor do I have any accessories other than the Drobo and the TV connected to it.

What on earth could kernel_task possibly need 3 GB of RAM for, and how can I tell it to stop eating all my RAM and dragging my system to a screeching halt?


Solution 1:

In the past, I've experienced odd memory consumption issues after upgrading OS X, due to older kernel extensions that were still being loaded. Some of the extensions were for applications that I was no longer using and had forgotten about. You might try listing out all the non apple kernel extensions, then try unloading them one by one to see if you experience any improvement in memory consumption.

To list what is loaded, type the following from a terminal shell:

kextstat | grep -v com.apple

So, each of the kernel extensions, will have a corresponding kext file, located in the default /System/Library/Extensions/.

Then, to unload a kernel extension, type the following:

sudo kextunload /System/Library/Extensions/<NAME_OF_KEXT_File.kext>

If you identify any extensions that are wonky, you then have a starting place to see if perhaps there is an updated version of the application that is more Lion friendly.