Installation guide
4.7 Administering CPU Resources Using the Class
Scheduler
The Class Scheduler provides you with a method of controlling the
execution of tasks or applications by restricting the length of time that they
can access the processor (CPU). For example, daemons such as the print
spooler can be given less access time. The CPU will then have more time
available to perform other tasks. To do this, you specify that the print
daemon, /usr/lbin/lpd is allowed to use no more than a certain
percentage of the available CPU time. You can group resource user
identifiers, such as a user’s UID (user identification), into classes and
assign the required CPU access time to each class.
This feature can help you to allocate system resources so that the most
important work receives the required processing time. For example, you
may want to run two versions of a production database on your system.
One version is used as part of your business operations, while the other is
a test copy, with different tuning parameters. The test database can be
assigned to a different class so that your daily operations are not impacted
by the testing.
To set up and use the Class Scheduler, you must complete the following
steps:
• Plan the allocation of CPU resources
• Use class_admin to set up and maintain the class database
• Create classes and add members to the classes
• Verify class entries using the show command
• Save the entries to the database
• Enable Class Scheduling to start the daemon
You use the Class Scheduler commands to monitor and control scheduling
as follows:
• Execute class_admin commands such as stat from the command line
or a shell script without running an interactive session
• Use the runclass command to execute a task according to the
priorities set for a particular class
Note that it is not be necessary to perform tasks in the preceding specific
sequence. To resolve a resource sharing problem quickly, you can simply
execute a series of class_admin commands at the command line to
configure a default database, add classes and class members, and enable
the class scheduling daemon. The following sections suggest a systematic
approach to using class scheduling, although you can use it equally well to
create a quick fix to a CPU resource sharing problem.
Customizing the System Environment 4–27