Skip to main content
24 votes
Accepted

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

Changing the priority of a process only determines how often this process will run when other processes are competing for CPU time. It has no impact when the process is the only one using CPU time. A ...
Gilles 'SO- stop being evil''s user avatar
16 votes
Accepted

What is swap priority and why does it matter

man 2 swapon describes priorities thus: Each swap area has a priority, either high or low. The default priority is low. Within the low-priority areas, newer areas are even lower priority than older ...
Stephen Kitt's user avatar
15 votes

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

I have found this could be done by modifying the file /etc/security/limits.conf (at least on some linux distros). In my case, I simply added: #<domain> <type> <item> <value&...
guyik's user avatar
  • 151
6 votes
Accepted

How is process priority calculated?

In ps’s output, pri_baz is calculated as pp->priority + 100, and pp->priority is the prio value from the kernel. This is described as Priority of a process goes from 0..MAX_PRIO-1, valid RT ...
Stephen Kitt's user avatar
6 votes

How does Linux handle multiple processes?

This is a job for process scheduler (also, see this). Generally, when you use any command, one can say(without going into too much detail) that you ask Linux kernel(think OS) to create a separate ...
MatthewRock's user avatar
  • 7,016
5 votes
Accepted

Does Linux Change a Process Niceness Automatically?

To my knowledge, the Linux kernel does not change the niceness of a process, and I fail to see why it would since it doesn't have to to lower the priority of a process. The niceness is an information ...
xhienne's user avatar
  • 17.9k
4 votes
Accepted

How to change order to process priority on top command?

It is called the nice value, and is shown by default in some of the configurations of top. If it is not showing by default, you can do the following Execute top Press f Navigate to the line beginning ...
Weijun Zhou's user avatar
  • 3,418
3 votes

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

If you have a cut-down Linux distribution where ps and top does not give you priority information, you can parse the stat file of proc for your process ID to get the priority information. cat /proc/...
Razan Paul's user avatar
3 votes
Accepted

SCHED_FIFO and SCHED_OTHER

As explained in sched_setscheduler(2), SCHED_FIFO is RT-priority, meaning that it will preempt any and all SCHED_OTHER (ie. "normal") tasks if it decides it wants to do something. So, you should be ...
Matija Nalis's user avatar
  • 3,166
2 votes
Accepted

How does ionice work with multiple drives?

On Linux, drives are scheduled independently from each other. You can even set the IO scheduling algorithm to be different for different drives on the same system, by writing to /sys/block/<device&...
stribika's user avatar
  • 5,514
2 votes
Accepted

Job Priority in Batch Jobs

Well if you want to have the control of priority using a standard user you will need to reduce the priority of the less important scripts, so the most important will run faster. For example: ...
Luciano Andress Martini's user avatar
2 votes

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

Using renice on a Linux program will not burn up your CPU, but it will not necessarily do what you want it to do. Priorities have nothing to do with how fast a CPU executes code. It executes code ...
Cort Ammon's user avatar
2 votes

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

Are you talking about altering the amount of CPU demand while it's running the thread? Modern CPU's actually use extremely rapid speed stepping. For example if you did analysis of the clocking of an ...
bitofagoob's user avatar
  • 1,425
2 votes
Accepted

Lower priority thread appears to block higher priority thread?

In our Linux system, without our application running, the "ktimersoftd" thread is the highest priority, with a real-time priority of 1. However, our application, along with the third-party-libraries ...
Echo404's user avatar
  • 113
2 votes

Assign a higher priority to a specific process by default

There is a program called "auto nice daemon" which does this. It runs in the background, and when a process matching a particular pattern appears in the process table, it sets its niceness ...
mattdm's user avatar
  • 40.4k
2 votes

OpenBSD threads priorities

In unistd.h on OpenBSD, both _POSIX_PRIORITY_SCHEDULING and _POSIX_THREAD_PRIORITY_SCHEDULING are set to -1, indicating that both the Process Scheduling and Thread Execution Scheduling option are not ...
Pim's user avatar
  • 136
2 votes
Accepted

Changing CPU affinity on they fly has no result

It won't work for multithreaded applications - try adding -a to the list of arguments. -a, --all-tasks Set or retrieve the CPU affinity of all the tasks (threads) for a given PID.
Artem S. Tashkinov's user avatar
2 votes
Accepted

How to prioritize packages installed from files in APT?

The tool you are looking for to complete your task is apt-mark. Use the following command to mark a manually installed [Package] to prevent apt from updating it. apt-mark hold [Package] The command ...
kemotep's user avatar
  • 5,300
1 vote
Accepted

SCHED_RR and SCHED_FIFO only work on "prempt kernal"?

SCHED_FIFO and SCHED_RR are supported on the standard Linux kernel, the PREEMPT_RT patches aren’t required. See the sched(7) manpage for details of the kernel’s scheduling policies. The PREEMPT_RT ...
Stephen Kitt's user avatar
1 vote

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

There is no a silver formula which tells you exactly the numbers behind. It all depends on particular implementation on kernel scheduler side. If you're interested in details, you can check priority ...
rush's user avatar
  • 27.6k
1 vote

How is process priority calculated?

I am new to this (not an expert). I see 0 and 139, this suggests a range of at least 140. I see you setting real time priority to 1 and 99, but see it reported as 0 and 98. I see the nice of a range ...
ctrl-alt-delor's user avatar
1 vote

There is a high priority keys combination for the opening terminal in Linux if UI is hanging on?

If your XServer hangs, you may try using the Magic SysRq key combination to detach keyboard control from X. ALT + SysRq + R If not printed on your Keyboard: SysRq is on the Print Screen button. ...
FelixJN's user avatar
  • 13.6k
1 vote
Accepted

Is it recommended to use param.sched_priority in Linux FIFO during thread creation?

Linux real time is not an emulation, there are system calls affecting scheduling. See man sched(7). It's not clear from your question what you are trying to do and what your exact problem is. The ...
Johan Myréen's user avatar
1 vote
Accepted

Beside username and password, what information are involved in permission management of journal filesystem?

UNIX file permission metadata which is stored by any of the file systems you mentioned usually as extended attributes is stored as a numeric ID not as a name. The file system driver is aware of file ...
jdwolf's user avatar
  • 5,057
1 vote

Custom priority value: is a pthread high sched prio positive or negative?

I take it you’re looking for a portable answer, but a good start to understand this is to look at the behaviour on Linux, as documented in the manpage for sched(7), in the “Scheduling policies” ...
Stephen Kitt's user avatar
1 vote

Assign a higher priority to a specific process by default

you'll want to look into the nice and renice utilities. To give your process a higher CPU priority you have to have root/sudo privileges. You can either use nice to start the process with a higher ...
TopHat's user avatar
  • 346
1 vote
Accepted

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

The answer seems to have been to put the following in my init.d script, which I put just before the start-stop-daemon calls in do_start: ulimit -r ## (where ## is a sufficiently high number; 99 works)...
codemonkey851232's user avatar
1 vote

User-based GPU priority

I "kind of" know a little bit about this due to running both a Plex server and a ML instance on the same bare metal server a few years back. CUDA 5.5 added the option to set stream priories at the ...
calebtipton's user avatar
1 vote

Run Linux process at very very low priority?

For future-comers, here is a full example of nice with stress. The test machine has 2 CPUs $ lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian ...
Shadi's user avatar
  • 129

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