OS X, kernel_task is chewing up 1.1 GB of memory. Cause for alarm?

Posted on 2014-10-23
Last Modified: 2014-12-03
My MacBook Air is showing 1.1 GB of utilized memory (image 1) for kernel_task. I think this cause for alarm.

image 1
I've chosen to include the Parallels VM process (prl_vm_app) in the image as well, simply because its memory utilization is large (large but reasonable) and it may be associated with the underlying kernel_task issue. (It's worth noting that if I shutdown my Parallels VM process and reboot my Mac, that kernel_task comes back at about 0.64 GB, but doesn't jump to 1.1 GB until I boot up my Parallels VM.)

I'm inclined to think, that I do have an issue. Take a look at the summary data for the my Mac's memory (image 2). This is with Parallels VM running.

image 2
Question by:jdana
  • 2
  • 2
LVL 84

Expert Comment

ID: 40400356
Memory pressure does not seem excessive.   Why do you think it is cause for alarm?
LVL 28

Accepted Solution

serialband earned 400 total points
ID: 40402572
Well, it looks like you're using 1.05 GB more than your physical RAM.  Going into Disk Swap and on a Mac that slows you down tremendously.  The fact that your memory used is 7.99 means you're still ok, but you're nearing the limit.  Their memory management woks differently than Windows or Linux.  You really should reduce your RAM usage to match your Physical RAM if you want to keep your system working fast.  That's normal for the kernel task as you start up programs.  It has to load modules that the programs need.  Your kernel task is not really that large.

You should either reduce the RAM allocated for your Parallels VM or clear the cache on your browser more frequently.  The browser is usually the biggest memory hog these days.  You can also set a maximum cache to be lower or use fewer tabs.  Remember to quit unused programs, not just close them by clicking the Red X button.

If you want to run Parallels, you really need to have 16 GB RAM.   I would love to have 32 (not available on these overprice Macbooks) with all the stuff I run, since I occasionally hit above 20 if I start Parallels with 2.5 GB RAM.  My Kernel task is currently 1.67 GB, because I run many programs and have many terminals open.  Terminal uses a lot of RAM compared to putty, so sometimes I run "wine putty" instead or run wine with other Windows apps and that reduced my need to start Parallels.  Many Windows programs are still 32 bit so they use much less RAM.  I found Windows programs, even the 64 bit can run better and with less RAM because memory management works differently.  I used to run twice as many Remote Desktop and putty sessions with 4 GB RAM than I can ever run on a Mac, even with my current 16 GB, without it slowing down the system appreciably.

Here's a trick to free up RAM in OSX:

Open and run the following.

sudo purge

This will free up unused RAM that all your programs, mostly browsers, haven't gotten around to clearing up yet.  I wish the browsers would clean up their memory usage a bit better.  They're so bloated now.
LVL 84

Assisted Solution

ozo earned 100 total points
ID: 40402645
You have Swap Used:  0 bytes, so I don't think you are going into Disk Swap, and your Compressed:  420.6 is probably fitting all your Virtual Memory into Physical Memory.
I don't see much point in reducing your File Cache.  If you need a file from the cache, it's faster to read it from memory than going to disk, if you never use it, and the OS decides it has a better use for that memory, it should adjust things appropriately.
But Your MEMORY PRESSURE graph shows green, so the OS doesn't seem to be having difficulty managing.
I agree that browsers and other software should be less bloated, but if they just sit in Disk Swap doing nothing, they aren't slowing anything down, and if they need to be swapped in, then the OS should be using its Physical Memory for it to reduce swapping.
LVL 28

Expert Comment

ID: 40402743
The Virtual Memory being at 9.05 meant that he went over at some point.  For the most part, it's ok, but that means that he left something running and it did have to go to swap at some point.  I agree that it's ok right now, but his Memory Used is sitting at 7.99, meaning that anything could push it over.  It does slow down once that Memory Used number goes above 8 on OSX if he switches between programs a lot.  If he mostly uses one program, then he should quit the unused programs, especially browsers.  Browsers continue to suck up RAM because of all the Javascript and plugins that continue to run, even in the background.  If you're not using the browser, it's best to quit it.

It's been my experience that OSX needs reboots more frequently if you run a lot of software, especially if you exceed Physical RAM.  Mavericks did get a little better, but I still had to reboot at least twice a month when software .  I haven't had enough time with Yosemite to see if they've reduced the need for a reboot, just for running software.  These days,Windows only needs a reboot on patch Tuesday only if the patch requires it.  I've rarely, if ever had to reboot Windows more than that once a month and sometimes I would run it for 2 or even 3 months when they have patches that don't require reboots.  I've had to reboot my Mac every week before I started running the purge command and restarting my programs.  Now I reboot about every other week.  I think most people don't really use push their OS like I do.

Author Closing Comment

ID: 40479688

Wow. Thanks for the thorough response. Knowing whether you're machine is pushing against the "RAM ceiling," is tricky, especially with Windows and OS X handling RAM differently.

Thanks for "sudo purge". Very cool.


Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Create a default user profile for Mac OS X 10.7/10.8 Create a user account on OS X that will be a template for every other user of that computer. I usually call it “profile” and make it an administrator account for the time being. 1. Install a…
How can this article save you time AND money?  In just a few minutes you may discover something you didn't know existed that is easy enough for you to fix yourself!
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now