13

I recently upgraded my mid-2011 15” MacBook Pro to Mac OS X 10.9 Mavericks. Since then, my computer’s RAM usage spikes to the point of making my computer unusable. Specifically, anywhere between a minute and 2 hours after booting up, the process kernel_task will use between 4 and 5 GB of RAM (I have 8 GB installed) and mds and mds_store will use around 2 GB between them. At that point all of my apps become unresponsive.

If I don't restart my computer within about five minutes of this happening, Mac OS X will ask me to quit all of my apps. If I don’t do that the computer becomes totally unresponsive (even to restart requests) and I have to perform a hard shutdown. If I do, the same thing happens but it takes a couple minutes longer. I talked to an Apple representative and he said to flash my PRAM and reset the SMC, which I did, but nothing happened.

Aside from that he said to send my device in, which I can’t do at the moment. Any idea what's going on?

3
  • 1
    Usually with new-released software, they will find lots of issues like these when people start actually using it. I would suggest you revert to 10.8 and wait a bit before installing the most recent thing, let them work out the bugs, then jump on board. If you don't suffer any issues on 10.8 - you know it's the new OS. Not ideal, but a thing you could do to make it usable. Hopefully, you made a backup (timemachine or otherwise) of the old system?
    – nerdwaller
    Nov 4, 2013 at 12:57
  • I'll try that. I made a data backup but not a system backup. Is there a way to revert other than to wipe the drive, install 10.8, and put my data back? Nov 4, 2013 at 13:00
  • Not to my knowledge, Apple usually tries to keep people on the "latest". Usually, fresh installs are the way to go - just a pain in the butt.
    – nerdwaller
    Nov 4, 2013 at 13:01

7 Answers 7

9

So I found the same thing with my iMac: Mavericks seemed to be chewing through a lot more RAM than Lion or Mountain Lion.

I found a solution though that doesn't require a reboot: “Using the Purge Command in OS X Mavericks”

Simply run sudo purge (it’ll ask you for your password) and it purges the unused memory the OS is hanging onto.

I freed up over 5GB this way without any hitches although the system appears to hang for a moment or two while it’s doing this purge.

5
  • I found a similar solution, which is to force quit mds. This makes kernel_task let go of its memory too, for some reason. But it's good to have a more legitimate solution, thanks! Nov 19, 2013 at 16:00
  • 3
    Purge doesn’t necessarily do what you think it does. The man page on Mavericks says that it purges the disk cache. In general, purging caches will make things slower, not faster, because things will have to be regenerated and cached. Feb 17, 2014 at 21:51
  • best is to force quit (kill) mds here. mds is the metadata server or oversimplified: it's Spotlight. It might be, that the system has to rebuild the whole metadata database after the upgrade and for that it needs to go through every file on the computer. The more files the longer this process will take... so i'd go ahead and kill the processes and let it do it's work overnight.
    – Wolfie
    Feb 17, 2014 at 23:30
  • I have a brand new MBP (10.9.4) with 16GB and kernel_task is using over 8GB. Killing mds didn't help. Is there any other way short of a restart?
    – d0g
    Aug 4, 2014 at 21:47
  • This seemed to work but the memory was quickly consumed again. Jan 25, 2015 at 17:35
4

I experienced kernel_task ballooning up to 20GB of RAM and saturating (but not releasing) all available RAM, which essentially froze all of my running apps. Through trial and error I found that it was a runaway R process, as after I quit the R application, the kernel_task went back down to a reasonable 1GB (the R.app did not require more than 1GB of memory at that time).

So the specific fix for my scenario was to restart the R.app application. You might try quitting all running apps one-by-one to systematically figure out which one might be interacting with kernel_task and causing the issue.

1

I posted this question in the Apple support forums here and ran some diagnostics at their suggestion. Since running those, I've discovered a host of new problems with my system that were not present before installing Mavericks. Not the least among them, many of my Python packages no longer work (such as flask and pandas), and easy_install and pip are now broken. I was recommended to do a clean install (and consider downgrading in the process), which I will do as soon as is convenient.

0

I have an old but great iMac, from 2008 with a max capacity of 4 Gb RAM. Following the Mac recommendations, I made a reinstallation since "cero" of Mavericks, but the performance was still very bad, and the consumption of memory was terrible.

Additionally, under the promise of "making the Mac faster", I had installed Mac Keeper, that by the way was consuming a lot of memory for the antivirus plus the resources of the app turned on.

MY solution: Uninstall Mac Keeper. Immediately I recovered 1.5 Gg of RAM, and after a restart of the computer, it was saving 2.0 Gb of RAM.

Because of the model of my iMac, I still need to resolve the kernel_task excessive consumption. My belief is that I made a great mistake installing Mavericks.

0

For me the problem was Adobe Lightroom. I've 18gig of memory on my iMac and the Kernel_task was taking 5.33 gig. Once I quit Lightroom the memory used dropped to 1.33 gig.

I found the problem app with a:

sudo lsof | grep -i kernel

Now whose fault is this - Apple or Adobe's?

2
  • Mmmm, that didn't work the 2nd time (a week later) when this problem occurred. Lightroom wasn't listed from that grep and killing it did not releaset he kernal_task memory. The technique I tried next was looking at Activity Monitor and quitting those apps taking the most memory. Firefox was the culprit this tiem.
    – HankCa
    Feb 5, 2015 at 21:41
  • What I've noticed is that even when the kernal_task memory drops (from 5.3 to 1.3 gig in my cases) the 'memory pressure' hardly changes and my system still runs really sluglishly. And in which case a reboot seems to be the only way to fix it. Not good. I'm hoping OSX Yosemite fixes the issue.
    – HankCa
    Feb 5, 2015 at 21:43
0

What I did for my machine was to do a cron job to purge memory

I've switched to super user

sudo su
crontab -e

Then I've added the next line:

* * * * * purge

To run purge each minute. My memory usage went down from 16/16G to 9/16G on average.

1
  • 1
    Just remember that this also empties all caches. You’ll sacrifice a lot of speed, especially on systems without SSDs.
    – Daniel B
    Feb 9, 2015 at 9:48
0

I had the same problem. After months of memory pressure, I found the cure.

If your mail-account (hosted exchange or imap) contains a lot of duplicates - in my case thousands - spotlight indexing causes havoc. I assume, it is trying to compare all duplicates, so it can show them as one message.

If your iOS mail app shows different unread counts for the same mail folders from your OS X mail app, this is a certain indication for duplicates. Same, if you iOS shows emails, while OS X mail shows an empty folder.

Duplicates may result from incomplete move/copy/delete or from receiving multiple copies of the same mail.

I used https://github.com/quentinsf/IMAPdedup to go through all folders and delete duplicates automatically. This compares message-IDs or headers.

After that, neither of my macs has seen memory pressure again - ever.

I hope this helps everyone that suffers from memory pressure as I did.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .