Modifying process priority levels
The Process Manager lets you set priority levels for each process. Setting the priority of processes tells Corel LINUX to give certain processes more CPU processing time. This can be useful when your server is performing tasks that must be managed very quickly, for example, if the server is processing interactive information.
Corel LINUX divides the capacity of the CPU into many small slices called time slices. Only one process is allocated a time slice at one time. You can increase the priority of a process to indicate to Corel LINUX that more time slices and longer time slices should be given to that process.
You can use the Process Manager to set the priority of a process in two ways, either by changing the nice value of a process, or by changing the scheduling of a process.
The nice value of a process is a value between -20 and 20; -20 is the highest priority and 20 is the lowest. When you decrease the nice value (increase priority) of a process, Corel LINUX allocates time slices more frequently to that process than to other processes with higher nice values. Corel LINUX also allocates longer CPU time slices to processes with lower nice values.
Changing the scheduling is the second way of allocating more CPU time to a process. You can set the following three scheduling options using the Process Manager: SCHED_OTHER, SCHED_FIFO, and SCHED_RR.
The default setting is SCHED_OTHER, which is a time-sharing option. Time-sharing means that Corel LINUX shares CPU time slices equally with all SCHED_OTHER processes with the same nice value. SCHED_OTHER is the lowest scheduling priority. You can prioritize SCHED_OTHER processes by changing the nice value of the process.
The other two scheduling options, SCHED_FIFO and SCHED_RR, are real-time scheduling options. Real-time processes take priority over time-sharing processes. Only processes that always need to be processed immediately should be given the real-time scheduling priority. Processes that are given real-time scheduling priority will block all non-real-time processes from running as long as they require CPU time.
To change the nice value of a process
1. In the Process Manager window, click a process.
2. Click Process, Renice.
3. Set a new nice value for the process. The highest nice value is -20 and the lowest nice value is 20.
To change the scheduling of a process
1. In the Process Manager window, click a process.
2. Click Process, Change Scheduling.
3. Choose one of the following schedule types:
SCHED_OTHERsets the process scheduling as timesharing. This is the lowest scheduling priority.
SCHED_FIFO(First In First Out)sets the process scheduling as real-time FIFO. The process runs until the process quits or another process with a higher priority needs access to the CPU. This is the highest scheduling priority.
SCHED_RR(Round Robin)sets the process scheduling as real-time RR. The process runs for one CPU time slice and then joins the end of the queue for processes with the same priority.
4. Choose a priority level for SCHED_FIFO or SCHED_RR from 1 to 99 (1 is the highest priority).