LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Have a process run at a permanent nice level? (https://www.linuxquestions.org/questions/linux-newbie-8/have-a-process-run-at-a-permanent-nice-level-4175548143/)

JockVSJock 07-16-2015 07:42 AM

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

jpollard 07-16-2015 06:43 PM

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).


All times are GMT -5. The time now is 03:06 PM.