Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Workload Manager User's Guide: Version A.03.02.02 > Chapter 2 WLM quick start: the essentials for using WLM

Some common WLM tasks

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

WLM is a powerful tool that allows you to manage your systems in numerous ways. The following sections explain some of the more common tasks that WLM can do for you.

Migrating cores across partitions

WLM can manage SLOs across virtual partitions and nPartitions.

You must use Instant Capacity cores (formerly known as iCOD CPUs) on the nPartitions for WLM management. WLM provides a global arbiter, wlmpard, that can take input from the WLM instances on the individual partitions. The global arbiter then moves cores between partitions, if needed, to better achieve the SLOs specified in the WLM configuration files that are active in the partitions. These partitions can be nested—and even contain FSS and PSET-based workload groups. (wlmpard can be running in one of the managed partitions or on a supported platform with network connectivity to the managed partitions.)

HP-UX Virtual Partitions are software-based virtual systems, each running its own instance of the HP-UX operating system. WLM can move processors among these virtual systems to better achieve the SLOs you define using WLM within each virtual system.

nPartitions (nPars) are hardware-based partitions, each running its own instance of the HP-UX operating system. Using Instant Capacity (formerly known as iCOD) software, WLM can manage your SLOs across nPartitions by simulating the movement of processors among nPartitions. (The processor movement is simulated by deactivating cores on one nPartition and activating cores on another nPar.)

Configuring WLM to manage SLOs across virtual partitions and nPartitions requires the following steps. For details and restrictions, see Chapter 7 “Managing SLOs across partitions”.

  1. (Optional) Set up secure WLM communications.

    Follow the procedure HOW TO SECURE COMMUNICATIONS in wlmcert(1M)—skipping the step about starting/restarting the WLM daemons. You will do that later in this procedure.

  2. Create a WLM configuration file for each partition.

    Each partition on the system must have the WLM daemon wlmd running. Create a WLM configuration file for each partition, ensuring each configuration uses the primary_host keyword to reference the partition where the global arbiter is running. For information on the primary_host syntax, see “Setting up your WLM configuration file”.

  3. (Optional) Activate each partition’s WLM configuration in passive mode.

    WLM operates in “passive mode” when you include the -p option in your command to activate a configuration. With passive mode, you can see approximately how a particular configuration is going to affect your system—without the configuration actually taking control of your system.Activate each partition’s WLM configuration file configfile in passive mode as follows:

    # wlmd -p -a configfile

    For information on passive mode, including its limitations, see “Passive mode versus actual WLM management”.

  4. Activate each partition’s WLM configuration.

    After verifying and fine-tuning each partition’s WLM configuration file configfile, activate it as follows:

    # wlmd -a configfile

    To use secure communications, activate the file using the -s option:

    # wlmd -s -a configfile

    The wlmd daemon runs in secure mode by default when you use the /sbin/init.d/wlm script to start WLM. (If you upgraded WLM, secure mode might not be the default. Ensure that the appropriate secure mode variables in /etc/rc.config.d/wlm are set correctly. For more information on these variables, see “Securing WLM communications”.)

  5. Create a configuration file for the global arbiter.

    On the system running the global arbiter, create a configuration file for the global arbiter. (If this system is being managed by WLM, it will have both a WLM configuration file and a WLM global arbiter configuration file. You can set up and run the global arbiter configuration on a system that is not managed by WLM if needed for the creation of fault-tolerant environments or Serviceguard environments.)

    This global arbiter configuration file is required. In the file specify the:

    • Global arbiter interval

    • Port used for communications between the partitions

    • Size at which to truncate wlmpardstats log file

    • Lowest priority SLO at which Temporary Instant Capacity (v6 or later) or Pay per use (v4 , v7, or later) resources are used

      NOTE: Specifying this priority ensures WLM maintains compliance with your Temporary Instant Capacity usage rights. When your prepaid amount of temporary capacity expires, WLM no longer attempts to use the temporary resources.

      When 15 or fewer processing days (the default) of temporary capacity are available, WLM stops activating Temporary Instant Capacity; in this case, you must purchase extra capacity. Before you add the capacity, stop wlmpard (using the -k option). For information about how to stop wlmpard, see Appendix A “WLM command reference”.

      You can change the 15-day default by setting the WLM global arbiter utility_reserve_threshold keyword. For more information, see “Specifying the reserve threshold that determines when WLM stops activating temporary capacity resources” or see wlmparconf(4).

    For information on the syntax of this file, see the section “Setting up your WLM global arbiter configuration file” or see wlmparconf(4).

  6. (Optional) Activate the global arbiter configuration file in passive mode.

    Similar to the WLM passive mode, the WLM global arbiter has a passive mode (also enabled with the -p option) that allows you to verify wlmpard settings before letting it control your system.

    Activate the global arbiter configuration file configfile in passive mode as follows:

    # wlmpard -p -a configfile

    Again, to see approximately how the configuration would affect your system, use the WLM utility wlminfo.

  7. Activate the global arbiter.

    Activate the global arbiter configuration file as follows:

    # wlmpard -a configfile

    To use secure communications, activate the file using the -s option:

    # wlmpard -s -a configfile

    The global arbiter runs in secure mode by default when you use the /sbin/init.d/wlm script to start WLM. (If you upgraded WLM, secure mode might not be the default. Ensure that the appropriate secure mode variables in /etc/rc.config.d/wlm are set correctly. For more information on these variables, see “Securing WLM communications”.)

Providing a fixed amount of CPU resources

WLM allows you to give a workload a fixed amount of CPU resources.

In the following graphic (created using the HP PerfView product), the workload receives a constant 15 CPU shares.

Within a single HP-UX instance, WLM allows you to allocate a fixed amount of CPU resources using:

  • portions of processors (FSS groups)

  • whole processors (PSETs)

You can also allocate a fixed amount of CPU resources to virtual partitions and nPartitions. HP recommends omitting from WLM management any partitions that should have a constant size. In such cases, WLM’s capability of migrating cores across partitions is not needed.

Portions of processors (FSS groups)

One method for providing a fixed amount of CPU resources is to set up an SLO to give a workload group a portion of each available processor. To set up this type of SLO:

NOTE: PRM must be installed on your system for WLM to be able to manage FSS groups.
  1. Define the workload group and assign a workload to it.

    In your WLM configuration file, define your workload group in a prm structure using the groups keyword. Assign a workload to the group using the apps keyword.

    The following example defines a group named sales.

    prm {
    groups = sales : 2;

    apps = sales : /opt/sales/bin/sales_monitor;
    }

    The sales_monitor application is placed in the sales workload group using the apps statement. For other methods for placing a workload in a certain group, see “How to put an application under WLM control”.

  2. Define a fixed-allocation SLO for the workload group.

    In the slo structure, use the cpushares keyword with total to request CPU resources for the workload group. The following SLO requests 15 CPU shares for the workload group sales. Based on SLO priorities and available CPU resources, WLM attempts to meet the request.

    slo fixed_allocation_example {
    pri = 2;
    entity = PRM group sales;
    cpushares = 15 total;
    }
  3. Activate the configuration as in the following example, substituting your configuration file’s name for config.wlm:

    # /opt/wlm/bin/wlmd -a config.wlm

Whole processors (PSETs)

Another method for providing a workload group with a fixed amount of CPU resources is to define the group based on a PSET. The PSETs feature is available for HP-UX 11i v1 (B.11.11) by downloading software from the following Web site free of charge:

http://www.hp.com/go/wlm

Select the Patches/support link and search for “processor sets”.

PSETs are included starting with v2 (B.11.23) of HP-UX 11i.

As in the previous case, the workload requires a constant amount of CPU resources. Placing the workload in a workload group based on a PSET, the workload has sole access to the processors in the PSET.

NOTE: PRM must be installed on your system for WLM to be able to manage workgroups based on PSETs.

To place an application in a workload group based on a PSET:

  1. Define the workload group based on a PSET and assign a workload to it.

    In your WLM configuration file, define your workload group in a prm structure using the groups keyword. Assign an application to the group using the apps keyword. Use the gmincpu statement to set the minimum CPU usage.

    The following example shows the sales group as a PSET that is assigned two cores through a gmincpu statement. (When using gmincpu for a group based on a PSET, 100 represents a single core. Thus, 200 represents two cores.) The application sales_monitor is assigned to the group:

    prm {
    groups = sales : PSET;

    apps = sales : /opt/sales/bin/sales_monitor;

    gmincpu = sales : 200;
    }
    NOTE: When WLM is managing PSETs, do not change PSET settings by using the psrset command. Only use WLM to control PSETs.
  2. Activate the configuration as in the following example, substituting your configuration file’s name for config.wlm:

    # /opt/wlm/bin/wlmd -a config.wlm

Providing CPU resources for a given time period

For workloads that are only needed for a certain period of time, whether it is once a day, week, or any other period, WLM provides the condition keyword. This keyword is placed in an slo structure and enables the SLO when the condition statement is true.

By default, when the SLO is not enabled, its workload group gets its gmincpu value. If this value is not set, the workload group gets the minimum allocation possible. For FSS groups, this is 1% of the total CPU resources in the default PSET (the default PSET—also referred to as PSET 0—is discussed in “The default PSET (PSET 0) and FSS groups”). If the tunable extended_shares is set to 1, the minimum is 0.2% (with incremental allocations of 0.1%). For more information on the extended_shares tunable, see “Refining granularity of CPU (and memory) allocation by increasing shares per core (optional) ”. Setting the transient_groups keyword to 1 also changes the allocation behavior. For more information on this, see “Temporarily removing groups with inactive SLOs (optional)”.

The following figure shows a workload group with an SLO that is disabled initially. With the SLO disabled, the group is given its gmincpu value, which in this case is 5 shares. The SLO is enabled at 15:38, when an application is started, and the workload group eventually receives 50 CPU shares.

To provide a workload group with CPU resources on a schedule:

NOTE: This procedure applies only to PRM-based configurations (confined within a single instance of HP-UX). PRM must be installed on your system for WLM to be able to manage PRM-based workloads.

You can achieve similar functionality for configurations managing nPartitions and virtual partitions by using a condition keyword similar to the one shown in Step 2. For information on configuring WLM for migrating cores across partitions, see Chapter 7 “Managing SLOs across partitions”.

  1. Define the workload group and assign a workload to it.

    In your WLM configuration file, define your workload group in a prm structure using the groups keyword. Assign a workload to the group using the apps keyword.

    In this example, the sales group is the group of interest again.

    prm {
    groups = sales : 2;

    apps = sales : /opt/sales/bin/sales_monitor;
    }
  2. Define the SLO.

    The SLO in your WLM configuration file must specify:

    • A priority (pri) for the SLO

    • The workload group to which the SLO applies (entity)

    • Either a cpushares statement or a goal statement so that WLM grants the SLO’s workload group some CPU resources

    The condition keyword determines when the SLO is enabled or disabled.

    The following slo structure shows a fixed-allocation SLO for the sales group. When enabled, this SLO requests 25 CPU shares for the sales group. Based on the condition statement, the SLO is enabled between 8pm and 11pm every day.

    slo condition_example {
    pri = 1;
    entity = PRM group sales;
    cpushares = 25 total;
    condition = 20:00 - 22:59;
    }

    Whenever the condition statement is false, the SLO is disabled and does not make any CPU resource requests for the sales group. When a group has no enabled SLOs, it gets its gmincpu value (if set); if this value is not set, a group gets the minimum allocation possible. For FSS groups, this is 1% of the CPU resources of the default PSET (the default PSET—also referred to as PSET 0—is discussed in “The default PSET (PSET 0) and FSS groups”). If the extended_shares tunable is set to 1 and absolute CPU units are being used, this minimum is 0.2% (with incremental allocations of 0.1%). For more information on the extended_share tunable, see “Refining granularity of CPU (and memory) allocation by increasing shares per core (optional) ”.

    You can use times, dates, or metrics to enable or disable an SLO.

    For information on the syntax for the condition keyword, see wlmconf(4).

  3. Activate the configuration as in the following example, substituting your configuration file’s name for config.wlm:

    # /opt/wlm/bin/wlmd -a config.wlm

Providing CPU resources as needed

To ensure a workload gets the CPU resources it needs—without preventing other workloads access to unused CPU resources—WLM allows you to define usage goals. A major advantage with usage goals is that you do not need to track and feed a metric to WLM.

The following figure shows a workload that initially is using 20 CPU shares. The usage goal for the workload is to use between 60% and 90% of its allocation. With its beginning allocation at 32 shares, the workload is using 20/32 or 62.5% of its allocation. Later, the workload settles to using around 8 or 9 shares. WLM responds by reducing its allocation to 10 shares, still meeting the usage goal as long as usage stays between 6 and 9 shares.

With a usage goal, you indicate for a workload how much of its CPU allocation it should use. If a workload is not consuming enough of its current allocation, the workload’s CPU allocation is reduced, allowing other workloads to consume more CPU resources if needed. Similarly, if the workload is using a high percentage of its allocation, it is granted more CPU resources.

To define a usage goal for a workload group:

NOTE: This procedure applies only to PRM-based configurations (confined within a single instance of HP-UX). For information on configuring WLM for migrating CPU resources across partitions, see Chapter 7 “Managing SLOs across partitions”.

PRM must be installed on your system for WLM to be able to manage PRM-based workloads.

  1. Define the workload group and assign a workload to it.

    In your WLM configuration file, define your workload group in a prm structure using the groups keyword. Assign a workload to the group using the apps keyword.

    The following example shows the prm structure for the sales group.

    prm {
    groups = sales : 2;

    apps = sales : /opt/sales/bin/sales_monitor;
    }
  2. Define the SLO.

    The SLO in our WLM configuration must specify:

    • A priority (pri) for the SLO

    • The workload group to which the SLO applies (entity)

    • A usage goal statement

    The following slo structure for the sales group shows a usage goal statement:

    slo usage_example {
    pri = 1;
    mincpu = 20;
    maxcpu = 60;
    entity = PRM group sales;
    goal = usage _CPU 80 90;
    }

    With usage goals, WLM adjusts the amount of CPU resources it grants a workload group so that the group uses between 50% and 75% of its allocated CPU resources by default. In the previous example though, with the values of 80 and 90 in the goal statement, WLM would try to increase or decrease the CPU allocation for the workload group until the group is using between 80% and 90% of the allocated share of CPU resources. However, in attempting to meet the usage goal, the new CPU allocations to the workload group will typically be within the mincpu/maxcpu range.

  3. Set your interval to 5.

    With a usage goal, you should typically set wlm_interval to 5.

    tune {
    wlm_interval = 5;
    }
  4. Activate the configuration as in the following example, substituting your configuration file’s name for config.wlm:

    # /opt/wlm/bin/wlmd -a config.wlm

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2000-2007 Hewlett-Packard Development Company, L.P.