Skip to main content

Questions tagged [priority]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
30 votes
2 answers
26k views

Why can't I use renice to increase a process' nice value?

From man renice: Users other than the super-user may only alter the priority of processes they own, and can only monotonically increase their ``nice value'' (for security reasons) within the ...
terdon's user avatar
  • 244k
28 votes
7 answers
63k views

How do I start a process with a nice value of -20 and not give it root privilege?

I would like to start a process with a nice value of -20. This requires me to use a command like sudo nice -n -20 matlab However, this starts matlab as root too. Is there a way to have matlab as non-...
Lord Loh.'s user avatar
  • 1,986
28 votes
2 answers
4k views

Why does niceness range from -20 to 19?

The nice command allows you to adjust the scheduling priority ("niceness") of a program. On all Unix-like systems I've used, niceness is specified by a range of integers, where -20 is the most ...
Psychonaut's user avatar
24 votes
1 answer
14k views

How disk IO priority is related with process priority?

I'm running software that overloads disk IO sometimes. I don't need fast response from that software, I need fast response from other applications, so I could set low process priority for that. I want ...
Kamil's user avatar
  • 749
23 votes
6 answers
86k views

What is a command to find priority of process in Linux?

How can i view the priority of a specific process ?
Rupesh Pawar's user avatar
  • 1,167
23 votes
4 answers
32k views

Run Linux process at very very low priority?

I have a regular process that's not so important but will consume very much CPU power. I have another process which is really important, but it spends most of the time idle, but when it gets a job it ...
uray's user avatar
  • 3,890
21 votes
1 answer
10k views

How do I view the IO priority of a process?

How can I view the IO priority of a process? like to see for example if something has been ionice-ed.
xenoterracide's user avatar
19 votes
2 answers
6k views

What does a niceness value of (-) mean?

According to the man page, and wikipedia; nice ranges from -20 to 20. Yet when I run the following command, I find some processes have a non numerical value such as (-). See the sixth column from ...
spuder's user avatar
  • 18.2k
17 votes
2 answers
32k views

Run process with higher priority

I want to run mplayer with higher priority than any other processes, including the IO-processes. How can I do that?
SHW's user avatar
  • 14.9k
14 votes
1 answer
2k views

User-based GPU priority

I have a computer running Linux (Kubuntu 14.04.3 LTS x64), where I use the CUDA toolkit to perform some computations on some Nvidia GPUs. I share the computer with a few other users. How can I define ...
Franck Dernoncourt's user avatar
12 votes
1 answer
8k views

controlling priority of applications using cgroups

I would like to understand cgroups better and would like to understand the use-cases for applying cgroups. Are cgroups a good way for prioritizing different applications (i.e, giving higher priority ...
Johnnie's user avatar
  • 2,541
12 votes
2 answers
1k views

What are the effects, if any, of scheduler priorities and policies for threads in an uncontended cpuset?

I have a Linux system where we have used cgroups to create two cpu_exclusive cpusets, A and B, and where we have migrated all user threads and all unbound kernel threads to a cgroup attached to cpuset ...
acm's user avatar
  • 257
10 votes
1 answer
3k views

Real time priorities in non real time OS

If I do the following command on my standard Linux Mint installation: comp ~ $ ps -eo rtprio,nice,cmd RTPRIO NI CMD ... 99 - [migration/0] 99 - [watchdog/0] 99 - [migration/1] - 0 [...
TheMeaningfulEngineer's user avatar
10 votes
1 answer
5k views

Does the timeslice depend on process priority or not under Completely Fair Scheduling?

I'm trying to understand the Completely Fair Scheduler (CFS). According to Robert Love in Linux Kernel Development, 3rd edition(italics his, bold mine): Rather than assign each process a timeslice,...
Ellen Spertus's user avatar
9 votes
3 answers
7k views

Is changing the priority of a game's process to realtime bad for the CPU?

On Windows I have frequently changed the priority of a games process to 'high' or 'realtime' to get a performance boost. This has never resulted in any problems with my hardware. I was thinking that ...
Totem's user avatar
  • 1,111
9 votes
1 answer
7k views

Is there any use for RLIMIT_NICE?

I am using prlimit in Ubuntu to do some resource restrictions in my sandbox which has been very helpful. However, I am not quite sure what to do with RLIMIT_NICE. The docs say: RLIMIT_NICE (since ...
Jeroen Ooms's user avatar
8 votes
2 answers
4k views

Why was fsck priority introduced in /etc/fstab?

Inside the /etc/fstab file, in the sixth column, there is a number that corresponds to whether a filesystem should be scanned for errors. Possible values are: 0 - skip 1 - high priority 2 - low ...
colemik's user avatar
  • 1,371
8 votes
1 answer
2k views

Does Linux Change a Process Niceness Automatically?

I know you can change a process niceness with setpriority or nice or renice. However, does Linux automatically adjust/change a process niceness without user input? I have a process for which I use ...
Luis's user avatar
  • 133
8 votes
1 answer
638 views

Prioritise X applications with focus

Is there a way to prioritise X applications with focus, preferably both in terms of CPU and I/O? Something like all X applications are niced and ioniced down in priority, but when they gain focus ...
Clinton's user avatar
  • 739
7 votes
2 answers
3k views

Assign a higher priority to a specific process by default

I would like to configure my desktop Linux system so that whenever I start running a specific program (run that processes of this program) the respective process gets assigned a high priority. How to ...
ingli's user avatar
  • 1,889
7 votes
1 answer
321 views

How does ionice work with multiple drives?

I understand how ionice can help you when you have multiple processes requesting access to the same disk resources, but how does it work when you have multiple disks? For example, you have one rsync ...
user159726's user avatar
6 votes
1 answer
25k views

What is swap priority and why does it matter

While seeing the manual for swapon command the priorty option is described as -p, --priority priority Specify the priority of the swap device. priority is a value ...
Sudip Ghimire's user avatar
6 votes
1 answer
752 views

Does IO prioritise by the very nature of renicing a task?

The CFQ IO scheduler supports priorities though I am not sure that Deadline does (I believe not). The premise is that when I renice a task it gets a larger share of CPU under the Completely Fair ...
NightwishFan's user avatar
6 votes
3 answers
3k views

Is there a way to really prioritize processes or make Linux respect their priorities?

I know there are process priorities like in other operating systems, going from -20 (most prio) to 19 (less prio) but Linux seems to ignore them. Right now I was building the kernel in the background ...
Kao Dome's user avatar
6 votes
1 answer
9k views

How to sort ps output to find processes realtime priority and identify processess currently occupied running queue

How to properly identify real-time processes currently occupied CPU queue and count them using ps? I know there is a bunch of fileds like prio,rtprio,pri,nice but do not know correct to use. It seems ...
user3417815's user avatar
6 votes
1 answer
518 views

Ways to give a process "idle" network priority

When I'm playing a game, I don't want Dropbox taking hogging my network connection. I have been able to noticeably reduce my latency by turning it off while playing. The same is true to a lesser ...
Nova's user avatar
  • 2,905
5 votes
3 answers
5k views

How to speed up my build

I am doing a build on a Linux machine with Ubuntu 10.04 on it. How can I really speed up my build? I have 4 CPUs and lots of RAM. I already reniced the process group to -20. Is there something else I ...
Ankur Agarwal's user avatar
5 votes
1 answer
18k views

Why highest priority threads are displayed with RT in top and htop?

In the top and htop tools, processes (or/and threads depending on display settings) having the highest realtime priority (99 from the userland API point of view) with either the scheduling policy ...
Manuel Selva's user avatar
  • 3,534
5 votes
3 answers
3k views

Execute and renice a process in one command

Does anyone know if it's possible to execute and renice a process in one command, i.e. without having to look up the command in the list of processes using the ps command and then renice that ...
Mark D's user avatar
  • 1,175
5 votes
1 answer
2k views

SCHED_FIFO and SCHED_OTHER

I was trying to change linux process priority using chrt. I changed priority of one process to SCHED_FIFO from SCHED_OTHER. I could see some improvement in the perfomance. I run linux angstrom ...
Gilson Varghese's user avatar
5 votes
1 answer
1k views

Process priority and cpu speed

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 ...
ctrl-alt-delor's user avatar
4 votes
2 answers
4k views

What makes it possible for a `pulseaudio' process to get the nice level of -11?

I noticed that a pulseaudio process on my Gentoo Linux machine has the nice level of -11. But I don't know how it has gained such a high priority regardless of being owned by a normal user. I know a ...
yuttie's user avatar
  • 86
4 votes
2 answers
1k views

How is process priority calculated?

Can someone explain how "real" process priority (i.e. pri_baz field of ps) is calculated? My guess is: pri_baz = 99 - static_priority # if static_priority > 0 (real-time process) pri_baz = 100 + ...
Jorge Lopez's user avatar
4 votes
2 answers
5k views

How is the real-time priority of a process set by default?

I understand that, for scheduling purposes, Linux processes have a "nice" value and a real-time priority value and that these can be explicitly altered with the nice and chrt commands. If the user ...
Ellen Spertus's user avatar
4 votes
1 answer
2k views

Lower priority thread appears to block higher priority thread? [closed]

I have 2 threads, each set to a different real-time priority using SCHED_FIFO. Thread throttling has been disabled, so theoretically the highest priority thread should be able to use 100% of CPU ...
Echo404's user avatar
  • 113
4 votes
1 answer
2k views

realtime pthread created from non-realtime thread with init.d

I have a piece of C++ code that runs just fine when I run it from a Linux terminal, but which throws an EPERM error when run from a SystemV (init.d) script on bootup. The error comes from a ...
codemonkey851232's user avatar
3 votes
1 answer
2k views

How does Linux handle multiple processes?

I'm new to Linux technologies and bash scripting. For now, I have a simple bash script that extract one subtitle track from a given MKV using mkvextract. I was wondering: if multiple users were ...
Crescendolls's user avatar
3 votes
1 answer
1k views

set default process and IO priority on Linux for given application/executable

Is it possible to set up some sort of default process and IO priority for given application/executable? I am thinking some sort of FS extended attribute or loadable "policy" of sort?
wilx's user avatar
  • 598
3 votes
1 answer
10k views

Change init scripts priority

I'm running a raspbian (based on debian). I want to change the priority of the init services so the very first script which is run by init is one made for me. How can I do it? On runlevel S I have ...
aleixrocks's user avatar
3 votes
1 answer
1k views

How does the kernel assign the nice value to a process after it has been executed?

The Linux kernel implements two separate priority ranges. The first is the nice value, a number from –20 to +19 with a default of 0. Nice values are the standard priority range used in all Unix ...
Luigi Capogrosso's user avatar
3 votes
0 answers
229 views

How do I flag a process to avoid hyperthreading (SMT)?

Suppose I have an 18 core CPU with SMT enabled, and there are 18 long runnning processes, all using ~100% of a thread. If I start a 19th process, the kernel will schedule it to run on one of the cores,...
uLoop's user avatar
  • 141
3 votes
0 answers
426 views

macOS: nice/renice not working -- no actual effect on cputime?

Although I can see a "nice" value ("NI") via ps, it seems to have no effect on the actual cpu-time used by a process: PID %CPU PRI NI COMM 57081 77.6 12 10 cpu-chew 57080 77.1 12 0 cpu-chew ...
not-just-yeti's user avatar
3 votes
3 answers
2k views

Is there a way to make your process use less CPU?

I want my device to use less CPU to save battery. I have a program that uses a large amount of it. nice won't help as all it does is change scheduling when CPU is at %100, while I don't want it to get ...
John's user avatar
  • 249
2 votes
1 answer
4k views

How to change order to process priority on top command?

I have the below output from top command. Where is the process priority of the processes? Mem: 678048K used, 336240K free, 0K shrd, 4K buff, 523012K cached CPU: 0.5% usr 26.1% sys 0.0% nic 72.9% ...
Ravi's user avatar
  • 759
2 votes
2 answers
192 views

nftables priority filter: what does this mean?

The nftables wiki explains the priorities here. Clearly, the priority is a numeric value like -10, 0 or 10. The Red Hat nftables documentation does the same. Priorities remain numeric in the examples ...
CeSinge's user avatar
  • 53
2 votes
1 answer
761 views

Among these two in my ps output, which real-time process will be preempted over the other by linux?

I have got some idea from: https://stackoverflow.com/questions/8887531/which-real-time-priority-is-the-highest-priority-in-linux about how the real time priority values assigned to different ...
explorest's user avatar
  • 552
2 votes
0 answers
232 views

Slurm multifactor priority - how to configure Slurm to consider past usage?

I'm trying to configure our Slurm to allocate users' jobs according to past usage. The goal is to have the job priority consider past time usage of mainly GPUs. I understand I must use the FairShare ...
itay1itzhak's user avatar
2 votes
0 answers
810 views

Is pulseaudio's default nice value (-11) actually ineffective due to autogroup?

The pulseaudio daemon runs with nice level -11 by default, via rtkit. However, I'm noticing choppy audio at times of high cpu load, and decreasing the nice value even further by setting high-priority ...
Marc.2377's user avatar
  • 1,102
2 votes
0 answers
48 views

Incorrect Top? or manpage?

According to top's manpage: 16. PR -- Priority The scheduling priority of the task. If you see `rt' in this field, it means the task is running under real time scheduling priority. ...
HCSF's user avatar
  • 213
2 votes
0 answers
853 views

Suddenly I see a lot of involuntary context switches for multi threaded app

I have a multi-threaded app, with 4 worker threads that until recently performed very well on my 4-core CPU. The system is running Ubuntu 16.04.3 LTS. Today I updated my OS with sudo apt-get dist-...
Bram's user avatar
  • 899