4

Some system processes like systemsoundservd, logd, diagnosticd, etc. recently use a lots of cpu on my macbook pro. How can I limit them to some degree because most of them are not too relevant to me?

Note: I have already checked out Can I manually limit the %CPU used by a process? but it does not seem to work as expected.

viet@Mozg  ~  pgrep -l systemsoundserv  
506 systemsoundserv  
viet@Mozg  ~  sudo cputhrottle 506 10  
libc++abi.dylib: terminating
with uncaught exception of type Process::ManipulatorException: Error
on task_for_pid of pid 506, res = 5 [1]    7594 abort      sudo
cputhrottle 506 10
  • Please clarify what you mean "there are no positive results." What did/didn't happen and what were you expecting? – Allan Nov 30 '17 at 20:26
  • Edited. It does not work and throws that exception every time I tried. – ntviet18 Nov 30 '17 at 20:51
  • Have you tried "nice" and "renice"... – Solar Mike Nov 30 '17 at 21:03
  • Thank you. I have tried. But seems like the "fool proof" mechanism of nice prevents me from doing that either. – ntviet18 Nov 30 '17 at 21:18
1

Thos system processes respond to other apps that run, so your first step would be to isolate and identify what programs you have that cause high background system load.

It’s like racing a high performance car and seeing the tires are hot and fuel is being consumed rapidly - those all are the design intent when you press the accelerator to the floor.

It might make more sense to start with your actual workload than try and hobble or disable logging and sound output. Sorry for a side answer, but those processes sit at idle for the vast majority of installations and likely would on your system if you restart and some troubleshooting should show exactly which of your apps trigger this usage pattern.

0

You can try to use nice.

nice is a builtin on macOS and can be used to launch a task with a lower scheduling priority. (Or higher, with superuser).

nice -n 20 yes > /dev/null

Will launch yes with the lowest (and slowest) possible priority. You can also edit the priority of a currently running process by using renice.

home:~ user$ yes > /dev/null &
[1] 2492
home:~ user$ renice -n 20 2492

This will change the priority of the already started process. It is worth pointing out that the yes process still runs at 100%, as this is not really throttling it. Rather, nice makes it so that if multiple programs are competing for resources, the yes program will slowdown and leave your more important tasks alone.

You can see here for more discussion of setting priority on Mac.

0

An application I have found useful is Turbo Boost Switcher.

It prevents the CPU from going over the base clock. This doesn't target any application specifically, but it does and up throttling down any application that is causing undo strain.

This is useful for conserving battery life or keeping the system cool.

-3

I found this alternative: AppPolice

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

  • 1
    What's this an alternative to? – JMY1000 Feb 8 '18 at 16:26

You must log in to answer this question.

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