Kill all non-essential processes

Solution 1:

The processes you mention would all be killed by one command:

kill -9 -1

That would also log you out and kill all the programs you run so it's not ideal, but it would speed up your Mac and dedicate all further memory and resources to the system.

Practically, you would need to use launchctl to list all user tasks and quit them one by one. The tasks you mention all get started when you log in, so killing them might not do anything but cause them to exit, and re-start.

I would recommend instead of killing - doing the work to really measure the aspect of the system that's causing you constraint. RAM, CPU, Network, disk IO and focus on apps that impact that. The CPU times of the tasks you mentioned are so trivially small, it's hard to see them as any sort of problem, but perhaps you have data and measurements showing otherwise.

OS X can run thousands of small processes and juggle memory, and it's a rare instance where one program has a large enough memory leak or doesn't idle when it's not in use that it's unlikely you have a problem that doing all the work to script a kill tool would ever make you back the time you spent on it. I'd say, work on that script if you need it to learn how things work and not to make any difference going forward. In this instance, don't solve the general problem is my advice...

enter image description here