MacOS 10.10 on 4 GB memory bloat: which launch daemons/agents/services can I disable? And how to discover the names of the culprits

launchdmacosmemorymemory pressure

I recently did a Yosemite (10.10) clean install on my 4 GB 2010 MBP, but it now has so much memory bloat due to unnecessary launch daemons/agents /services that it causes frequent beachballing; excessive memory pressure.

This is not a duplicate; I did research manpage/docs on launchctl, launchd, Yosemite/Sierra whatsnew guides, AskDifferent, SO, Apple.com, many Mac enthusiast blogs/forums and many other sites for over a month now; see comments below for examples of the many Google keywords searches I tried; also, the answer is very MacOS-version-specific. This is driving me nuts.

I'm looking for a minimal configuration: no crap like iCloud, iTunes etc. Just the absolute minimum set needed to run the OS. Clearly stuff like 'CloudPhotosConfiguration' is unnecessary bloat. (For reasons we will not go into here it doesn't make much economical sense to upgrade 8 GB RAM + SSD).

Question: How do I find out which launch daemons/agents/services I can safely disable on my mid-2010 MBP with 4 GB running Yosemite 10.10?

Activity Monitor doesn't show any obvious whales, although system memory usage when running Safari > when running Chrome. Below is a dump of which launchctl items had Status -44 (killed due to inadequate memory). Based on reading blogs, some are notorious (e.g. com.apple.bird), some are believed to be unnecessary, some cannot safely be stopped:

clear; launchctl list | awk '($2 == "-44") { print $3 }' | sed -e 's/com.apple.//g' | sort -f 

com.apple.
accountsd, AirPlayUIAgent, bird, CalendarAgent,
CallHistoryPluginHelper, CallHistorySyncHelper, cfprefsd.xpc.agent,
cloudd, CloudPhotosConfiguration, cloudphotosd,
coreservices.appleid.authentication, coreservices.uiagent,
DataDetectorsDynamicData, icloud.fmfd, iconservices.iconservicesagent,
imdpersistence.IMDPersistenceAgent, InputMethodKit.UserDictionary,
internetaccounts, MailServiceAgent, Maps.mapspushd, nsurlsessiond,
nsurlstoraged, pbs, photolibraryd, pluginkit.pkd, printtool.agent,
recentsd, secd, secinitd, security.cloudkeychainproxy3, soagent,
spindump_agent, tccd, telephonyutilities.callservicesd

Best Answer

In the hope that the following is enabling to disable. Apple-Bloat is such a common concern, it should have its own trademark registered. Especially in circumstances or environments that require a maximum of CPU power, minimal latency or where users have to make do with what hardware they have. Audio related scenarios being the most common.

Not nearly enough can be disabled through the GUI-tools available. So this is an excellent question for a start. But these circumstances have to be clearly defined. Disabling almost everything can also disable the entire system. Prepare your bootable backups! Do not change anything before you know how to reverse it. Some of the following advice can be uncomfortable to deal with in its consequences.

It is of course the very first step to uninstall everything you do not need that is not from Apple – first. Every kext, every LaunchDaemon, every App, and every program not strictly needed has to go. Clean out the corresponding folders in /Library/ and ~/Library/. This also implies that Migration Assistant is now your enemy, and a clean install is your ally.

In very memory constrained circumstances it is also advised that you limit your use of the Desktop as a storage space. And your use of the Finder.app. Having many icons on the Finder Desktop leads to increased memory consumption. That means also the Finder has to go: defaults write com.apple.finder QuitMenuItem -bool true Do not worry. This is just adding a regular quit menu to your beloved file manager. When not needed, Finder can now be quit, stays quit, and releases memory. When needed for file related operations, you bring it back with simple click on the first Dock icon.

You have to make a complete list of things you know 'that are there' but you are sure you do not want. You have to make a list of things and functions/services you really care for. Both lists have to be tested against later.

You will spend quite a time in Activity Monitor and Console. This is a tedious process. After you went through the list of running processes you should investigate everything you either do not recognise or recognise as most probably unwanted. Look them up and net-search the process name.

Since this is not a wiki with unlimited space I cannot list every process judged by one or many as "bloat" or "can safely disabled if unwanted". That also depends too much on what else above "iCloud" should go.

Apple is really bad in documenting these things for the average end user just sitting at his system. It looks like macOS favours the "no user serviceable parts inside" approach. So you have to evaluate carefully what you find on the net. Try to spot glib analyses (or at least glib summaries / writeups) that contain little detail other than Apple-knows-best handwaving.

What's funny about this? Apple indeed knows best. They just choose to hide that knowledge away. It is in parts on their website instead of giving you tooltips and installed documentation. Those parts that are accessible there are further in a format that needs some processing by the end user. Try your luck at Apple at for example: Daemons and Services Programming Guide. You can and should of course double check at their user forums (prepare a large salt shaker to have an adequate supply of grains ready). Or this very site or the others. Just keep the presumed quality level of each source in mind.

Most of the processes running and displayed in Activity Monitor can be (force) quit. This is generally quite safe to do in a testing setting when no important work is open in the background or things like that. (Caveats apply!) That way you can test one by one and empirically see what happens:

  • do they respawn immediately or after some time or not until after a reboot?
  • is something unexpected not working after you disabled the process?

If nothing unexpected happens, you can then go the next step.

There was an excellent list of known processes and a brief explanation of them called “Know your Mac OS X processes”. This is very sadly gone but still visible at archive.org: https://web.archive.org/web/20170222052540/http://triviaware.com/macprocess/all That means of course that it is a bit outdated to begin with, but still more up-to-date than most of the top search engine hits today. Since you are on Yosemite this is less of a concern for the current situation.

Now make yourself familiar with launchd and launchctl. The first is the daemon that loads all "this crap" (your words) and with the second you can interact with launchd and control it.

Seeing that killing a process is without ill effect for your needs means you can instruct the system to disable that 'service'. You might use launchctl to do that or any of the programs available to accomplish this with a gui, like

Look at the job and try to understand what it does. Stop a job and see what happens. Then disable the job and see what happens. Make pauses in between and reboot often to see you didn't mess up too much that might be needed at boot time or only once.

Dealing with completely unexpected consequences can be hard, since sometimes there are really weird connections to be made. No need for Airplay? Uncheck all the boxes in the GUI. Disable everything that has airplay in its name. Easy. Everything works as expected afterwards. Except after a while you notice that iTunes keeps crashing on launch. No need for iTunes also? Good. Still want to use iTunes? Bad, bad. Too bad. Go back to your list of deliberately disabled services, re-eanable them one by one; to finally find out that iTunes insists on a SystemDaemon called com.apple.AirPlayXPCHelper. Expect the unexpected.

To give you a head start for things considered bloat: There are many collections on the net that try to accomplish what you want. The following is meant as a source to be read and analysed for inspiration. Do not just apply them! Read the docs for them! Pick what seems needed one by one. (Since you should be documenting your own findings anyway—why not publish them?)

They are not completely applicable to every version of OS X or macOS, some of them have differing revisions still online. But it seems that only removed or newly introduced daemons are to be watched for.

Minimal systems, optimized for audio:

"Disable bunch of #$!@ in Sierra (Version 2.1):" https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3

A practical guide to securing macOS: https://github.com/drduh/macOS-Security-and-Privacy-Guide

Up to date successor to osxlockdown: https://github.com/kristovatlas/osx-config-check

"Simple shell script to fix macOS privacy issues and remove mostly useless macOS calls to cupertino": https://github.com/karek314/macOS-home-call-drop

Only small portions really applicable here but still some unique items: https://gist.github.com/brandonb927/3195465

Also of note, "Unload and Disable unwanted Agents and Daemons on OSX": http://tech.masterofsql.com/os-x/unload-disable-unwanted-agents-daemons-os-x.html

Now let the downvotes come. Hope this helps.