Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-16-2015, 07:42 AM   #1
Senior Member
Registered: Jan 2004
Location: SATX
Distribution: RHEL/CentOS
Posts: 1,301
Blog Entries: 4

Rep: Reputation: 148Reputation: 148
Have a process run at a permanent nice level?

I have a server that takes forever running either anti-virus or backups processes.

I would like to set those processes to run at a negative niceness range, automatically.

I looked at the MAN pages for nice/renice and looked online, and really didn't find anything.

Anyone have any insight on this?

Old 07-16-2015, 06:43 PM   #2
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,843

Rep: Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472
Depends on the distribution...

The current RH based distributions make the nice level almost useless at a global level (because the cgroup settings override it).

Root can use the "nice" command to set the priority for any command to be run... (also look at the renice command to alter a process already running).

WARNING: this can be hazardous to your use of the system. Multiple CPUs help, but you run the risk of locking up a CPU. And if the program you are running is multi-threaded, you can lock the entire system (yeah - I've done that...). It will also slow down access to files...

Doing an anti-virus scan is nearly useless on Linux, unless you are a SAMBA server to bunch of Windows machines. They also don't work well if you have lots of files - it might be ok for 10/20 thousand... But I don't recommend it against a million... It will take a LONG time (and I don't know how many hours that would be).


automatic, nice, renice

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Small tip: use run level 2 as a customized run level 3 to boot faster Didier Spaier Slackware 3 01-14-2015 06:14 AM
Last process during run level change Lakki Linux - Software 10 08-04-2009 09:45 AM
Nice level set but process gets wrong priority akring Linux - Kernel 3 11-03-2008 09:20 AM
Nice level set but process gets wrong priority akring Linux - General 7 10-29-2008 04:25 AM
emacs in run level 3 then switch to X (level 7) then back to level 3 dsoliver Slackware 3 09-01-2006 03:31 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:09 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration