CFS: Scheduler: How does each change in 'nice' value result in 10% change in CPU time?

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Thu Jan 21 12:37:44 EST 2016


On Thu, 21 Jan 2016 08:51:08 -0800, John Locke said:

>  * Nice levels are multiplicative, with a gentle 10% change for every
>  * nice level changed. I.e. when a CPU-bound task goes from nice 0 to
>  * nice 1, it will get ~10% less CPU time than another CPU-bound task

Note the ~ indicating approximately.

> If I take an example of 2 tasks both with weight=1024 (NICE_0) they
> should each get 50% of the CPU time. If 1 of the tasks is reniced to
> NICE_1 then the NICE_0 task will get 1024/(1024+820)=56% of the CPU
> time and  the NICE_1 task will get 44% of the CPU time.

12% difference - that's around 10%.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160121/93fbeb42/attachment.bin 


More information about the Kernelnewbies mailing list