4

In some devices the cpu speed is dynamic, being faster when there is more load.

I was wondering if it is possible to set nice level or priority of a process so that it does not influence an increase in cpu speed when it is running flat out.

i.e. Process is running flat out, but only using spare cpu cycles as low priority. But also not causing an increase in cpu speed.

When cpu is off process stops. When cpu is slow process may have some cpu, maybe most of it. When cpu is fast, because another process is running at 90%, process gets the remaining 10% of fast cpu. Then other process stops, so low priority process gets 100% of cpu, but the frequency controller does not see this low priority process and drops the frequency.

3

You can use the ondemand cpu-freq governor, as long as you set the ignore_nice_load parameter to 1.

From Documentation/cpu-freq/governors.txt, ondemand section:

ignore_nice_load: this parameter takes a value of '0' or '1'. When set to '0' (its default), all processes are counted towards the 'cpu utilisation' value. When set to '1', the processes that are run with a 'nice' value will not count (and thus be ignored) in the overall usage calculation. This is useful if you are running a CPU intensive calculation on your laptop that you do not care how long it takes to complete as you can 'nice' it and prevent it from taking part in the deciding process of whether to increase your CPU frequency.

  • That doesn't seem to be an option on my P4 system. I'll see if I can find out why. – Ken Sharp Apr 10 '15 at 5:29
  • 1
    @KenSharp P4 is that an operating system, or processor, or something else? This will be an operating system setting, and nothing to do with hardware. – ctrl-alt-delor Dec 7 '16 at 18:09
  • How to set ignore_nice_load=1 in Ubuntu Linux? – porton Dec 19 '18 at 23:12

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.