A tool to change the priority of a process, giving it more or less CPU time.
Questions tagged [nice]
47 questions
22
votes
2 answers
Prioritise ssh logins (nice)
Is there a preferred way to set "nice" for sshd?
I need priority given to sshd such that I can login and easily fix stuff when something has gone wrong (eg DoS, badly behaved processes, etc)
s29
- 338
- 2
- 6
17
votes
1 answer
Change nice level of currently running script
I would like to change the nice level of the currently running script:
#!/bin/bash
nice_it ( ) {
nice
ps -o "%p %r %y %x %n %c %a"
}
nice_it
That does not work, since nice tries to change the nice level of the command started by it.
Is it…
blueFast
- 4,000
- 13
- 36
- 51
11
votes
3 answers
Setting default nice value for a program on linux
Strange as it seems, I can't find information how I can set a default nice value for a program (not for a user or a group!). I would like to start all chrome and firefox instances with a nice value of 10. What would be the most appropriate solution?
helcim
- 273
- 1
- 5
- 13
11
votes
2 answers
Equivalent of `nice` for filesystem IO?
When I'm running an rsync backup job which involves copying over large files, the machine running the backup (both Mac desktops and Linux servers) grinds to a halt and the load average goes through the roof.
I've tried:
niceing the rsync process…
David Wolever
- 2,237
- 3
- 23
- 27
10
votes
3 answers
Renice: How to change all threads?
When I renice a multithreaded process in Ubuntu 10.04, then view the results in top, it seems that only the main thread actually gets reniced. All the other threads retain their old nice value. What's the easiest way to renice all threads in a…
dsimcha
- 661
- 1
- 6
- 12
9
votes
1 answer
Use cases for having different process priority for CPU and IO?
Linux processes can have different CPU and IO priority (nice and ionice).
Why is there a need to have different CPU and IO priority?
Is there any real world usage for having them different?
What real world use cases have you found that need…
Eduardo
- 205
- 2
- 7
8
votes
2 answers
how to *start* a process with a high priority
Notes:
1. by lower priority I mean that the priority number is lower.
2. Distro is RHE
I want to start a daemon with lower than normal priority (ie. say 18 rather than 20) so it will get cpu first in the case of contention.
nice runs commands…
Russell Fulton
- 159
- 1
- 2
- 14
7
votes
2 answers
nice, ionice are not enough
I have a script that starts big, CPU and memory consuming tree of processes. There is Python and executables down there, but everything starts with single bash script and python subprocesses.
During the execution, rest of system is completely…
MateuszL
- 185
- 1
- 5
7
votes
3 answers
Using nice scheduling priority with tar/gzip cron script
I do large backups that put huge strains on my server when using tar/gzip. I've got the task setup as a cronjob which accesses my script that handles the backup. I know that nice might be able to possibly help in this situation, but I'm a bit…
Joe Habadas
- 181
- 1
- 5
7
votes
2 answers
How to set i/o priority for nfs client processes?
The configuration is: A linux server and a nas box (netgear) acting as nfs server.
It is easy for a single process on the linux server to use all i/o bandwidth by simply copying a file from the nfs share to the nfs share. The i/o channel is jammed…
Moritz Both
- 647
- 8
- 17
6
votes
5 answers
Nice level not working on linux
I have some highly floating point intensive processes doing very little I/O. One is called "xspec", which calculates a numerical model and returns a floating point result back to a master process every second (via stdout). It is niced at the 19…
xioxox
- 539
- 5
- 9
5
votes
1 answer
"nice" for memory management
Before the question I give you a bit of background : I am running a website on a VPS. The VPS itselmf runs the apache web server, the PHP code that produce the pages with acvces to a SQLite DB, and runs some background tasks triggered by cron…
Snowangelic
- 161
- 1
- 4
4
votes
2 answers
What is the impact of increasing the httpd process priority (negative nice)?
Renicing a process to a negative nice level increases the process's scheduling priority. High priority processes are run before low-priority processes. They are also allowed to run longer before being pre-empted (they get longer time-slices).
On a…
Daniel S. Sterling
- 1,574
- 2
- 10
- 13
4
votes
3 answers
How do I run Postgres under "nice"?
I usually start Postgres with pg_ctl -D /db start
How can I make it start under "nice", so it runs at a lower priority?
mike
- 3,853
- 11
- 29
- 27
3
votes
3 answers
Is it possible to assign a nice and ionice priority to all scripts executed by cron daemon?
To be a bit more concrete:
I have a Debian Squeeze Linux machine with a web application that should become available all over the planet. Until now I had a bunch of resource consuming cronjobs each night (in Europe) without much impact on regional…
Miguel ZP
- 31
- 1
- 2