Questions tagged [nice]

A tool to change the priority of a process, giving it more or less CPU time.

Filter by
Sorted by
Tagged with
0 votes
3 answers
47 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 ...
mirams's user avatar
  • 103
2 votes
1 answer
216 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 ...
KamilCuk's user avatar
  • 850
2 votes
0 answers
59 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 ...
cat pants's user avatar
  • 753
0 votes
1 answer
126 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 ...
d-b's user avatar
  • 1,713
0 votes
1 answer
111 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 ...
d-b's user avatar
  • 1,713
0 votes
1 answer
378 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 ...
Max13's user avatar
  • 172
0 votes
0 answers
93 views

Renicing X server and compositing manager (kwin-like) on a linux_kernel desktop

Long time ago (pre-2.6 kernels) on a very low end desktop, I had been happily following Con Kolivas suggestion to (quite heavily (-10)) renice the X server. (for better responsiveness) With newer ...
MC68020's user avatar
  • 6,359
1 vote
0 answers
147 views

Scheduling difference manual execution vs Slurm srun/sbatch

tl;dr A CPU intensive workload ignores the nice values of other processes only when started via Slurm sbatch/srun (not when manually started). I am running a systemd service which periodically gathers ...
ntippman's user avatar
-2 votes
3 answers
352 views

Filter processes by name and nice number

I'm trying to create a script to find the PID number with only the process name and nice number, but I'm not able to.
ranger1972's user avatar
1 vote
0 answers
113 views

Use the GPU on another process when it is available(Nice-like command for GPU)

I have a program that uses a lot of GPU power. During some epochs, for example, it takes a job and processes it, and then waits about 10 to 15 minutes before taking the next job. When the main program ...
Shervin Ivari's user avatar
2 votes
2 answers
78 views

Is it possible to not let a process run at 100% processor capacity using nice or other command?

If it is a cryptocoin mining program called minerd, can the command nice -n -20 ./minerd ... make the program run at the lowest priority? But can it let it run at 80% or 50% of the processor's full ...
deeper-understanding's user avatar
3 votes
1 answer
242 views

Is it just me or is the man page for renice ambiguous?

I am considering renicing some processes so that they will remain responsive under heavy load on a server. I read the short man page for renice, and I understand it less each time I re-read it. It ...
Bret Fontecchio's user avatar
1 vote
1 answer
785 views

Using cgroups and nice with respect to the same process - does the order matter? What is the correct syntax?

I created a CGROUP on my desktop called background. The purpose of this group is to run all my sysadmin scripts within its CPU limit of 10%. The group is created on every reboot with the following ...
John Smith's user avatar
8 votes
1 answer
484 views

when piping command, is nice applied to all chain?

Consider the following case nice -10 mysqldump -u crontab -p'readonly' --databases "$1" | gzip > $hour_folder"/"$1"_h"$hour".sql.gz" I aask you if nice is ...
realtebo's user avatar
  • 799
1 vote
0 answers
97 views

Linux shell wrapper to run program with low system resources?

There's nice and renice to lower priority of a process, cpulimit to lets say 30% maximum, taskset to limit to 1 core, ionice. Each of these tools has a different syntax. Specifically cpulimit seems ...
adrelanos's user avatar
  • 1,786
0 votes
2 answers
1k views

Is it possible to set niceness value of a program in advance?

I want my games and certain programs (such as WINE) to be automatically given a higher priority then everything else, and while I'm at it I probably want to adjust the niceness value of a few other ...
Sol33t303's user avatar
  • 113
0 votes
1 answer
396 views

niceness of a background process

Do background process have different nice given? I noticed it is not having the default 0. This might be a problem because it is having less priority.. does anyone know how to change this behavior? I ...
Ykaly's user avatar
  • 73
1 vote
1 answer
766 views

Can I run BOINC using only a little computing power?

I found that I can help find scientific results using BOINC. As I tried, it used so much cpu or memory that my desktop hanged. Is there a way to tell Ubuntu that run BOINC but use at most, say 20% of ...
boincuser's user avatar
-1 votes
1 answer
590 views

auto nice daemon

I know path to parent executable (launcher). I would like to kill all other launchers without child processes (if any). I don't know PID of child process(es). Only kids should have high priority (...
user894319twitter's user avatar
2 votes
0 answers
744 views

Is pulseaudio's default nice value (-11) actually ineffective due to autogroup?

The pulseaudio daemon runs with nice level -11 by default, via rtkit. However, I'm noticing choppy audio at times of high cpu load, and decreasing the nice value even further by setting high-priority ...
Marc.2377's user avatar
  • 1,082
1 vote
0 answers
33 views

What logs can I search to find out which processes used 'nice'?

I had a huge spike, in a plesk server, which brought it down due IO blocking. I see in the Plesk graphs there was a large increase in nice. I think thats normally cron jobs, im thinking also maybe a ...
Brian Thomas's user avatar
3 votes
1 answer
858 views

How to "soft-limit" CPU usage of a process

I have some processes running on Debian that I want to limit cpu of it usage in the "soft" manner. For example, if it eats more than 70% of a single core for more than 15 minutes, the CPU ...
Chieu Nhat Nang's user avatar
0 votes
1 answer
456 views

Is it possible to give a program priority without running as root?

I want to give a program I'm running in linux priority over other programs. I have sudo access and tried using sudo and the nice command. Specifically I ran a bash script file called RUN.sh that has ...
user378159's user avatar
0 votes
0 answers
42 views

Why a long type memory is reserved to nice value in the PCB in Linux?

All right, my question is not sufficiently specific. I've not mentioned the kernel version, the distribution and other potentially interesting things. But, anyway... these are important but doesn't ...
Daniel Bandeira's user avatar
2 votes
1 answer
954 views

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

The Linux kernel implements two separate priority ranges. The first is the nice value, a number from –20 to +19 with a default of 0. Nice values are the standard priority range used in all Unix ...
Luigi Capogrosso's user avatar
2 votes
1 answer
4k views

The `PRI` column of `ps` is inconsistent with man pages

UPDATE: My undestanding was correct and the man page of ps has been updated to now state the following for the PRI column: "priority of the process. Higher number means higher priority." I'...
kikones34's user avatar
  • 123
1 vote
1 answer
208 views

Process state characterization in output of ps command

The ps command shows the state of the process (e.g. Sleeping, Running etc) as also some additional info about. Among two of these additional options according to the man page are < high-...
pkaramol's user avatar
  • 2,637
-1 votes
2 answers
59 views

Why can't I `nice` a command group?

[fakename]$ nice yes a>/dev/null & [1] 26475 [fakename]$ ps -p 26475 -o nice,pid NI PID 10 26475 [fakename]$ nice { yes a>/dev/null; } & -bash: syntax error near unexpected token `}' ...
extremeaxe5's user avatar
  • 1,143
0 votes
0 answers
37 views

`renice` seems to have no effect on CPU usage on Mac 10.13.4 [duplicate]

I am trying to test out the renice command on my Mac, it seems to be having no effect. This is how I'm testing it: I have a dual core CPU with hyper threading, so I run 6 instances of node -e 'while(...
Dylanthepiguy's user avatar
1 vote
1 answer
880 views

macOS 10.13.4 - `renice` seems to have no effect

I am trying to test out the renice command on my Mac, it seems to be having no effect. This is how I'm testing it: I have a dual core CPU with hyper threading, so I run 6 instances of node -e 'while(1)...
Dylanthepiguy's user avatar
1 vote
0 answers
76 views

Nice does not affect utilization?

I am learning about the CFS in Linux. So i decided to see how the nice value can give a lower priority for background (i.e. nice) processes. I ran two CPU processes: taskset 01 python3 loop.py in two ...
garyF's user avatar
  • 111
5 votes
2 answers
3k views

Should I set nice value lower for a user process to make it faster?

I recently learned about the nice value of a process. If I am running a user program, should I set the nice value as low as possible and would that make my process run faster?
Nagri's user avatar
  • 215
1 vote
0 answers
244 views

Automatic nice value?

I noticed that a process - here sort - has been scheduled with a higher nice value (2) - meaning lower priority. But what is the policy for deciding that? Also, it seems to be a rare event, as all ...
miku's user avatar
  • 673
1 vote
1 answer
502 views

Is there a guideline for setting nice values?

I would like to develop an app and want to come up a nice value for my daemon process. but I found no guideline for this. Some articles say that backup tasks should have higher nice value (which ...
johnlinp's user avatar
  • 235
5 votes
0 answers
1k views

Linux / CFS: How do cgroupsv1 cpu.share / cgroupsv2 cpu.weight and nice process weights interact

I was wondering how cgroup cpu shares/weights (v1: cpu.shares or v2: cpu.weight) and the niceness value of a task do interact in Linux with the CFS (Completely Fair Scheduler). Both values have an ...
Till Schäfer's user avatar
3 votes
1 answer
1k views

Process Priority value is different in procfs

For example, let's examine the value of PRI of firefox with ps, and then see what is the value stored in procfs. $ ps -o pid,comm,pri,ni 7000 PID COMMAND PRI NI 7000 firefox 19 ...
Amine Marzouki's user avatar
0 votes
2 answers
164 views

Linux - Process get as much resources as possible but give out resources when other processes coming in

I need to run a process A as much resources as possible when the machine is free, but gives out CPU once there's high-priority processes are started. Any suggestions? Thanks!
KAs's user avatar
  • 205
9 votes
2 answers
887 views

What is the nicest a Unix command can be?

For a quick benchmarking test, how can nice and ionice be combined to maximum effect, ie for a command to use as little resource as possible (without idling altogether)? (I think it's something like `...
mahemoff's user avatar
  • 802
2 votes
0 answers
690 views

Does it make sense to combine chrt and nice?

I want a CPU-intensive process to have the lowest possible impact on other processes. I can use nice -19 for maximum niceness and chrt -i 0 to give the process a SCHED_IDLE priority. Which is more ...
kontextify's user avatar
18 votes
2 answers
8k views

nice and ionice: which one should come first?

I need to run some long and heavy commands, but at the same time, I'd like to keep my desktop system responsive. Examples: btrfs deduplication, btrfs balance, etc. I don't mind if such commands take ...
user avatar
3 votes
0 answers
409 views

macOS: nice/renice not working -- no actual effect on cputime?

Although I can see a "nice" value ("NI") via ps, it seems to have no effect on the actual cpu-time used by a process: PID %CPU PRI NI COMM 57081 77.6 12 10 cpu-chew 57080 77.1 12 0 cpu-chew ...
not-just-yeti's user avatar
1 vote
1 answer
2k views

renice doesn't work in macOS Sierra

I wanted set low priority to HandBrake in macOS. I tried to use renice command by pid, but it seems not working. (nice value stays 0) % ps ax -l | grep Hand 501 32255 1 0 46 0 3433240 ...
ironsand's user avatar
  • 5,105
0 votes
2 answers
983 views

Centos 7 - renice all threads created by a python script

I'm running Centos 7 and Python 3.6. I have a python script that uses multi-treading. I want to renice or change the niceness value for all of the treads the script spawns. At present, I am able ...
Mark Smith's user avatar
1 vote
1 answer
1k views

How does one "nice" a PID via htop after the process has begun?

Let's say I'm running a multicore process. How do I "nice" this via htop after submission?
ShanZhengYang's user avatar
1 vote
1 answer
3k views

What does "/bin/sh -c nice run-parts --report /etc/cron.daily" mean?

Today, when I logged in and checked the ps output, I noticed a few lines that were run automatically under the root. I grepped the relevant lines here: root 1126 0.0 0.0 2616 424 ? ...
xralf's user avatar
  • 16.3k
2 votes
1 answer
473 views

Linux nice command

When I try to assign the nice value to a program for example: nice -n -7 waffles It will not allow me to run the program in the background as well with the bg command. Is there a way I can pipe ...
Mason's user avatar
  • 23
7 votes
2 answers
3k views

Assign a higher priority to a specific process by default

I would like to configure my desktop Linux system so that whenever I start running a specific program (run that processes of this program) the respective process gets assigned a high priority. How to ...
ingli's user avatar
  • 1,675
3 votes
1 answer
2k views

Nice: *Low* priority using *more* CPU

(Ubuntu 14.04 server, 8 cores, 16GB RAM) When running 3 scripts in parallel that utilise the same (other) script, the inverse of what I expect to happen occurs when "renice-ing" the processes as they ...
csey's user avatar
  • 41
10 votes
2 answers
10k views

Difference between nice level and systemctl CPUShares property

As I understand it (please correct me if I'm wrong), systemctl set-property ... CPUShares=some_value limits the cpu time for an entire cgroup unit. If we instead want to limit cpu time for a process ...
embedded_crysis's user avatar
22 votes
2 answers
17k views

Using and understanding systemd scheduling-related options in a desktop context

In systemd service files, one can set the following scheduling related options (from the systemd.exec man page, correct me if I'm wrong): Nice Sets the default nice level (scheduling ...
equaeghe's user avatar
  • 554