JATtho ,

No, I definitely want it to use as many resources it can get.

taskset -c 0 nice -n+5 bash -c 'while :; do :; done' &
taskset -c 0 nice -n+0 bash -c 'while :; do :; done'

Observe the cpu usage of nice +5 job: it's ~1/10 of the nice +0 job. End one of the tasks and the remaining jumps back to 100%.

Nice'ing doesn't limit the max allowed cpu bandwidth of a task; it only matters when there is contention for that bandwidth, like running two tasks on the same CPU thread. To me, this sounds exactly what you want: run at full tilt when there is no contention.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • linux@programming.dev
  • test
  • worldmews
  • mews
  • All magazines