LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 131Reputation: 131
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?

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

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
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).
 
  


Reply

Tags
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 07:14 AM
Last process during run level change Lakki Linux - Software 10 08-04-2009 10:45 AM
Nice level set but process gets wrong priority akring Linux - Kernel 3 11-03-2008 10:20 AM
Nice level set but process gets wrong priority akring Linux - General 7 10-29-2008 05:25 AM
emacs in run level 3 then switch to X (level 7) then back to level 3 dsoliver Slackware 3 09-01-2006 04:31 AM


All times are GMT -5. The time now is 07:20 AM.

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