Use the resource change job feature to change resource limits on multiple projects that are spread across multiple hosts. These projects must all use the same container. You can either run the resource change job immediately so that the changes are implemented at the same time, or you can schedule the changes to occur later.
On Solaris 10, the resource change job feature changes the resource allocation of containers only if they are deployed in the global zone.
Changes to CPU reservations (CPU shares) are immediate. Changes to memory caps need to write to swap. Any big change to the memory cap will affect system performance while the memory cap is being adjusted.
The following information is available in the Resource Change Job table:
The name of the job that was provided during job creation.
The names of the hosts with which the container is associated.
The interval the job is scheduled to run. Options include One Time, Hourly, Daily, Weekly, Monthly.
The status of the job. Values include Queued, Succeeded, Failed.
The following example uses projects named “Webserver” and “Rollup” to show how the resource change job feature can be used to manage system resources across the enterprise. In this example, an online store provides order processing from its website. The Webserver project was created to manage the CPU and memory resources that are used by the web server across North America. The Rollup project was created to manage the resources that the database required. During the day and early evening hours, web server resource demands are high as people use the web site to place orders. But in the evening, the demand on the web server typically drops dramatically after midnight. During overnight hours, the database is scheduled to run reports on the day's sales.
To manage the resources required by these two containers on an 8 CPU system with 6000 Mbytes of physical memory, you could create a total of four resource change jobs as shown in the following table.
Table 4–2 Sample of Resource Change Job Scheduling
Container Name |
Resource Change Job Name |
Start Time |
Interval |
Resource Change |
---|---|---|---|---|
Webserver |
webserver-day |
6:00 a.m. |
Daily |
CPU Shares: 6 Memory: 2500 MB |
Rollup |
rollup-day |
6:00 a.m. |
Daily |
CPU Shares: 1 Memory: 2000 MB |
Webserver |
webserver-night |
Midnight |
Daily |
CPU Shares: 1 Memory: 2000 MB |
Rollup |
webserver-night |
Midnight |
Daily |
CPU Shares: 6 Memory: 2500 MB |
Two resource change jobs run every morning at 6:00 a.m. to change the resources for the Webserver and Rollup projects. During the day, the Webserver project is given the majority of CPU and physical memory resources as the demand of the webserver is high. Then at midnight each day a second set of resource change jobs run, and they reallocate the system's resources to accommodate the changing need. The database requires the resources to tally the daily sales while the web server requires fewer resources as demand is low.
This feature is similar to the job management feature found in Sun Management Center, but use the Container Manager GUI to administer all Container Manager jobs. For more information about the Sun Management Center job feature, see Job Management Concepts in Sun Management Center 3.6 User’s Guide.
If the Container Manager GUI is not already open, access it as described in To Start the Container Manager GUI.
Select the Containers view.
In the navigation window, select the project name.
The project must be associated with a host to proceed.
Select the Jobs tab from the right pane.
The Resource Change Job table is displayed.
Click the New Resource Change Job button located in the table.
The Resource Change Job wizard appears. The Overview panel appears.
Provide a name for the resource change job. Providing a description is optional.
The length of the name cannot exceed 32 characters. Spaces, dash (-), underscore (_), and dot (.) are all accepted. A space is converted to an underscore (_).
The Select Hosts panel appears. The names of all the hosts with which the selected container is associated appears in the Available list. You can change the resource limits for one or more hosts by selecting them from this window.
Select each host from the Available list, and click Add to move each host to the Selected list. Or click Add All to move all hosts.
The host names move to the Selected field.
Provide a new minimum CPU reservation (CPU shares). A memory cap is optional.
The new resource limits apply to all the hosts selected in the previous step.
Provide a start date, start time, and interval for the resource change job.
The changes to the resource limits are effective at the requested time.
Review your selections in the Summary panel. To many any corrections, use the Previous button. When you have completed all changes, click Finish.
The wizard is dismissed. The job is added to the Jobs table. The status is listed as queued until the day and time when the Job is scheduled to run. The changes to the resource limits become effective at the time requested.
Use this procedure to make changes to a pending job whose status still shows as Queued in the Jobs table.
If the Container Manager GUI is not already open, access it as described in To Start the Container Manager GUI.
Select the Containers view in the navigation window.
Select the Jobs tab from the right pane.
From the Resource Change Job table, select the job to be changed by selecting the check box next to the name.
A check mark appears in the box.
To start the Update Resource Change Job wizard, click the Update Resource Change Job button.
For a detailed description of the steps to move the panels, see To Modify a Project Using a Resource Change Job.
When you have completed all changes, click Finish.
The wizard is dismissed. The edits made to the job have been saved.
Use this procedure to view the log for a change job that has been completed. If the job included changes to multiple hosts, the status for the jobs per host is located in the log.
If the Container Manager GUI is not already open, access it as described in To Start the Container Manager GUI.
Select the Containers view in the navigation window.
Select the Jobs tab from the right pane.
From the Resource Change Jobs table, select the completed job whose log you want to view by selecting the check box next to the name.
A check mark appears in the box.
Click the View Log button.
The log file for the resource change job appears.