Tag Info

Hot answers tagged

15

It's for what I'd call policy reasons. The idea is that normal users can't override the actions of privileged users. Let's say you're a user on some enormous shared server. You're running monstrous CPU-hogging processes to the detriment of the other users. The sysadmin renices some of your processes because he doesn't like you very much. The OS doesn't ...


14

Since linux 2.6.12, that depends on the value of the RLIMIT_NICE limit (ulimit -e). Which can take values from 0 to 40. That limit is more the limit on the priority of the process (the greater that number, the higher the priority a user can set for a process). You'll notice the default value is 20 on ubuntu 10.04 and 0 in Debian jessie for instance. A ...


11

What does a niceness of (-) indicate? Notice those also have a PRI score of -100; this indicates the process is scheduled as a realtime process. Realtime processes do not use nice scores and always have a higher priority than normal ones, but still differ with respect to one another. You can view details per process with the chrt command (e.g. chrt -p ...


5

To quote Robert Love: The scheduler does not magically know whether a process is interactive. It requires some heuristic that is capable of accurately reflecting whether a task is I/O-bound or processor-bound. The most indicative metric is how long the task sleeps. If a task spends most of its time asleep it is I/O-bound. If a task spends more ...


4

@Goldlilock's answer directed me to do the research in the right path. This is my research details. Scheduling Algorithms available for processes Linux supports 3 scheduling policies. SCHED_FIFO, SCHED_RR, and SCHED_OTHER. SCHED_OTHER is the default universal time-sharing scheduler policy used by most processes; SCHED_FIFO and SCHED_RR are intended for ...


3

Have a look at cgroups, it should provide exactly what you need - CPU reservations (and more). I'd suggest reading controlling priority of applications using cgroups. That said, put the important yet often idle processes into group with allocated 95% of CPU and your other applications into another one with allocated 5% - you'll get (almost) all of the power ...


3

I am wondering why top and htop don't display -100 for higest priority real time processes ? That's because SCHED_RR and SCHED_FIFO have fixed static priorities from 1-99: Source For realtime priorities, the order is reversed: 99 is indeed the highest one, contrary to the ususal "lower is higher". Per your comment I misunderstood your question, ...


3

Under Linux, by default, a process's IO priority is derived from its CPU priority according to the formula io_priority = (cpu_nice + 20) / 5 IO priority ranges from 0 to 7 with 0 being the highest priority. CPU niceness ranges from -20 to 19 with -20 being the highest priority. You can use the ionice command to change a process's IO priority. If you want ...


1

As a component of the kernel, the process scheduler, makes the decisions to divide up processor time between processes on a given system using a priority-based scheduling algorithm. Starting with an initial base or default priority of zero (I believe) the scheduler can dynamically increase or decrease priority to fulfill scheduling objectives based on ...


1

In order to make your CPU use less battery, you need it to run slower. The total amount of CPU instructions needed to execute your program do not depend on the speed at which it runs, so limiting the proportion of CPU time used by your program would make it use more CPU, not less. When your CPU is doing nothing instead of running your program, it's still ...



Only top voted, non community-wiki answers of a minimum length are eligible