3

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
6
  • Please avoid lengthy discussions in comments. If questions require a lot of back and forth there is always the option of using a chat room for this.
    – nohillside
    Aug 27, 2017 at 7:05
  • The question as written is rather broad, I see at least two actual questions in there: "How do I identify services which don't need to be running for the things I do" and "How do I disable a service", there may be even more. You will get better answers if you focus on one of them per post (and add more questions in separate posts). Also the first question (how to identify) might be easier to answer if you give specific examples of things you want or don't want to do on this Mac.
    – nohillside
    Aug 27, 2017 at 7:10
  • Having said that, I wonder whether it might be easier to solve the memory consumption issue in general (by looking at Activity Monitor etc), primarily because macOS usually does a good job itself in not wasting memory/cpu cycles on processes which are not necessary.
    – nohillside
    Aug 27, 2017 at 7:12
  • 1
    @patrix: the question is not broad. The main thrust is 1) How to identify unnecessary services/daemons/agents". The doc is unclear on how 2) services/daemons/agents are related, and I think deleting that damages the question, but if you insist I must then I suppose I'll have to. As to Activity Monitor and trying to diagnose memory-pressure from it, I've been looking at it daily for the last 7 years, there are no obvious whales in my case, and it frequently isn't great at diagnosing (proof: all the articles on "Yosemite/ beachballing") You have to give me some basic presumption of competence..?
    – smci
    Aug 27, 2017 at 8:59
  • 2
    I'm not questioning your competence, I'm trying to make sure we have answerable questions which help both the asker and future visitors. "which services can I disable" and "how can I disable a service" are different questions, I can easily answer one without answering the other, which will make it difficult to vote/accept an answer at the end. I understand that the issues are related in your case, nevertheless the questions themselves are distinct.
    – nohillside
    Aug 27, 2017 at 9:52

1 Answer 1

3

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.

5
  • 1
    Superb how-to guide, but it strikes me that writing Linux is easier than forensically excising the bloat from MacOS 10.10. Say I just want to disable all iCloud-related launch*items on 10.10: is there not a 5-minute answer on that? Anyway I'll work through your list of resources and let you know what I find.
    – smci
    Aug 28, 2017 at 15:39
  • 1
  • Unfortunately not in 5 min. Lack of documentation and inconsistencies in naming make that hard. All items with "cloud" in their name are an obvious candidate, but Ubiquity is part of that parcel also. So it's difficult to determine what Apple (or you) subsumes exactly under iCloud. Aug 28, 2017 at 15:57
  • Yes in 5 minutes: Disabling OSX Yosemite annoyances / features I have no use of blog post by 'guycalledseven' is bloody superb!! Reduced my 'Compressed memory' in Activity Monitor from ~2.5-3.4Gb to < 500-800Mb!! I will post an answer once I solve the diagnosis part.
    – smci
    Sep 1, 2017 at 19:22
  • That is impressive. All the more so since that guide covers only a small subset of those services and daemons. (i)Cloud alone has many more parts. To disable that is. Sep 1, 2017 at 19:40

You must log in to answer this question.

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