I have a daemon I would like have to parallelize up to the number of cores on a user's machine, but I don't want it interfering with foreground tasks. Traditionally, in unix, I would just run this daemon at nice=1, e.g.

nohup nice -n 1 MyDaemon &

The Apple launchd plist documentation features several items that speak to priority issues, but they're vaguely defined, specifically,


Is there someplace where the exact behavior of ProcessType=Background is defined? It would seem that it may be "smarter" than just setting Nice and LowPriorityIO.


Summarized from man launchd.plist:

LowPriorityBackgroundIO: Specifies whether the kernel should consider this daemon to be low priority when doing file system I/O when the process is throttled with Darwin-background classification.

ProcessType: This optional key describes, at a high level, the intended purpose of the job. The system will apply resource limits based on what kind of job it is. If left unspecified, the system will apply light resource limits to the job, throttling its CPU usage and I/O bandwidth.

ProcessType=Background: Background jobs are generally processes that do work that was not directly requested by the user. The resource limits applied to the Background are intended to prevent them from disrupting the user experience.

  • I'm familiar with those definitions - that's the "documentation" I referred to in my question (I should have been more specific). Those definitions are pretty vague; my question remains - how do ProcessType, the IO priority flags, and Nice interact? – Steve Broberg Oct 10 '14 at 15:36
  • Have you tried running a Debug on the launch daemon and watching the process? Since there is no Dependency's with them I don't believe you can set who goes first to my knowledge. – tron_jones Oct 10 '14 at 16:22

You must log in to answer this question.

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