Chapter 9
Administering the Fair Share Scheduler (Tasks)
This chapter describes how to use the fair share scheduler (FSS).
For an overview of the FSS, see Chapter 8, Fair Share Scheduler (Overview).
Administering the Fair Share Scheduler (Task Map)
Task | Description | For Information |
---|---|---|
Monitor CPU usage. | Monitor the CPU usage of projects, and projects in processor sets. | |
Set the default scheduler class. | Make a scheduler such as the FSS the default scheduler for the system. | |
Move running processes from one scheduler class to a different scheduling class, such as the FSS class. | Manually move processes from one scheduling class to another scheduling class without changing the default scheduling class and rebooting. | How to Manually Move Processes From the TS Class Into the FSS Class |
Move all running processes from all scheduling classes to a different scheduling class, such as the FSS class. | Manually move processes in all scheduling classes to another scheduling class without changing the default scheduling class and rebooting. | How to Manually Move Processes From All User Classes Into the FSS Class |
Move a project's processes into a different scheduling class, such as the FSS class. | Manually move a project's processes from their current scheduling class to a different scheduling class. | How to Manually Move a Project's Processes Into the FSS Class |
Examine and tune FSS parameters. | Tune the scheduler's time quantum value. Time quantum is the amount of time that a thread is allowed to run before it must relinquish the processor. |
Monitoring the FSS
You can use the prstat command described in the prstat(1M) man page to monitor CPU usage by active projects.
You can use the extended accounting data for tasks to obtain per-project statistics on the amount of CPU resources that are consumed over longer periods. See Chapter 4, Extended Accounting (Overview) for more information.
How to Monitor System CPU Usage by Projects
To monitor the CPU usage of projects that run on the system, use the prstat command with the -J option.
% prstat -J
How to Monitor CPU Usage by Projects in Processor Sets
To monitor the CPU usage of projects on a list of processor sets, type:
% prstat -J -C pset-list
where pset-list is a list of processor set IDs that are separated by commas.
Configuring the FSS
The same commands that you use with other scheduling classes in the Solaris system can be used with FSS. You can set the scheduler class, configure the scheduler's tunable parameters, and configure the properties of individual processes.
Note that you can use svcadm restart to restart the scheduler service. See svcadm(1M) for more information.
How to Make FSS the Default Scheduler Class
The FSS must be the default scheduler on your system to have CPU shares assignment take effect.
Using a combination of the priocntl and dispadmin commands ensures that the FSS becomes the default scheduler immediately and also after reboot.
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see "Using the Solaris Management Tools With RBAC (Task Map)" in System Administration Guide: Basic Administration.
Set the default scheduler for the system to be the FSS.
# dispadmin -d FSS
This change takes effect on the next reboot. After reboot, every process on the system runs in the FSS scheduling class.
Make this configuration take effect immediately, without rebooting.
# priocntl -s -c FSS
How to Manually Move Processes From the TS Class Into the FSS Class
You can manually move processes from one scheduling class to another scheduling class without changing the default scheduling class and rebooting. This procedure shows how to manually move processes from the TS scheduling class into the FSS scheduling class.
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see "Using the Solaris Management Tools With RBAC (Task Map)" in System Administration Guide: Basic Administration.
Move the init process (pid 1) into the FSS scheduling class.
# priocntl -s -c FSS -i pid 1
Move all processes from the TS scheduling class into the FSS scheduling class.
# priocntl -s -c FSS -i class TS
Note - All processes again run in the TS scheduling class after reboot.
How to Manually Move Processes From All User Classes Into the FSS Class
You might be using a default class other than TS. For example, your system might be running a window environment that uses the IA class by default. You can manually move all processes into the FSS scheduling class without changing the default scheduling class and rebooting.
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see "Using the Solaris Management Tools With RBAC (Task Map)" in System Administration Guide: Basic Administration.
Move the init process (pid 1) into the FSS scheduling class.
# priocntl -s -c FSS -i pid 1
Move all processes from their current scheduling classes into the FSS scheduling class.
# priocntl -s -c FSS -i all
Note - All processes again run in the default scheduling class after reboot.
How to Manually Move a Project's Processes Into the FSS Class
You can manually move a project's processes from their current scheduling class to the FSS scheduling class.
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see "Using the Solaris Management Tools With RBAC (Task Map)" in System Administration Guide: Basic Administration.
Move processes that run in project ID 10 to the FSS scheduling class.
# priocntl -s -c FSS -i projid 10
The project's processes again run in the default scheduling class after reboot.
How to Tune Scheduler Parameters
You can use the dispadmin command to display or change process scheduler parameters while the system is running. For example, you can use dispadmin to examine and tune the FSS scheduler's time quantum value. Time quantum is the amount of time that a thread is allowed to run before it must relinquish the processor.
To display the current time quantum for the FSS scheduler while the system is running, type:
$ dispadmin -c FSS -g # # Fair Share Scheduler Configuration # RES=1000 # # Time Quantum # QUANTUM=110 |
When you use the -g option, you can also use the -r option to specify the resolution that is used for printing time quantum values. If no resolution is specified, time quantum values are displayed in milliseconds by default.
$ dispadmin -c FSS -g -r 100 # # Fair Share Scheduler Configuration # RES=100 # # Time Quantum # QUANTUM=11 |
To set scheduling parameters for the FSS scheduling class, use dispadmin -s. The values in file must be in the format output by the -g option. These values overwrite the current values in the kernel. Type the following:
$ dispadmin -c FSS -s file |