Installing and Administering Solaris Container Manager 3.6

Chapter 4 Managing Projects

This chapter contains procedures for creating, using, and managing projects.

The following topics are discussed:


Note –

You must be a project administrator to manage (create, activate, deactivate, modify, delete) projects. The project administrators are specified while setting up the Solaris Container Manager software.


Creating Projects

You can create custom projects in addition to the default containers that are available after the software has been installed and set up. The combined use of both types of containers aids you in the implementation of your server consolidation plan.

Use the New Project wizard to create custom projects. You have the option to create and save just the container to the Containers view. Or, you can complete all wizard steps to create a project. The same wizard is used for both situations.

If you choose to create just the container, the name is saved in the Containers view. You can use the container to create one or more projects at a later time. For more information about how to activate a project, see Activating or Deactivating Projects.

If you choose to create a project, you also make a container as part of the process. After you finish creating the project, the container is saved to the navigation window of the Containers view. You can use this same definition to create additional projects that are associated with multiple hosts. The definition for all these projects, including the name and project type, will be the same for each of the hosts. You can vary the resource reservations of the project per host, or you can make them all the same. This flexibility is provided so that you can meet resource needs as conditions vary. For more information, see About Container Properties.

The New Project wizard guides you through the project creation process. You should have the following information available when creating a project to move readily through the wizard:

This wizard is accessible from three different places in the GUI, but always from the New Project button. Depending on where in the GUI you access the wizard, you might not need to provide all this information. Again, certain information might be completed for you depending on the entry point.

ProcedureTo Start the New Project Wizard

The New Project wizard can be accessed from three places in the GUI. Depending on the access point to the wizard, you might not be required to complete all its panels because certain information is completed automatically.

For more samples of the New Project wizard, see Creating an Application-Based Project.

Steps
  1. If the Container Manager GUI is not already open, access it as described in To Start the Container Manager GUI.

  2. In the navigation window, determine the relationship of the container you want to create.

    • To associate a specific host with the container automatically, do the following:

      1. Select the host name in the navigation window from the Hosts view.

        If needed, click the host group name to expand the list.

      2. Select the Projects tab that is located in the right pane.

        The Projects table appears.

      You are required to select a host during the container creation process when using this method.

      Screen capture of Hosts view showing the New Project button.
Surrounding text describes the context.
    • To automatically bind a project to a specific resource pool:

      1. Select the resource pool name from the navigation window in the Hosts view.

        If needed, click the key symbol next to the host name to expand the list. The resource pools that are assigned to the host are displayed.

      2. Select the Projects tab located in the right pane.

        The Projects table appears.

      You are not required to assign a resource pool as part of the container creation process.

    Screen capture of Hosts view (resource pool) showing the New
Project button. Surrounding text describes the context.
  3. Click the New Project button from the host project table or the host resource pool table.


    Note –

    The New Project button is always available from a table that appears in the right pane, regardless of which of the methods you selected.


    The New Project wizard is displayed. The Overview panel is the first panel to appear.

    Screen capture of the New Project wizard Overview panel. Surrounding
text describes the context.

Creating a User-Based or Group-Based Project


Note –

Only the user-based container type is available if you are running the Solaris 8 release.


If you want the container to manage processes that are identified by either a UNIX user name or UNIX group name, you should create a user-based or group-based container. The project type that is selected during the creation process determines whether the finished container is user-based or group-based.

ProcedureTo Create a User-Based or Group-Based Project

Steps
  1. Start the New Project wizard, as described in To Start the New Project Wizard.

    The Overview panel appears.

  2. Select User or Group as the project type.

    A container with a user-based project type tracks processes with the same UNIX user name.

    A container with a group-based project type tracks processes with the same UNIX group name.


    Note –

    In the Solaris 8 OS, only the user-based container type is supported.


  3. Provide project-type identifiers that meet the following requirements:

    (On Solaris 8)

    • User-Based Project - You must provide a valid UNIX user name in the first field. UNIX user names of those users that can join the project can be added in the second field. UNIX group names of those groups that can join the project can be added in the third field. Separate multiple entries with a comma.

      Do not provide a user name that is being used in another user-based project or in a Default project in the first field.

    • Group-Based Project - You must provide a valid UNIX group name in the first field. UNIX group names of those groups that can join the project can be added in the second field. UNIX user names of those users that can join the project can be added in the third field. Separate multiple entries with a comma.

      Do not provide a group name that is being used in another group-based project or Default project in the first field.


    Note –

    On Solaris 9 and Solaris 10, a valid user name and group name are not required. However, the additional user names and group names must be present on the system.


    For additional information about this project type, see Table 3–2.

  4. If you accessed the New Project wizard by selecting a host name only (without selecting a pool), assign a resource pool that supports the resource requirements of the project.

    New processes started in a project are bound to the corresponding resource pool. After the project is activated, the new processes that the project is holding are bound to its resource pool.

    • To assign a new resource pool:

      1. Select Create a New Resource Pool.

      2. Provide a name for the resource pool.

        The name must be alphanumeric and contain no spaces. The characters dash (-), underscore (_), and dot (.) are allowed.

      3. Assign the number of CPUs.

        The number of CPUs must be an integer not less than one and cannot exceed the number of CPUs available on the host. The total number of CPUs on the host and the number that are currently available are shown.

    • To assign an existing pool:

      1. Select Use an Existing Resource Pool.

        A list of available resource pools is displayed.

      2. Select the radio button next to the pool's name in the list.

        The total number of CPUs assigned to each resource pool is given, as well as the amount of unreserved CPU still available in each pool. The container is bound to the selected resource pool.

  5. (Solaris 10 only) Select an existing zone.

    Click the button from the available zones to associate the project to a zone.

  6. Provide the resource reservations for the project.

    The number of maximum CPUs, the number of unreserved CPU shares, and memory resources available on the host is provided.

    The CPU reservation is required and must be provided as an integer. A container with a CPU reservation of zero receives CPU resources only when no processes are running in any other container that is associated with the same host.

    The memory cap is optional and should be provided in Mbytes.

    The shared memory value is the total amount of shared memory allowed to be used by the processes that run within this project. The shared memory is also optional. The default value of the shared memory is one-quarter of the physical memory.

  7. Provide a name for the container.

    The name must be unique and not exceed 32 characters. This name identifies the container in the navigation window, status tables, and resource utilization reports. If a duplicate name is entered, the creation of the container fails.

    A container name cannot be changed after the creation procedure is finished.

  8. (Optional) Provide a description for the container.

  9. Review the information in the Summary panel.

    Project summary screen
  10. Click Finish.

    The selections are saved, and the project is now active. The Solaris kernel begins enforcing the container's resource reservations.

Creating an Application-Based Project


Note –

In the Solaris 8 OS, only the user-based container type is supported.


Use an application-based project to manage the processes that run in a particular software application. You can create an application-based project that moves the processes automatically or one that enables you to move the processes manually.

If you can provide a match expression that is truly unique to the application, you can add this expression to the project. You must also provide the UNIX user ID or UNIX group ID under which the processes will run. Additional users or groups that have the right to join the project at a later time can be added as well. To automatically move processes into the project, you must provide all required project identifiers when the corresponding wizard panel appears. The software then moves all matching processes automatically for all the projects that are based on this definition.

If the application does not create truly unique identifiers, then you will want to move the processes manually or start the application inside the project. If you want to move the processes manually, create the project with only the UNIX user ID or UNIX group ID under which the processes will run. Additional users or groups that have the right to join the project at a later time can be added as well. Then move the processes with the newtask -p command. For more information, see Moving or Starting Processes in a Project.

ProcedureTo Determine the Match Expression for an Application

Use this procedure to determine the correct match expression to identify the processes corresponding to the application you want to manage. This expression is required in the New Container wizard to move processes automatically into a container.

Steps
  1. From a terminal window, start the application that the application-based container will manage.

  2. To see a list of all processes that are running, in a terminal window type:


    % ps -cafe
    
  3. In the CMD column, locate the corresponding executable name.

    Choose the expression that will uniquely identify the application's processes.


Example 4–1 Determining a Match Expression For Mozilla

The following is an example of output from the ps - cafe command in a search for Mozilla:


% ps -cafe
     UID   PID  PPID  CLS PRI    STIME TTY      TIME CMD
    ...
username  8044  7435   IA  50 19:47:09 pts/11   0:00 /bin/ksh -p /usr/sfw/lib/mozilla/mozilla

In this example, the unique executable name is mozilla. Likewise, a correct match expression is mozilla.



Example 4–2 Determining a Match Expression for Tomcat Server

When you know the name of the application, you can use the grep command in conjunction with ps -cafe to locate the correct match expression. The following is an example of output from the ps - cafe | grep tomcat command in a search for Tomcat server. This example has been condensed for space, leaving the irrelevant information.


% ps -cafe | grep tomcat
  nobody 27307  /usr/j2se/bin/java -classpath //usr/apache/tomcat/bin/bootstrap.jar:/usr/j2se/l
 

In this example, the executable name is java. However, the correct match expression is tomcat. In this case, the match expression is the argument instead of the executable name, as java does not uniquely identify the Tomcat processes.



Example 4–3 Verifying a Match Expression for Tomcat Server

The following example shows how to use the pgrep command to find the PID. The PID verifies that you have identified the unique match expression for finding the desired process:


% pgrep -f tomcat
27307

The PID for Tomcat server is 27307. This number matches the PID from Example 4–2. This match confirms that the match expression tomcat corresponds to the Tomcat server process.


ProcedureTo Create an Application-Based Project

Steps
  1. start the New Project wizard, as described in To Start the New Project Wizard.

    The Overview panel appears.

  2. Select Application as the project type for the container.

    The application-based project container tracks processes that are associated with the application. For more information about this project type, see Table 3–2.

  3. Provide a name for the project.

    The name must be unique and not exceed 32 characters. This name identifies the project in the navigation window, status tables, and resource utilization reports. If a duplicate name is typed, the creation of the project fails.

    A container name cannot be changed after the creation procedure is finished.

  4. Provide either the UNIX user names or UNIX group names under which the application's processes will run.

    The UNIX user names or UNIX group names under which the application's processes will run must be supplied. If these names are not provided, the corresponding processes will not be moved under the container until they are supplied. Separate multiple entries with a comma.

  5. Determine whether you want to move application processes under the project automatically when the container is activated or to move them manually from the command line.

    • To indicate that you want to move application processes manually from the command line, select the check box Do Not Use Match Expression.

    • To move application processes under the project automatically when the project is activated, provide an expression in the Match Expression field.

      You can use wildcards in the Match Expression field to identify the processes that are associated with an application. Examples of match expressions using wildcards are moz, cat that identify the processes associated with Mozilla and Tomcat respectively.

      Project Application Process Identifiers in New Project Wizard

      The match expression must be supplied to automatically move the application's processes to the container. This expression is case sensitive. To determine the correct match expression, see To Determine the Match Expression for an Application.

      If a match expression is not provided at this time, the application's processes will not be moved under this container until this expression is supplied.

  6. If you access the New Project wizard from the host name (without selecting a pool), assign a resource pool that supports the project's resource requirements.

    New processes that are started in a project are bound to the corresponding resource pool. After the project is activated, the new processes that are held in the container are bound to its resource pool.

    • To assign a new resource pool:

      1. Select Create a New Resource Pool.

      2. Provide a name for the resource pool.

        The name must be alphanumeric and contain no spaces. The characters dash (-), underscore (_), and dot (.) are allowed.

      3. Assign the number of CPUs.

        The number of CPUs must be an integer not less than one and cannot exceed the number of CPUs available on the host. The total number of CPUs on the host and the number that are currently available are shown.

    • To assign an existing pool:

      1. Select Use an Existing Resource Pool.

        A list of available resource pools is displayed.

      2. Select the radio button next to the pool's name in the list.

        To total number of CPUs assigned to each resource pool is given, as well as the amount of unreserved CPU still available in each pool. The project is bound to the selected resource pool.

  7. (Solaris 10 only) Select an existing zone.

    Click the button from one of the available zones.

  8. Provide the resource reservations for the project.

    The maximum CPUs, unreserved CPU shares, and memory resources that are available on the host is provided.

    The CPU reservation (CPU shares) is required and must be provided as an integer. A project with a CPU reservation of zero receives CPU resources only when no processes are running in any other container that is associated with the same host.

    The memory cap is optional and should be provided in Mbytes.

    The shared memory value is the total amount of shared memory allowed to be used by the processes that run within this project. The shared memory is also optional. The default value of the shared memory is one-quarter of the physical memory.

  9. Provide a name for the container.

    The name must be unique and not exceed 32 characters. This name identifies the container in the navigation window, status tables, and resource utilization reports. If a duplicate name is entered, the creation of the container will fail. A container name cannot be changed after the creation procedure is finished.

  10. (Optional) Provide a description for the container.

  11. Review the information in the Summary panel.

    Application Project Summary screen
  12. Click Finish.

    The selections are saved, and the container is now active. The Solaris kernel begins enforcing the container's resource reservations.

Moving or Starting Processes in a Project

If the application being managed by the project does not have a unique executable name, then you will want to move processes into the project manually. This method ensures that you track only the processes of the desired application.

ProcedureTo Move Processes Into an Application-Based Project Individually

Use this procedure if you did not provide a match expression for an application-based project and want to move the application's processes into the project individually.

Steps
  1. Create an application-based project for managing the application. Select the Do Not Use Match Expression check box.

    For detailed steps, see the section, To Create an Application-Based Project.

  2. Review the/etc/project file to determine the project name by typing:


    % cat /etc/project
    

    You will need this project name in Step 5.

  3. If needed, start the application in a terminal window.

  4. Determine the processes that correspond to the application.

    For examples, see Example 4–1, Example 4–2, and Example 4–3.

  5. Move the corresponding processes.

    1. From the Container Manager GUI, click the host in the navigation window.

    2. Click the Projects tab.

      The Projects table is shown.

    3. In the Projects table, click the project name. Note that the project name is underlined to show it is a link.

      The Projects Properties tab is shown.

    4. Click the Processes tab.

      The Processes table is shown.

    5. Select the processes to be moved.

    6. Click the Move button.

      The Move Process dialog box appears.

    7. Select the new project (containers) for the process from the list of projects (containers).

    8. Click OK.

  6. Repeat Step 5 until all processes are moved.


Example 4–4 Verifying That the Processes Were Moved Into the Project With ps

You can use the ps command in combination with grep to verify that the processes have been moved into a container. The following example shows that the processes that were individually moved are now in the container payroll:


% ps -ae -o pid,project,comm | grep payroll
17773    payroll ora_reco_AcctEZ 
17763    payroll ora_pmon_AcctEZ 
17767    payroll ora_lgwr_AcctEZ 


Example 4–5 Verifying That the Processes Were Moved Into the Project With prstat

You can use the command prstat to verify that the processes were moved into a container if you know the project name. In this example, the project name is payroll.


% prstat -J payroll
   PID USERNAME  SIZE   RSS STATE  PRI NICE      TIME  CPU PROCESS/NLWP       
 17773 admin     216M  215M cpu2     1    0   0:05:08  29% ora_reco_AcctEZ/1
 17763 admin     834M  782M sleep    1    0   0:35:02   0% ora_pmon_AcctEZ/1
 17767 admin     364M  352M run      1    0   0:22:05  23% ora_lgwr_AcctEZ/1							

ProcedureTo Start an Application in a Project

Steps
  1. Create an application-based project for managing the application. Select the Do Not Use Match Expression check box.

    For detailed steps, see To Create an Application-Based Project.

  2. Select from the following by the OS version:

    • For the Solaris 8 OS, type:


      % srmuser user_name newtask -p project_name application_name
      

      where user_name is the UNIX user name, and project_name is in the form user.username. In the Solaris 8 OS, because only the user-based container is supported, user_name and project_name are the same.

    • For the Solaris 9 or Solaris 10 OS, type:


      % newtask -p project_name application_name
      

      where project_name is the project that is associated with the container, and application_name is the command that starts the application, including any command arguments.

    The application is started in the container.


Example 4–6 Starting an Application Inside a Container on Solaris 9 or Solaris 10 OS

The following is an example of starting an application named tracks inside a container named music:


% newtask -p music tracks -z 0 mozart.au

where -z 0 mozart.au are the command-line arguments for the application tracks.



Example 4–7 Verifying an Application's Association With a Project

After the application has been started, you can verify which project the application is associated with by typing:


% ps -ae -o pid,project,comm

The following is an example of the output from this command:


  PID  PROJECT COMMAND
...
17771   default ora_smon_SunMC
16246   system rquotad
26760   group.staff /bin/csh
16266   music	 tracks
17777   default ora_d000_SunMC
17775   default ora_s000_SunMC
17769   default ora_ckpt_SunMC

In this example, the application named tracks has PID 16266, the project is music, and the executable is tracks. This is the same application started in Example 4–6.


Activating or Deactivating Projects

A project's resource boundaries are not enforced while the project is in a defined or inactive state. You must activate the project to enable this enforcement. Conversely, when you do not want these limits enforced, you must deactivate the project. An active project can be deactivated without losing the resource boundaries you have established. For more information, see Project States.

An existing container can be used to create new active projects with the Associate Host to Container wizard. You activate an inactive project or deactivate an active project with a button.

ProcedureTo Activate a Project

Steps
  1. If the Container Manager GUI is not already open, access it as described in To Start the Container Manager GUI.

  2. In the Containers view, select the name of the container.

    If the container is part of a group, select the group from the navigation window to display the containers in the right pane.

  3. Select the Hosts tab in the right pane.

    The Hosts Associated with this Container Definition table appears. All hosts that the selected container is currently associated with are listed in the table.

  4. Click the Associate Host to Container button.

    The Associate Host to Container wizard appears.

    Associate to Host Wizard screen
  5. Follow the wizard instructions for typing a host name or finding an appropriate host.

ProcedureTo Activate an Inactive Project

Steps
  1. If the Container Manager GUI is not already open, access it as described in To Start the Container Manager GUI.

  2. In the Hosts view, select the host with which the container is associated.

  3. Select the Projects tab in the right panel.

    A table appears that lists all projects that are associated with that host.

  4. To enable the Activate button, select the check box of the project to be activated.

  5. (Optional) View and modify the properties of the project.

    1. Click the name of the project in the Project Name column of the table.

      The Properties tab appears.

    2. (Optional) Modify the resource reservations for the project and click Save.

    For more information, see Modifying Containers and Projects.

  6. Click the Activate button.

    The project is activated and the resource boundaries are being enforced by the kernel.

ProcedureTo Deactivate an Active Project

Steps
  1. If the Container Manager GUI is not already open, access it as described in To Start the Container Manager GUI.

  2. In the Hosts view, select the host with which the project is associated.

  3. Select the Projects tab in the right panel.

    A table appears that lists all projects that are associated with that host.

  4. To enable the Deactivate button, select the check box of the project to be activated.

  5. (Optional) View and modify the properties of the project.

    1. Click the name of the project in the Project Name column of the table.

      The Properties tab appears.

    2. (Optional) Modify the resource reservations for the project and click Save.

    For more information, see Modifying Containers and Projects.

  6. Click the Deactivate button.

    The project is deactivated and the resource boundaries are not enforced by the kernel.

Viewing Project Processes

Information about the processes that are running in an active project can be obtained from a table in either the Hosts view or the Containers view. The same Processes table and identical information is provided in both views.

Processes table for an active project screen

Processes are listed one per row and the following information is available:

PID

The process ID.

User Name

The owner of the process (the UNIX user name or login name).

SIZE

The total virtual memory size of the process in Mbytes.

RSS

The resident set size of the process in Mbytes.

STATE

The state of the process. Values include the following:

  • cpuN – The process is running on CPU N where N is an integer.

  • sleep – The process is sleeping, or waiting.

  • run – The process is running.

  • zombie – The process is terminated.

  • stop – The process is stopped.

PRI

The priority of the process. The higher the number, the higher the process priority.

NICE

Nice value that is used in priority computation.

Time

The cumulative execution time for the process.

CPU

The percentage of recent time that is used by the process.

PROCESS/NLWP

The name of the process, which is the name of executed file. The number of lightweight processes (LWPS) in the process.

ProcedureTo View the Processes Running in a Project From the Hosts View

Use this procedure if you know the name of the host with which the project is associated.

Steps
  1. If the Container Manager GUI is not already open, access it as described in To Start the Container Manager GUI.

  2. Select the Hosts view by clicking the left tab in the navigation window.

  3. In the navigation window, select the host with which the project is associated.

  4. In the right pane, select the Projects tab.

    The Projects table is displayed and lists all the projects that are associated with the host. The list includes active and inactive projects. You must select an active project to see information about its processes.

  5. Select the project by clicking the project name.

    The properties page for the project instance on the selected host is displayed.

  6. Select the Processes tab.

    The processes running inside the project are displayed in the Processes table. The name of the project and the host it is associated with are displayed above the table.

    If no processes are listed, you might have selected an inactive container.

ProcedureTo View the Processes Running in a Project From the Containers View

Use this procedure when you know the name of the project and want to select from the list of hosts with which the project is associated.

Steps
  1. If the Container Manager GUI is not already open, access it as described in To Start the Container Manager GUI.

  2. Select the Containers view by clicking the right tab in the navigation window.

  3. In the navigation window, select the desired container.

    If needed, expand the container by clicking the expansion triangle. After the project names appear, click the name of the desired project.

    A table that lists all the hosts that the container is associated with is displayed in the right pane.

  4. In the table, click the project name.

    The properties page for the container instance on the selected host appears.

  5. Select the Processes tab.

    The name of the project and the host it is associated with are displayed in the table title. The processes that are running inside the project are displayed in the Processes table.

    If no processes are listed in the table, you might have selected an inactive project.

Modifying Containers and Projects

Two property sheets are available for modifying either a container or an active or inactive project. The following table shows the differences between the property sheets.

Table 4–1 Property Sheet Details

Property Sheet 

Usage 

Tab 

Container  

Changes to description, project type, project identifiers (users, groups), match expression 

Properties tab in Containers view after selecting the container 

Project instance (active or inactive project) 

Changes to resource pool association, CPU reservation, memory cap 

Properties tab in Hosts view or Containers view 

Each project instance has a container with which it is associated. Any change that is made to the container applies to all the project instances that use that definition. For example, if you change the project type in a container, the project type changes for all project instances that use the same container. Therefore, you can use both property sheets to make all modifications that are needed.

Each project instance also has a property sheet that is used to change only its own resource pool association or the resource reservations. You can change one project at a time when using this property sheet. For example, you can increase the current minimum CPU reservation or the current memory cap. Changes become effective after the new values have been saved. Modifications that you make to the resource boundaries on an inactive project are not effective until you reactivate the project.

The following example shows a completed property sheet for the sales01 project instance.

Figure 4–1 Sample: Property Sheet for Changing Resource Reservations and Resource Pool

Project property sheet screen

If you need to make resource changes to multiple projects that are active on multiple hosts, use the resource change job feature. For more information, see Modifying Projects With a Resource Change Job.

From the Containers view, a separate property sheet is available from which you can modify the container. You can make changes to one container at a time. You cannot use the resource change job feature to make changes to multiple containers.

The following example shows a completed property sheet for changes to the sales01 project instance.

Figure 4–2 Sample: Property Sheet for Modifying a Container

Property Sheet for Modifying a Container Screen

You cannot modify the properties of a default project. Therefore, neither property sheet is available if a default project is selected.


Note –

Only a container or an inactive project can have its properties modified. You must first deactivate an active project from every host that the project is associated with before modifying any properties. After the changes are saved, you can reactivate the project.


ProcedureTo Modify a Container Using a Property Sheet

Steps
  1. If the Container Manager GUI is not already open, access it as described in To Start the Container Manager GUI.

  2. Select the Containers view.

  3. Select the container.

    • If the container is not currently used for any active project, select the Containers Group from the navigation window. This method displays the Container and Groups table in the right pane. Select the project from the table.

    • If the container is being used with any active projects, select the container from the navigation window. If needed, click the different Container groups to expand the list of individual containers. This method displays the Hosts Associated with this Container Definition table from which you can deactivate the project instances.


      Note –

      All project instances that use this container must be deactivated before you can change the properties. If any instances show the status as Active, use the Deactivate button in the Hosts Associated with this Container table after selecting all hosts before continuing.


  4. Select the Properties tab from the right pane.

    The property sheet for the selected container appears. You can make the following changes in the text fields:

    • Description – Provide the description of the container.

    • Project Type – Provide the User, Group, or Application.

    • UNIX User Name – Change existing entry for UNIX user name.

    • Additional User – Change existing entries or provide additional valid UNIX user names. Separate multiple entries with a comma.

    • Additional Group – Change existing entries or provide additional valid UNIX group names. Separate multiple entries with a comma.


    Note –

    If the Save button is not available and the text fields are grayed out, the container is being used in one or more container instances. Verify that the state is Inactive for all hosts listed in the Hosts Associated with this Container Definition table. If any show status as Active, you must deactivate them.


  5. Click Save to save the changes.

    The property sheet remains displayed.

ProcedureTo Modify a Project Using a Property Sheet

Use this procedure to make changes to the resource pool or resource reservations for only one project. If you want to make the same change to multiple projects, see Modifying Projects With a Resource Change Job.

Steps
  1. If the Container Manager GUI is not already open, access it as described in To Start the Container Manager GUI.

  2. Choose from the following methods to select the desired project instance:

    • If you know the name of the host that the project is associated with, select the host name from the navigation window in the Hosts view. Then select the Projects tab in the right pane to access a table that lists all projects that are associated with the host.

    • If you know the name of the project, select its name from the navigation window in the Containers view. The Hosts Associated with this Container Definition table appears in the right pane.


    Note –

    All projects must be deactivated before you can change the properties. If any projects show the status as Active, use the Deactivate button in the table before continuing. The tables in both views have this button.


  3. Select the name of the project or host from the table, depending on the method that you selected in the previous step.

    The property sheet for the project instance is displayed.

  4. Make the desired changes.


    Note –

    (On Solaris 10) It is not possible to change the resource pool of a project.


    • Resource Pool Definition. To change the pool that the project is associated with, select from the drop-down menu.

    • CPU Reservation (CPU shares). Provide the new value in the text box as an integer.

    • Memory Cap (MB). Provide the new value in the text box.

    • Shared Memory (MB). Provide the new value in the text box.

  5. Click Save.

    The requested changes to the resource reservations have been saved.

  6. (Optional) To reactivate the project, return to the table that you used in Step 3 and click Activate.

Modifying Projects With a Resource Change Job

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.


Note –

On Solaris 10, the resource change job feature changes the resource allocation of containers only if they are deployed in the global zone.



Note –

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:

Resource Change Job Name

The name of the job that was provided during job creation.

Hosts

The names of the hosts with which the container is associated.

Schedule

The interval the job is scheduled to run. Options include One Time, Hourly, Daily, Weekly, Monthly.

State

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.

ProcedureTo Modify a Project Using a Resource Change Job

Steps
  1. If the Container Manager GUI is not already open, access it as described in To Start the Container Manager GUI.

  2. Select the Containers view.

  3. In the navigation window, select the project name.

    The project must be associated with a host to proceed.

  4. Select the Jobs tab from the right pane.

    The Resource Change Job table is displayed.

    Figure 4–3 Sample: Resource Change Job Table

    Resource Change Job screen

  5. Click the New Resource Change Job button located in the table.

    The Resource Change Job wizard appears. The Overview panel appears.

  6. 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.

  7. 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.

  8. 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.

  9. 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.

  10. 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.

ProcedureTo Edit a Pending Resource Change Job

Use this procedure to make changes to a pending job whose status still shows as Queued in the Jobs table.

Steps
  1. If the Container Manager GUI is not already open, access it as described in To Start the Container Manager GUI.

  2. Select the Containers view in the navigation window.

  3. Select the Jobs tab from the right pane.

  4. 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.

  5. 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.

  6. When you have completed all changes, click Finish.

    The wizard is dismissed. The edits made to the job have been saved.

ProcedureTo View a Resource Change Job Log

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.

Steps
  1. If the Container Manager GUI is not already open, access it as described in To Start the Container Manager GUI.

  2. Select the Containers view in the navigation window.

  3. Select the Jobs tab from the right pane.

  4. 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.

  5. Click the View Log button.

    The log file for the resource change job appears.

Deleting Projects

You can delete a project and its container when both are no longer needed. Before deleting a project and its container, you must first remove the project from all the hosts with which it is associated. Deletion removes the container from the database, and the data previously collected for the project is no longer stored. Therefore, you cannot obtain any historical data for a deleted project as all data for the project is removed from the database. Being deleted is not considered a project state because the record and all historical data has been removed.

You cannot delete a project on the Solaris 8 OS unless all processes that are running in that project have been stopped.

When a project is deleted, the following happens depending on the Solaris version you are running:

Solaris 8 OS

The lnode is deleted, followed by the project.

Solaris 9 OS and Solaris 10 OS

Processes that are running in the project are moved to the default project, and the entry is deleted from the /etc/project database.

ProcedureTo Delete a Container

Steps
  1. If the Container Manager GUI is not already open, access it as described in To Start the Container Manager GUI.

  2. Verify that no inactive or active projects exist for the container.

  3. Select the Containers view in the navigation window.

  4. Select the container that is to be deleted.

  5. Click Delete.

    The container is removed from the Containers view and is removed from the database.