Questions tagged [nice]
A tool to change the priority of a process, giving it more or less CPU time.
121 questions
0 votes
3 answers
266 views
In Linux how do I wrap an executable in a script so arguments and output work as the original executable expects?
Say I have an executable 'foo' and it is typically called with arguments, for example "foo -a1 v1". And 'foo' happens to be a resource hog, so I want to run something like "nice -n 10 ...
7 votes
2 answers
423 views
How can I find location of PRI in /proc
I have sshd with PID of 1957: mohsen@debian:~$ ps ax -o pid,nice,pri,cmd |grep 1957 1957 -2 21 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups According to above, my nice number is -2 ...
3 votes
0 answers
85 views
Implement a recovery virtual console for a hanged system
This might be a duplicate of "reserve memory for a set of processes", but I think my question is a little broader. I have a system that likes to hang a lot. I tend to use a lot of browser ...
5 votes
1 answer
140 views
How to make "nice" more effective?
It seems that the nice tool isn't as effective as I'd like it to be. I'd expected that if I run some CPU hungry program with nice level 19 (but using all CPU cores), then the kernel would still give ...
0 votes
1 answer
878 views
Set highest CPU and IO priority for a systemd service
How to set CPU and IO priority for a systemd service? In partucular, how to set the highest values? (Assume that the service is idling most of the time and will absolutely NOT clog the rest of the ...
0 votes
0 answers
218 views
System starts to freeze when copying large amounts of data
OS is Debian 12. Got a brand new disk to use as a backup for a disk currently in use. For the initial rsync, my system starts to lag and freeze for maybe half a second at a time. This is especially ...
0 votes
1 answer
249 views
How is the default nice value of a user's processes implemented in Ubuntu server 22.04.4 LTS
I've noticed that all services and processes with my user in Ubuntu Server 22.04.4 LTS have a nice value of 19. I connect to the server through ssh, and my ssh sessions also have a nice value of 19. I ...
11 votes
1 answer
3k views
Why does `nice` with a negative argument (e.g. `nice -15`) increment niceness?
My nice is from GNU coreutils 9.1. I observed that nice -15 is equivalent to nice -n 15: nice # prints 0 for me, the base niceness is 0 nice -n 15 nice # prints 15, this is ...
0 votes
1 answer
92 views
Relationship between number of cores and ability to run processes with higher nice values?
When I "flood" my CPU with 8 high priority (nice=-20) OS threads (the number of cores I have), operation becomes "halty" for obvious reasons, but is still usable. Note that when I ...
0 votes
3 answers
465 views
How do I automatically "nice" particular users' jobs?
If I have server users who often forget to use the 'nice' command for their jobs on a web server, is it possible to change a setting so that the default priority for everything they launch is slightly ...
2 votes
1 answer
1k views
How to set process to the lowest possible priority on Linux?
I want to set the process to the lowest possible scheduling on Linux. I came up with the following: nice -n 39 ionice -c 3 chrt -i 0 command Are there also other settings that one can set for a ...
2 votes
0 answers
118 views
System unresponsive even when running command with nice
Debian 10. I am trying to render with blender in the background, like so: nice -n 19 blender -b --python my_script.py This renders to a file using the GPU. When rendering, I can see GPU usage spike ...
0 votes
1 answer
325 views
How do I launch Firefox with a negative nice value as a regular user? [duplicate]
I did this sudo nice -n -1 firefox to launch Firefox with higher priority and make all subprocesses that are executed at launch inherit that priority but it failed with an error message about Firefox ...
0 votes
1 answer
621 views
How is nice/renice supposed to work? Am I misunderstanding?
I run two extremely CPU-heavy (but not memory or I/O heavy) task on my Macbook Pro with 12 cores. This made the computer unusable for other tasks. I therefore reniced these processes to 20 and set ...
0 votes
1 answer
2k views
How to nice/renice all the future processes of a user
One of my server's users needs to launch CPU and I/O intensive jobs that are also quickly done (usually less than 30 seconds). They can be started by a user’s cron, a user’s shell or even Apache, PHP ...