home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Previous Section Next Section

NiceQueueRun

Default nice(3) setting for queue processors V8.12 and later

The nice(3) value of a process is one of the factors used by the kernel to determine a process' scheduling priority. Scheduling priorities typically range from -20 to +20. The higher (more positive) the value, the lower the processes' scheduling priority, and the lower (more negative) the value, the higher the command's scheduling priority. Most processes (such as sendmail) run with a nice(3) value of zero.

At busy mail-handling sites, it can be desirable to process the queues at a higher (less favorable) or lower (more favorable) nice(3) priority than normal. If you run many queue processors over many queues, you might wish to increase the nice(3) value so that queue processing has less impact on other processes. At mail-sending sites, where outbound email has the priority, you might wish to decrease the nice(3) value so that queue processing gets more CPU time than other processes.

The nice(3) value for queue processors is set with this NiceQueueRun option like this:

O NiceQueueRun=value                    configuration file (V8.12 and later) 
-ONiceQueueRun=value                    command line (V8.12 and later) 
define(`confNICE_QUEUE_RUN',`value')    mc configuration (V8.12 and later) 

Here, value is the value passed to the nice(3) function. It is of type numeric. A positive value will decrease the queue runner's priorities. A negative value will be silently accepted, then ignored at runtime. A nonnumeric or zero value (the default) will leave the priority unchanged.

If your system lacks nice(3) support, the following warning will be printed and logged and this NiceQueueRun option will be ignored:

Warning: NiceQueueRun set on system that doesn't support nice( )

Note that the call to nice(3) does not check for errors. If sendmail cannot set a new nice(3) value, the queue processors will silently not be given a new priority.

The NiceQueueRun option is not safe. If specified from the command line, it can cause sendmail to relinquish its special privileges.

    Previous Section Next Section