Solved

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

Posted on 2014-10-23
5
3,910 Views
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
0
Comment
Question by:jdana
  • 2
  • 2
5 Comments
 
LVL 84

Expert Comment

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

Accepted Solution

by:
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 Terminal.app 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.
0
 
LVL 84

Assisted Solution

by:ozo
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.
0
 
LVL 27

Expert Comment

by:serialband
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.
0
 

Author Closing Comment

by:jdana
ID: 40479688
serialband,

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.

J
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Thanks to luck and dedication (hitting refresh every 5 seconds when the pre-orders were going live at midnight on April 10th) I managed to actually receive an Apple Watch on release day, April 24th. Which means I’ve been using it daily for just ov…
Does your iMac really need a hardware upgrade? Will upgrading RAM speed-up your computer? If yes, then how can you proceed? Upgrading RAM in your iMac is not as simple as it may seem. This article will help you in getting and installing right RA…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

757 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

19 Experts available now in Live!

Get 1:1 Help Now