1

There's nice and renice to lower priority of a process, cpulimit to lets say 30% maximum, taskset to limit to 1 core, ionice. Each of these tools has a different syntax. Specifically cpulimit seems harder to master. Syntax isn't trivial. Writing this for multiple tasks (on a server) would be a lot work.

nice alone does not solve it. If I run for example nice -n19 stress --cpu 8 --io 4 --vm 2 --vm-bytes 128M --timeout 10s on my desktop system, it helps, but it is still less responsive until that process finishes.

Would be useful for tasks (such as backups) that require a lot of CPU / IO where it does not matter if these finish in 5 seconds, 5 minutes or 30 minutes. More important is not to take away CPU shares from more important processes.

Before re-inventing all of that...

Is there a linux shell wrapper script to run programs with low system resources that covers all or most of above?

2
  • Why would CPU usage be relevant to a backup process? And why wouldn't it be running on a single core anyway, surely you don't have a backup tool that's multithreaded? What you describe, having the machine slow down like that, is most likely due to RAM or, if you're backing up, due to slow writing over mounted NFS drives. Commented May 13, 2020 at 15:08
  • 1
    I am sure there are multiple legitimate use cases for this question. Yes, there are multithreaded backup processes. Performance of SQL backups or anything using compression is often limited by CPU or IO as examples. No, not a slow machine. Please concentrate on the core of the question and not any sidelines. Commented May 13, 2020 at 15:39

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.