Questions tagged [nice]

Nice or niceness refers to the priority of a running process; i.e. how much CPU time it can receive when required. Niceness ranges from -20 (the highest priority) to 20 (the lowest priority).

40 questions
162
votes
3 answers

Process 'niceness' vs. 'priority'

When running top, I can see this (shortened) example output: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 4586 ipc-adm+ 20 0 1303900 605152 92844 S 30,6 29,3 3:52.88 firefox 3985 ipc-adm+ 20 0 258588…
Byte Commander
  • 110,243
107
votes
7 answers

Change niceness (priority) of a running process

Is it possible to set a new nice level of a running process with a known id? Does this operation require root access, or just being the owner of the process?
Adam Matan
  • 12,919
48
votes
4 answers

How to check my niceness?

Is there any way to check my nice lvl? I did try with ps, but for some reason the output does not show the column NI which is meant to show the lvl priority if I'm not wrong. ps -fl -c F S UID PID PPID CLS PRI ADDR SZ WCHAN STIME TTY …
sebas
  • 600
12
votes
1 answer

How to prevent my system from becoming unresponsive when thrashing (out of RAM)?

I have 8GB of RAM, but sometimes I'm running a couple VMs and enough Chrome processes to use up most of my memory. That's usually fine, but sometimes my system starts thrashing, and it's difficult for me to recover from it without just waiting for…
Sam King
  • 719
9
votes
1 answer

Does the nice value affect swap?

If the system doesn't have enough RAM for everything, does the kernel take the nice value into account when it decides what to swap out to reduce memory stress?
user8292439
  • 3,878
  • 7
  • 32
  • 57
9
votes
3 answers

How to prevent a process from being killed?

Is there anyway to prevent a process from being killed no matter what? I know about nice but I'm not sure if giving a task such as a long running memory-intensive rake task the highest priority will prevent it from being killed off: nice -n -20 rake…
Simpleton
  • 193
7
votes
1 answer

Why the process priority of Pulseaudio is -11?

Why it so low? Sometime when cpu is high load sound through Pulseaudio becomes choppy. I think this happens because process priority of Pulseaudio has so low value. So why it so low by default if it can cause problems.
7
votes
4 answers

How to change niceness of process by name

Java process is killing my computer (Intel i3, 8GB RAM). It takes over whole CPU and system starts to hang. I was trying to change niceness of java processes but i have to control it for all time and this is not always possible. So for beginning I…
7
votes
3 answers

Nice command without root privileges

I need to run dosemu with nice --20 from script. Problem is: a negative value can be applied only with sudo. Do you know any way to run nice command without sudo or simply run nice --20 dosemu from script?
6
votes
2 answers

How to change "niceness" while perfoming top command?

I know that I can change the niceness using this command: renice [-n] priority [[-p] pid ...] [[-g] pgrp ...] [[-u] user ...] But it would be much more convenient if I could do it while scanning the processes in top.
6
votes
1 answer

What exactly is meant by a "niced" and an "un-niced" user process?

I was using the "top " command and I came across the nice value. I am aware of the priorities and how a nice value indicates the priority of a process. But I can't seem to figure out what the term "niced" or "un-niced" indicates.
Alchemist
  • 203
6
votes
1 answer

Low priority process (nice 19) getting more CPU time than regular process (nice 0)

I have a server running Ubuntu server 14.04 64bit and I am having an "interesting" problem with it. I have 2 users running some programs concurrentlly - d and m. The processes of user "m" are not time critical, and therefore are being run on a…
Stunts
  • 2,262
6
votes
1 answer

How do I provide arguments to a command run from gksudo?

I want to add a shortcut for gnome-system-monitor that runs with root access and has very high priority. My command for the shortcut is: gksudo -k -u root nice --20 gnome-system-monitor But this gives the error: gksudo: unrecognized option…
5
votes
1 answer

why can user increase nice of process but decrease requires root?

I pulled up top and a program was using ~80-90% CPU. I increased the niceness, to see if I could reduce the load. Then I tried to reduce the nice of the same process back to it's initial level and was told I didn't have proper privileges. Is there a…
blanket_cat
  • 1,554
5
votes
0 answers

Nautilus is slow if a lot of images are in a directory

I have 400 images in a directory. I look at the directory with nautilus. The first time I open the directory it is very slow. I have a modern laptop with 4 cores and plenty of RAM. My use case: open directory containing a lot of images press Ctrl++…
guettli
  • 1,765
1
2 3