Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

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
0 answers
18 views

How to permanently change niceness of apache2 process on a Debian server?

I have Debian 11.2 with Apache2. I'd like to change niceness of all of my apache2 processes, or at least mod_wsgi processes, to +5. How can I do it? Adding Nice=5 to /usr/lib/systemd/system/apache2....
user avatar
  • 101
0 votes
1 answer
92 views

Setting nice value of all user processes in realtime based on his CPU usage

In order to balance users CPU consumption on a shared computing server, I would think it very useful if one could: set the nice level for all processes of a user furthermore, adapt this level in ...
user avatar
1 vote
2 answers
232 views

processes running nice +20 still make the system sluggish

if i have a process that i wish to run in the background on all cores, it can make the system extremely sluggish, even running at nice +20. Running out of memory or io is not the issue. Is there any ...
user avatar
  • 255
1 vote
2 answers
241 views

Why is CPU usage somewhat "nicer" today than yesterday?

First post here from an eager learner more educated with front end. Please consider the following munin graph: Considering the general traffic the site on this box got today was the "same" as ...
user avatar
7 votes
2 answers
18k views

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 ...
user avatar
2 votes
3 answers
4k views

How to run docker build at lower priority?

I often have to re-build Docker images, and I do that inside the host I run my containers in. Occasionally I see that this puts considerable pressure on the CPU, so I thought I could run docker build ...
user avatar
  • 249
2 votes
0 answers
237 views

rsync: Maximum nice to keep system responsive

Unfortunately a background rsync reduces the responsiveness of a server. I search a way to have maximum niceness for this background task, to keep the server respond fast. My current wrapper ...
user avatar
  • 2,914
2 votes
1 answer
605 views

Automatic CPU load balancing for program or program group under Linux?

assume the following setup: system (Ubuntu 14.04 LTS) with 40 cores, lots of RAM. Additionally a program which is only partly multithreaded. That is, it constantly switches between running on multiple ...
user avatar
  • 121
1 vote
1 answer
49 views

Get NewRelic to respect ionice'd processes

On our web server, we perform an incremental backup of our files every 4 hours using rsnapshot. To perform the actual copying of files, I've configured it to use a custom script, cp-nice that has the ...
user avatar
  • 329
10 votes
3 answers
4k views

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 ...
user avatar
  • 263
0 votes
1 answer
2k views

How to configure the niceness or priority of service started on boot

I want to increase the niceness of an service (decrease the CPU priority) started as an dedicated user or group during the boot process. I'm not able to define the niceness or priority in the /etc/...
user avatar
  • 1
7 votes
2 answers
6k views

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 ...
user avatar
  • 185
7 votes
3 answers
7k views

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 ...
user avatar
2 votes
2 answers
270 views

getting an application to run with the same priority as cpu idle

I have a solaris server that needs to run a timecritical application as fast as possible, although setting it to the RT priority class doesnt seem like a good idea since it may need 100 CPU for ...
user avatar
  • 255
1 vote
1 answer
3k views

MySQL 5.6.21 on Debian 7.7 -- nice is automatically set to 19 several seconds after starting it up; can't figure out why

I'm running MySQL 5.6.21 on an OpenVZ VPS with Debian 7.7. MySQL is installed from the DotDeb repository (full version number is 5.6.21-1~dotdeb.1). Whenever the MySQL server is started or restarted, ...
user avatar
1 vote
1 answer
285 views

init process' nice level

The init process on a Debian server (VPS) I've inherited has its nice value set to +10. There's nothing particularly obscure installed on the system. It has a LAMP stack and does a lot of IO and will ...
user avatar
  • 111
0 votes
0 answers
350 views

Logstash from RPM fails to run under nice command

I downloaded the Logstash RPM logtsash-1.4.2-1_2c0f5a1.noarch from the official site, but have been having problems getting it to run from the init script. I get no log data passed to Elasticsearch/...
user avatar
  • 449
0 votes
0 answers
426 views

How to Prioritise ssh logins (nice)

Exact duplicate of this question, which has an accepted answer that doesn't solve the problem. How do I set sshd to run with a higher priority, so that even if the system is massively overloaded (e.g....
user avatar
  • 523
1 vote
0 answers
1k views

How do I allow www-data to (negatively) change the niceness of a process in Linux?

So I'm running a website using django and sometimes I call scripts located on the server by spawning a subprocess in python. When looking at the processes with "top" I see these are called under the ...
user avatar
1 vote
1 answer
302 views

nice command - are other commands executed with script also niced?

A quick question about how nice works. Say if I have a script that runs in the crontab like so 0 4 * * * nice -n 19 /usr/local/admin/script.pl It is set to the lowest priority. This script will ...
user avatar
  • 581
1 vote
1 answer
1k views

Why are my "nice" levels not reflected in CPU usage? [duplicate]

Given a VM with 1 CPU. I run two similar CPU intensive tasks in two terminals: /usr/bin/nice -n -20 perl -e 'while(1){$a=1+1;}' /usr/bin/nice -n 19 perl -e 'while(1){$a=1+1;}' I would expect that ...
user avatar
  • 2,622
3 votes
3 answers
3k views

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 ...
user avatar
3 votes
1 answer
3k views

Changing priorities of background vs foreground processes?

The commends nice/renice have no effect between processes started as foreground process and processes started as background processes. Even with maximum niceness on the foreground processes they get ...
user avatar
  • 189
17 votes
1 answer
5k views

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 ...
user avatar
  • 3,900
6 votes
5 answers
5k views

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 ...
user avatar
  • 529
2 votes
1 answer
265 views

slow down processes (cpu usage)

I found out that an imagemagick/convert application on my VPS is causing troubles due to high load on my box. Now i added renice with priority 10 to all of these convert-processes for throttling each ...
user avatar
  • 505
9 votes
1 answer
1k views

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 ...
user avatar
  • 205
1 vote
1 answer
307 views

Guideline for `nice` priority number?

I'd like a more systematic way for prioritizing my tasks with nice(1). Obviously 0 is "normal", 19 is "lowest priority" and -19 is "highest priority", but what about all the other numbers? If I have ...
user avatar
  • 243
22 votes
2 answers
8k views

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)
user avatar
  • 338
5 votes
1 answer
4k views

"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 ...
user avatar
2 votes
1 answer
114 views

nice cpu usage showing, but process wasn't explicitly run with nice

About 25% of my CPU usage is attributed to "nice" which is all coming from one process. The process in question was not started with nice(1) nor was it adjusted with renice(1) -- at least not ...
user avatar
3 votes
1 answer
1k views

Running Hudson builds with a lower process priority

At my office we have an older server running Hudson (1.395) and a collection of other things (JIRA and SVN being the important two). When Husdon is running builds, the slowdown on the server is very ...
user avatar
  • 165
4 votes
2 answers
2k views

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 ...
user avatar
1 vote
1 answer
290 views

Process niceness value

I was just looking for some clarification about the niceness value of a process, or perhaps some advice if I'm going about this all wrong. Say I have a couple dozen web server processes on a single ...
user avatar
  • 123
2 votes
2 answers
1k views

ionice process group?

Is there an easy way to change the I/O priority of a whole group of processes the way renice -g does? It seems like only changing the I/O priority of a single process is supported by ionice. If this ...
user avatar
  • 661
10 votes
3 answers
4k views

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'...
user avatar
  • 661
0 votes
2 answers
176 views

Linux Host: Background Jobs + VM + Prioritization?

I'm running a setup consisting of a Linux host OS and a Windows 7 guest (VMware Workstation). I'm trying to run 16 CPU-bound background jobs on the Linux host at nice values of 19 (the lowest ...
user avatar
  • 661
7 votes
2 answers
3k views

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 ...
user avatar
3 votes
1 answer
201 views

How "nice" determines amount of cpu resource to give

Is there a particular formula to calculate the amount of cpu resources that is allocated for a process when you "nice" it?
user avatar
  • 631
2 votes
3 answers
4k views

nice renice and ionice

I've read about nice renice and ionice to control the scheduling priority of running processes. However, I still don't understand when and how are they useful for. For instance doing something like: ...
user avatar
1 vote
3 answers
2k views

Limiting maximum cpu time for user-launched programs

We have a cluster running CentOS with Sun Grid Engine for research simulations. However, some users who aren't too familiar with the system end up running jobs on the head node, which of of course ...
user avatar
  • 113
4 votes
3 answers
2k views

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?
user avatar
  • 3,793
1 vote
1 answer
3k views

What's the effect of the nice param in the mysqld_safe settings

We have a server that only runs MySQL. I'm trying to increase its performance to the maximum, and I was wondering whether changing the nice setting in my.cnf would have any favorable effect. Anyone?
user avatar
0 votes
2 answers
2k views

Webalizer causing high CPU load

We use webalizer to generate reports on our Apache access logs - it is useful in conjunction with Google Analytics. The problem is that webalizer uses ALOT of CPU when running. If I run top I can see ...
user avatar
  • 4,077
1 vote
3 answers
381 views

VLC video encoding produces high 'nice' load

There is a server with vlc process for real-time video encoding. Here is output of top with 1(show processors) and H(show threads) top - 15:50:26 up 42 min, 1 user, load average: 2.64, 2.60, 2.45 ...
user avatar
11 votes
2 answers
2k views

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 ...
user avatar