Distribute load generators
This topic describes the different types of load generators, and how to distribute them to groups in a performance test. It also describes how to assign elastic load generators to a test.
In this topic:
- About load generators
- Customize load generator attributes
- Distribute load generators among Vuser groups in a test
- Assign elastic hosts to a test
About load generators
A load generator is a host machine on which Vusers run during a test. There can be many load generators for a given test. While these Vusers run, they create load on your system, enabling you to analyze your system under load.
A load generator can be located on either a local computer or in the cloud. A performance test can include both local and cloud-based load generators.
Below are the different types of load generators:
Type |
Description |
---|---|
Specific |
An actual load generator. For example, machine host1, located in London. |
Automatch |
A load generator placeholder, for example LG1. When you assign an automatch load generator to a Vuser group, you are not assigning a specific load generator to the group, but rather a placeholder for a load generator with specific properties. At runtime, specific load generators in the host pool of the project that have the same properties as the automatch load generators, are allocated in place of the automatch load generators. |
Elastic Cloud (Available only if a cloud account has been set up for provisioning load generators and cloud hosts have been provisioned) |
A load generator placeholder, for example CLOUD1, that is provisioned on the cloud. When you assign an elastic cloud load generator to a Vuser group, you are assigning a placeholder for a load generator with specific properties according to the load generator image. At runtime, the required number of cloud load generators are provisioned and allocated in place of the elastic load generators. When the run finishes, the cloud load generators are de-provisioned. For more details, see Manage elastic cloud hosts. |
Elastic Docker (Available only if the project is linked to an orchestrator in LoadRunner Enterprise Administration) |
A load generator placeholder, for example DOCKER1, that is installed and run on a Docker distribution. When you assign an elastic Dockerized load generator to a Vuser group, you are assigning a placeholder for a load generator with specific properties according to the load generator image. At runtime, the required number of Dockerized load generators are provisioned and allocated in place of the elastic load generators. When the run finishes, the Docker containers and load generators are de-provisioned. For more details, see Automatic provisioning of Docker hosts. |
Note: Each Elastic load generator you assign is considered as a group. Therefore, if you define a test with three Elastic load generators under one Vuser group (script), you will see three groups for each load generator or Docker container when the test runs.
Customize load generator attributes
You can customize load generator attributes.
When customizing load generator attributes, consider the following:
-
Create attributes that represent properties about your hosts that will help tell one host apart from another host when using them for performance testing.
-
Because you can select multiple attributes for your host, you can define an unlimited number of host attributes. They do not need to be related.
-
Host attributes can refer to anything. For example, Host Memory - High, Spanish environment, Very slow machine.
Customize host attributes
-
In LoadRunner Enterprise Administration, select Maintenance > Hosts, and click Manage Host Attributes.
-
To add an attribute, click
Add Host Attribute. Enter a name for the attribute in the Add New Host Attribute box, and click Add. The host attribute is added to the host attributes list.
-
To delete attributes, select the attributes you want to delete and click
Remove Host Attribute. The selected host attributes are removed from the host attributes list.
-
To edit an attribute, select the attribute you want to change and click
Edit Attribute. Modify the attribute as required, and click Close.
Assign attributes to hosts
-
In LoadRunner Enterprise Administration, select Maintenance > Hosts, and select the hosts to which you want assign attributes.
-
In the Hosts toolbar, click Assign Host Attributes.
-
Select the attributes to assign to the hosts, and click Assign.
Distribute load generators among Vuser groups in a test
This task describes how to distribute load generators among Vuser groups participating in the performance test.
-
Add Vuser groups to participate in the test. For details, see Define test workloads.
-
Distribute load generators
-
In the Performance Test Designer window, select the Groups and Workload tab.
If load generators have already been assigned to a group, the script name and type, and the number of assigned Vusers
and load generators
are displayed. Click Show LG names to display the names of the load generators. You can also view details of assigned load generators in the Load Generators tab.
Click
Filter to filter the list of groups displayed in the grid. For details, see Filter.
If you want to replace the script assigned to the group with a different script, select the script and click
Replace script for existing group. Select a script to replace the existing one assigned to the group, and click Replace & Close.
-
From the Groups pane toolbar, click
Assign LGs and select the type of load generators you want to assign to each group: Specific, Automatch, Elastic Cloud, or Elastic Docker load generators. For user interface details, see Assign Groups to Load Generators dialog box.
-
-
Select the groups to use in the test
In the Groups pane, select the groups to which you want to assign load generators. You can use
to search the list of groups by name.
-
Specify the load generators to assign to the groups
-
In the Load Generators pane, select the load generators you want to assign to the selected groups from the load generator types (see About load generators).
You can use
to search the list of load generators by name or attributes. The number of each load generator type already assigned to the Vuser group are displayed adjacent to the load generator type tab.
Note:
-
The Elastic Cloud tab is displayed only if the project has been linked to a cloud account. For details, see Cloud accounts.
-
The Elastic Docker tab is displayed only if the project has been linked to an orchestrator. For details, see Automatic provisioning of Docker hosts.
-
You can add additional automatch or elastic load generators to the list by clicking
Add LGs, and entering the number of additional load generators required for the test. You can also update load generator properties by clicking the Properties link. For details, see Load Generator Management dialog box.
-
-
Select the check box for each load generator you want to assign to the selected groups.
To select all load generators in the column, select the check box next to the Name column heading.
Note: While hosts from older installations of LoadRunner Enterprise (up to three versions earlier) are still supported and are colored orange, we recommend upgrading them to the current LoadRunner Enterprise version before using them. Versions displayed in red are no longer supported and cannot be used to run tests.
-
Click Apply Assignment to assign the selected load generators to the selected groups in the test.
Conversely, if you want to unassign load generators from a group, clear the check box for each load generator you want to unassign, and click Apply Assignment.
-
Click Save Test to save your settings.
-
To view all load generators assigned to a group, select the group in the Groups pane, and in the group details pane on the right, select the Load Generators tab. The grid displays the name and load generator type, and the number of groups to which the load generator is assigned.
-
If you want to unassign load generators from groups or replace them with other load generators, select the groups and load generators that you want to change, and select Unassign or Replace with another LG.
-
If you want to unassign load generators from groups, select the groups and load generators that you want to unassign, and select Unassign.
-
If you want to replace load generators with other load generators, select the groups and load generators that you want to change, and select Replace with another LG. In the Replace Load Generators dialog box, select the load generators you want to assign to the selected groups.
-
-
Select properties for the automatch load generators - optional
You can select properties for the automatch load generators that are assigned to Vuser groups in your test. Properties include a location and other attributes. At runtime, each automatch load generator is matched up with an available specific load generator (in the host pool of the project) with the same properties.
-
To select properties for automatch load generators, select More >
LG Management to open the Load Generator Management dialog box.
-
Select one or more automatch load generators for which you want to define the same settings, and enter a location and/or host attributes.
You can also use Copy
to copy properties from one automatch load generator, and Paste
to paste them to multiple automatch load generators.
To see the updated properties for an automatch load generator, you need to clear the check box, and then select it again.
Note:
-
You can only copy properties from hosts that are assigned to the test.
-
Properties are only saved for hosts that are assigned to groups within this test.
-
If no properties are specified, the automatch load generator is matched up with any load generator in the project's host pool.
-
For user interface details, see Load Generator Management dialog box.
-
Assign elastic hosts to a test
Using Elastic Cloud and Elastic Docker hosts automates the testing process by provisioning and de-provisioning hosts on demand, and seamlessly adds them to tests on the fly without having to reserve resources in advance.
-
Prerequisites
-
To assign Elastic Cloud hosts to a test, a cloud account must have been set up for provisioning load generators. For details, see Provision elastic cloud load generators.
-
To assign Elastic Docker hosts to a test, the project must be linked to an orchestrator (performed by your LoadRunner Enterprise administrator). For details, see Set up Dockerized hosts.
-
-
Select a test
In LoadRunner Enterprise, click Open the navigation toolbar
and select Test Management (under Testing). Select a performance test in the test management tree, and click Edit Test.
-
Assign elastic cloud-based or Dockerized load generators to Vuser groups
Follow the steps in Distribute load generators among Vuser groups in a test, and assign Elastic Cloud or Elastic Docker load generators to the groups for the test.
-
Set the post run action to collate results (if your LoadRunner Enterprise administrator did not set a post run action)
To ensure that run results are not lost after a performance test ends (since elastic hosts are freed immediately after the run finishes), we recommend you select Post Run Action to Collate Results. For details, see Post Run Action.
-
Save and then run the test to check its performance. For details on running a test, see Run performance tests.
When the test has finished, the elastic hosts are automatically removed from the test.
See also: