I need to run a process A as much resources as possible when the machine is free, but gives out CPU once there's high-priority processes are started. Any suggestions? Thanks!

  • 1
    So what happened when you tried? nice is the tool for the job (although -19 seems a bit excessive), what else do you need? – terdon Dec 12 '17 at 12:03
  • Please edit your question and add these details. Also explain why you chose to give it such a low priority instead of the default -10 (which is probably what you need). – terdon Dec 12 '17 at 12:38

There are few ways to achieve what you want. You can use nice, cgroups, cpulimit to limit the cpu usage. You are in right direction by giving nice -19 right command to give niceness is nice -n 19 Program name.


Maximum overkill is to use a process scheduler such as HTCondor or SLURM, though this perhaps better suits larger numbers of systems and where there is sufficient knowledge around to setup and maintain the scheduler. These schedulers offer all sorts of means to divvy up CPU and other resources (at the cost of a not so simple learning curve).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.