Nice Priority Effect Calculator
Work out nice priority effect instantly with clear inputs, formula shown and shareable results.
About Nice Priority Effect Calculator
The Linux completely fair scheduler assigns each nice level a weight, where every step changes the weight by a factor of about 1.25. Ten nice levels of separation therefore gives roughly a nine-to-one CPU ratio, and twenty levels about eighty-to-one. Nice only matters when the CPU is contended; on an idle system it has no effect.
Formula
CFS weighting
weight = 1.25^(-nice); share = weight / sum of weights; each nice step changes CPU share by about 25 percent
Worked example
With the default values below, Nice Priority Effect Calculator returns CPU share of process A of 96.60%. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Nice value of process Aaccepts -20–19
- -5
- Nice value of process Baccepts -20–19
- 10
- CPU cores availableminimum 1
- 4
Results
- CPU share of process A
- 96.60%
- CPU share of process B
- 3.40%
- CPU ratio A to B
- 28.42 x
- Core equivalents for process A
- 3.86
Step by step
- 1Values used
- 2CFS weighting
- 3CPU share of process A= 96.60
- 4CPU share of process B= 3.40
- 5CPU ratio A to B= 28.42 x
- 6Core equivalents for process A= 3.86
Assumptions and limits
- The result is derived only from the 3 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 2 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
Does nice guarantee a CPU share?
No, it is proportional weighting among runnable tasks. For a hard guarantee use cgroup CPU quotas, which cap and reserve rather than merely prioritise.
Why does nice not help my I/O-bound job?
Because it only affects CPU scheduling. Use ionice with the CFQ or BFQ I/O scheduler to prioritise disk access.
Related Calculators
- Swappiness Effect Calculator
- Account Lockout Policy Calculator
- Backup Size With Retention Calculator
- Bare Metal Sizing Calculator
- Bash Script Runtime Calculator
- Block Size Overhead Calculator
- Compression Ratio Savings Calculator
- Container vs VM Overhead Calculator
- Context Switch Rate Calculator
- CPU Steal Time Impact Calculator
You might also need
- Swappiness Effect CalculatorAlso in Linux & System Administration
- Container vs VM Overhead CalculatorAlso in Linux & System Administration
- CPU Utilisation CalculatorAlso in Linux & System Administration
- Free Memory Estimate CalculatorAlso in Linux & System Administration
- Group Quota CalculatorAlso in Linux & System Administration
- Journal Size CalculatorAlso in Linux & System Administration
