Use for questions concerning the Linux/Unix nice program, or the related renice or ionice programs, used for controlling process priority. For questions concerning the NICE Media Player, use the [nice-media-player] tag.
Questions tagged [nice]
25 questions
9
votes
2 answers
Set niceness value in a systemd user service
I'd like to start xcape with a nice value of -20 as non-root. However setting a nice value of -20 requires root permissions. So I was wondering whether this is somehow possible.
I also tried to create a system service and setting User=myuser, but…
Liblor
- 261
8
votes
1 answer
nice has no effect in Linux unless the same shell is used
If I enter in two different root terminals:
nice -n 19 burnK7 &
and
nice -n -19 burnK7 &
Then both processes receive about 50% of the available CPU time - not expected and certainly not desired.
If I run in the same root terminal:
nice -n 19…
Fela Maslen
- 449
8
votes
3 answers
Does the Linux 'nice' command work on any shell script?
Does nice work on any shell script, or does it work on basic Linux commands only?
For example, if I have a custom shell script that contains a sort function, and I call
nice myscript.sh
would the nice scheduling priority apply to sort in the…
Junba Tester
6
votes
1 answer
Nice commands in a .sh script for cron jobs
I have a php script that I need to run on shared webhosting.
I have created a cron job that executes an sh script. The command in my crontab is:
/bin/sh /home/user/script.sh
I'm assuming it is Bourne Shell (or something compatible). The script…
xlordvader
- 83
6
votes
2 answers
limit priority/threads for Gradle/Android Studio builds?
When Android Studio builds my project, it easily eats up all my 8 cores. I'd like to be able to fluently browse the internet while my app is compiling. Is there a way I can set Gradle's java processes to have a low priority (nice level > 10)?
That…
quezak
- 243
4
votes
3 answers
How do I elevate the priority of a process without giving that process superuser rights?
I have a high priority service that I start with sudo nice -n -10 process. This process does not need superuser rights though, except for the priority elevation. But nice requires superuser privileges to elevate priority.
How do I run a process with…
Myrddin Emrys
- 2,440
3
votes
1 answer
Tell 'nice' to stop +19 processes if load >= 1
I've noticed my computer gets sluggish when the load increases past 1
(ie, the first number after "load average:" from the "uptime" command).
Heavy-duty processes (like rsync) often raise the load above 1, even
if I renice them lowest priority…
Barry Carter
- 271
3
votes
4 answers
ALWAYS run commands with low priority on unix?
I am not asking how to nice and renice a command on UNIX.
What happens is that on a particular machine into which I frequently log I am only allowed to run long-running processes with low priority (nice 19). Is there a way for all my commands on…
laramichaels
- 719
2
votes
1 answer
Cron job not abiding by the nice command
I got a script that backs up minecraft worlds, when ran by command (nice -19 ./backup.sh) it doesn't lag what so ever, server load stays low. When I try to do nice -19 ./backup.sh in a cronjob, it doesn't "nice" it and it uses a high amount of…
user2142183
2
votes
2 answers
Remember the nice value in Linux
On Linux, how to make the processes remember their nice between starts ?
For XP+ you can use Prio to remember the priority and also the IO priority on VISTA+. However, on Linux, and only for running via terminal, I've had to create a command in…
rautamiekka
- 415
2
votes
1 answer
What is the purpose of 'nice' command without a niceness parameter?
I often see this code in anacrontab samples on the internet:
# environment variables
SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
RANDOM_DELAY=30
# Anacron jobs will start between 6am and 8am.
START_HOURS_RANGE=6-8
# delay will be 5…
thierrybo
- 71
1
vote
1 answer
Too many processes have realtime or -20 niceness
For some reason a lot of my processes are real-time and and keep making my audio lag. Are these supposed to be real-time? I tried both a hard reboot and soft reboot, I even restarted pulse but to no avail.
linuxrules94
- 133
1
vote
1 answer
'nice' does not work, even when using 'sudo'. "Permission Denied"
I am attempting to set the priority on an application to be higher, but I keep getting 'permission denied' when attempting to do som even as the superuser.
From the Terminal:
Alexandsteins-Macbook:~ alexanderstein$ sudo nice -n -10…
Alexandstein
1
vote
0 answers
how to prioritize windows process to WSL tasks?
I have a Windows OS, with a WSL installed. I am running some computation heavy processes in WSL, written in Fortran, submit using nohup, which usually takes 10 hours to complete a task.
I wanted to simultaneously submit, say 30 tasks. But I want to…
Raymond Chen
- 11
- 2
0
votes
1 answer
rtorrent with Seeds and Downloads
I'm using rtorrent for a very long time. I'm fan. This is one of the greatest console torrent manager ever.
However, I can't found cool way to keep seeding.
My downloads separated into two directories, Downloads and Seeds. From time to time I'm…