In Activity Monitor, why is app memory use higher than the sum of memory used by individual apps

In an effort to try to figure out why my new macbook pro running mavericks is so painfully slow, I've been investigating memory usage. (top shows the cpu is almost always > 80% idle, even while I watch the spinning pizza for minutes. I think the delay is memory management.) Anyway, using Activity Monitor has raised several questions. Why is "App Memory" use higher than the sum of memory used by individual apps, and Memory Used is much larger still? If the difference between "Memory Used" and "App Memory" is memory used by the OS, then what are "kernel_task" and "mdworker" if not OS functions? Any insight that would help me understand why my macbook behaves like a brick would be very welcome.

MacBook Pro, OS X Mavericks (10.9.5)

Posted on Mar 12, 2015 5:15 AM

Reply
10 replies

Mar 12, 2015 6:33 AM in response to missing_jobs

It is unlikely Mac OS X memory management.

It is more likely you have too little memory for the tasks you are asking Mac OS X to run, or you have 3rd party additions that are interfering with normal Mac OS X operations (anti-malware, Mac cleaners, memory cleaners are all well known additions that have been shown to cause Mac OS X performance issues).


Please post the EtreCheck output, as that may help identify issues affecting your Mac.

<https://discussions.apple.com/docs/DOC-6174>


kernel_task "IS" Mac OS X. And its size if proportional to the amount of RAM in your system. We speculate that the size is based on virtual memory page tables used to manage the RAM in your system, which is why kernel_task uses more memory when you have more RAM in your system.


But every 3rd party kernel extension is included in kernel_task reporting, so if you have a 3rd party kernel extension that is not playing nice, kernel_task can get overly large. 3rd party kernel extension can provide some useful services, but there is always a risk they will over consume memory or cause a kernel panic crashing your system.


Memory used includes file system cache. The file system cache avoids expensive disk I/O, where expensive is power consumed draining laptop batteries, and expensive in time, as disk I/O is much slower than having the data already in memory. Unused RAM is a waste of money. Mac OS X does a very good job of giving your good value for your money spent on RAM.


mdworker is Spotlight indexing new content stored on your disk (or your Time Machine backup), unless your disk has just been added, and Spotlight is create the first index going through the entire disk.

Mar 12, 2015 7:34 AM in response to BobHarris

Dear Bob,


Thank you for the thoughtfulness of your reply and the time you took to write it. I've gone through the list of .kext files in /Systems/Libraries/Extensions, and nothing seems out of place; same with active (running) "extensions". Regarding cache'ing: I get the idea, when it works. I wondered, though, if the slow response I see when starting/switching between applications or processes is because needed files can't be loaded into memory until the cache is cleared by saving updated files to disk. That is, if the memory weren't filled by cached files, it might be available for processes. Perhaps I can monitor that by looking at the swap?


Here is the EtreCheck output (perhaps not as helpful as might be, as just after reboot):


EtreCheck version: 2.1.8 (121)

Report generated March 12, 2015 at 10:19:46 AM EDT

Download EtreCheck from http://etresoft.com/etrecheck


Click the [Click for support] links for help with non-Apple products.

Click the [Click for details] links for more information about that line.


Hardware Information: ℹ️

MacBook Pro (13-inch, Mid 2012) (Technical Specifications)

MacBook Pro - model: MacBookPro9,2

1 2.5 GHz Intel Core i5 CPU: 2-core

4 GB RAM Upgradeable

BANK 0/DIMM0

2 GB DDR3 1600 MHz ok

BANK 1/DIMM0

2 GB DDR3 1600 MHz ok

Bluetooth: Good - Handoff/Airdrop2 supported

Wireless: en1: 802.11 a/b/g/n

Battery Health: Normal - Cycle count 82


Video Information: ℹ️

Intel HD Graphics 4000

Thunderbolt Display 2560 x 1440


System Software: ℹ️

OS X 10.9.5 (13F1066) - Time since boot: 0:4:27


Disk Information: ℹ️

APPLE HDD HTS545050A7E362 disk0 : (500.11 GB)

EFI (disk0s1) <not mounted> : 210 MB

Macintosh HD (disk0s2) / : 499.25 GB (262.97 GB free)

Recovery HD (disk0s3) <not mounted> [Recovery]: 650 MB


HL-DT-ST DVDRW GS41N


USB Information: ℹ️

Apple Inc. FaceTime HD Camera (Built-in)

Apple Inc. BRCM20702 Hub

Apple Inc. Bluetooth USB Host Controller

Apple Inc. Apple Internal Keyboard / Trackpad

Apple Computer, Inc. IR Receiver

Microsoft Microsoft® 2.4GHz Transceiver v7.0

Apple Inc. Apple Thunderbolt Display

Apple Inc. FaceTime HD Camera (Display)

Apple Inc. Display Audio


Thunderbolt Information: ℹ️

Apple Inc. thunderbolt_bus

Apple Inc. Thunderbolt Display


Gatekeeper: ℹ️

Mac App Store and identified developers


Kernel Extensions: ℹ️

/Applications/Karabiner.app

[loaded] org.pqrs.driver.Karabiner (10.6.0 - SDK 10.10) [Click for support]


Launch Agents: ℹ️

[not loaded] com.adobe.AAM.Updater-1.0.plist [Click for support]

[loaded] com.cisco.anyconnect.gui.plist [Click for support]

[loaded] com.oracle.java.Java-Updater.plist [Click for support]

[running] org.macosforge.xquartz.startx.plist [Click for support]


Launch Daemons: ℹ️

[loaded] com.adobe.fpsaud.plist [Click for support]

[running] com.cisco.anyconnect.vpnagentd.plist [Click for support]

[loaded] com.microsoft.office.licensing.helper.plist [Click for support]

[loaded] com.oracle.java.Helper-Tool.plist [Click for support]

[loaded] com.oracle.java.JavaUpdateHelper.plist [Click for support]

[loaded] org.macosforge.xquartz.privileged_startx.plist [Click for support]


User Launch Agents: ℹ️

[loaded] com.adobe.ARM.[...].plist [Click for support]

[loaded] com.adobe.ARM.[...].plist [Click for support]


User Login Items: ℹ️

iTunesHelper Application (/Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)

Karabiner Application (/Applications/Karabiner.app)

RescueTime Application Hidden (/Applications/RescueTime.app)


Internet Plug-ins: ℹ️

AdobeAAMDetect: Version: AdobeAAMDetect 1.0.0.0 - SDK 10.6 [Click for support]

FlashPlayer-10.6: Version: 16.0.0.305 - SDK 10.6 [Click for support]

Default Browser: Version: 537 - SDK 10.9

AdobePDFViewerNPAPI: Version: 11.0.10 - SDK 10.6 [Click for support]

AdobePDFViewer: Version: 11.0.10 - SDK 10.6 [Click for support]

Flash Player: Version: 16.0.0.305 - SDK 10.6 Outdated! Update

QuickTime Plugin: Version: 7.7.3

SharePointBrowserPlugin: Version: 14.4.8 - SDK 10.6 [Click for support]

MeetingJoinPlugin: Version: Unknown - SDK 10.6 [Click for support]

JavaAppletPlugin: Version: Java 8 Update 31 Check version


User internet Plug-ins: ℹ️

WebEx64: Version: 1.0 - SDK 10.6 [Click for support]


Safari Extensions: ℹ️

Searchme [Adware! - Remove]

Slick Savings [Adware! - Remove]

Amazon Shopping Assistant [Adware! - Remove]

Ebay Shopping Assistant [Adware! - Remove]


3rd Party Preference Panes: ℹ️

Flash Player [Click for support]

Java [Click for support]

Spelling [Click for support]

TeXDistPrefPane [Click for support]


Time Machine: ℹ️

Time Machine not configured!


Top Processes by CPU: ℹ️

4% WindowServer

2% Calendar

2% top

1% mdworker

1% X11.bin


Top Processes by Memory: ℹ️

417 MB firefox

253 MB thunderbird

232 MB Things

133 MB com.apple.IconServicesAgent

82 MB mds_stores


Virtual Memory Information: ℹ️

896 MB Free RAM

1.74 GB Active RAM

848 MB Inactive RAM

812 MB Wired RAM

553 MB Page-ins

0 B Page-outs


Diagnostics Information: ℹ️

Mar 12, 2015, 10:15:19 AM /Users/[redacted]/Library/Logs/DiagnosticReports/RescueTime_2015-03-12-101519_[ redacted].crash

Mar 12, 2015, 10:13:36 AM Self test - passed

Mar 12, 2015 8:58 AM in response to missing_jobs

Safari Extensions: ℹ️

Searchme [Adware! - Remove]

Slick Savings [Adware! - Remove]

Amazon Shopping Assistant [Adware! - Remove]

Ebay Shopping Assistant [Adware! - Remove]


Try disabling these extensions or removing them.


The 2 places I’ve seen recommended most to buy reliable RAM are below. I have purchased RAM several times from Other World Computing and have always been very satisfied with the product and service. They have on-line instructions on how to replace the RAM. OWC has also tested RAM above what Apple states is the maximum. I now have 6GB installed on a machine supposedly limited to 4 GB.


Crucial


Other World Computing

Mar 12, 2015 4:43 PM in response to Eric Root

Dear Eric,


Thanks for the time of your reply.


Re: Safari extensions. I almost never use Safari (in part because of this sort of thing), so since it's never running, I wouldn't have thought these extensions would be slowing down the computer operation. Nevertheless, I'll start up Safari, try to locate the extensions, and delete them.


Re: Adding RAM: Thanks for these suggestions. I've purchased RAM through CRUCIAL before, and I agree that they are very good. That said, I just bought the computer 6 mos ago, in the configuration shipped from Apple. (RAM, disk space, OS, and all.) I suppose Apple might sell computers with a "buyer-beware" sort of attitude, but I'd like to think that they'd prefer to ship computers in a configuration "that just works." I've also seen many other reports online of slow mavericks response with much higher RAM (8GB and 16GB), so I guessed the problem isn't necessarily the amount of RAM.


It would be quite frustrating to me if I had to upgrade a computer that's 6 months old, just to make it functional. At this point, however, I've invested enough time in troubleshooting to justify buying new RAM and seeing if that works. I'll consider that if other solutions don't emerge through this thread.


Again, thanks for taking the time.

Mar 12, 2015 4:55 PM in response to missing_jobs

With respect to 3rd party additions, you do not have much that is very offensive. Some browser extensions that are questionable, as pointed out by Eric Root.


As Eric Root suggests, you might be a candidate for getting more RAM to accommodate the apps you normally use (Crucial.com and MacSales.com (aka: OWC); I've used them both).

the slow response I see when starting/switching between applications or processes is because needed files can't be loaded into memory until the cache is cleared by saving updated files to disk.

If you are switching between Apps, then the stuff cached would be related to the apps and data you are using. Generally if you have slowness when switching apps, it is because the app(s) you were using before switching to the next app, had pushed the code and data for the app you are switching to out of RAM, and you are waiting to load that app back into RAM.


I have been in this situation, when the app I'm currently using is performing OK, but when I switch to another app, I have a delay. This was solved by adding more RAM.


However, I did do some monitoring of my page-outs to confirm it was constrained memory that was causing problems when switching apps.

Applications -> Utilities -> Terminal

sar -g 60 100

which will report your page-out stats once a minute for 100 minutes (adjust the numbers to suite your tastes). Then I used my Mac as usual. After experiencing the app switching slowness, I went back and reviewed my page-out stats. I could see that I would mostly zero page-outs, but when switching apps, I would have bursts of high page-out activity.


Because your system has only been booted for 4 and half minutes:

OS X 10.9.5 (13F1066) - Time since boot: 0:4:27

The EtreCheck virtual memory information cannot really tell us anything.


Yes, some cached data will be dirty data that much be written to disk, but it is only dirty because the apps you have just been using have been modifying that data to be flushed.


If mdworker is constantly running (use Activity Monitor -> CPU tab), then that can consume CPU resources. If it is ALWAYS consuming lots of memory (Activity Monitor -> Memory tab), then mdworker must be running enough to keep pulling memory back into its address space. That would indicate that you are modifying files or doing Time Machine backups consuming lots of data, that Spotlight is indexing.


So back to maybe needing more RAM for the kind of work you are using your Mac for.


Finally, if you really want to "Juice Up" your Mac, consider replacing your Disk with an SSD. I did both of these things this past summer, and I'm really liking the results. No thoughts of replacing my 3 and a half year old Macbook Pro as it is really performing well. I did the same to my 5 and a half year old iMac. It is a joy to use as well.

Mar 12, 2015 5:20 PM in response to missing_jobs

I've also seen many other reports online of slow mavericks response with much higher RAM (8GB and 16GB), so I guessed the problem isn't necessarily the amount of RAM

Yes, but in many of those situation, they have lots of resource hogging 3rd party additions, such as Anti-malware, Mac cleaners, memory cleaners, or seriously bad adware apps (such as Genieo, which will make any Mac crawl). You do not seem to have those kinds of additions.


The thing is you cannot compare other posts to your situation unless you are going to get down to every last software detail. And that would include the collection of apps you run vs what they run.


I suppose Apple might sell computers with a "buyer-beware" sort of attitude, but I'd like to think that they'd prefer to ship computers in a configuration "that just works."

But Apple does not know what you are going to install or run on your Mac. If you want to run Just the apps shipped on your Mac, then your assumptions mighty be true. But just based on the limited information EtreCheck provided, you have installed stuff. VPN software, X11 software, keyboard modification software, time management software, WebEX for collaboration, etc... Now I do not see any issues with this software, I'm just saying you did not stick with Apple's software so you cannot assume that system configuration is ideal for how you use your Mac.


At this point, however, I've invested enough time in troubleshooting to justify buying new RAM and seeing if that works. I'll consider that if other solutions don't emerge through this thread.

I think you should give the "sar -g 60 100" command a try. At worse, it will not prove anything. But it might show a correlation between when you do "X", you see "Y" behavior.


NOTE: I'm not trying to talk you out of more RAM (as I've said before, I've upgraded my Mac with RAM and an SSD). But I'm also trying to give you ways to make that an intelligent decision.

Mar 12, 2015 5:41 PM in response to BobHarris

Dear Bob,


I apologize for putting you and Eric in the position of defending Apple. Let me just say that I'm not running anything on 10.9 that I didn't run under 10.6, my hardware is vastly improved by all measures, and my 10.9 computer runs a *lot* slower in everyday use. The new computer is much faster at number crunching, however, probably because then it gets 'round to using the processor. I've vented enough now; I won't anymore.


Thanks for the sar suggestion and the warning not to compare my mac's issues with others without working through the details. I really like the sar suggestion, and I've got sar running in X11 now. (X11, by the way, is from Apple.) An intelligent/informed diagnosis is precisely what I'm going for, and I appreciate the help you've provided me to make it. When I notice the slowdown, I'll check the page-outs. If I see them spike, I'll know just what to do.

Mar 12, 2015 6:23 PM in response to missing_jobs

I have been using X11 (and XQuartz) for years (frequently with gvimdiff displayed on my Mac from remote (as it 2000 miles away) Linux systems and X11 based TightVNC (also from those 2000 mile away Linux system)).


I use Karabiner, and Cisco AnyConnect. And a bunch of other additions (such as BetterTouchTool, 1Password, Carbon Copy Cloner, CrashPlan, ControlPlane, Dropbox, Day-O, and more; but I have increased from 4GB to 16GB of RAM so they are not getting in my way).


WebEX I don't use, but my Wife does.


The stuff on your system I can see via the EtreCheck output, I don't have a problem with.


As for stuff that worked well on 10.6 not playing as nice on 10.9 is partially a result of Apple cramming more stuff into the operating system. Basically Mac OS X has stopped getting faster with each new version when 10.3 was released. After that, each version got slower and required faster hardware and more RAM to keep up. This is just as true between 10.6 and 10.9.


I'm not really trying to defend Apple (and if anything I think their developers are getting spoiled by having SSD based Macs and are not paying attention to slower rotation disk access speeds; this is one of the reasons I replaced the rotational hard disk with an SSD in both my Macbook Pro and my iMac).

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

In Activity Monitor, why is app memory use higher than the sum of memory used by individual apps

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