Install Adaptive Agent

 

1Prerequisites

To utilize the LoadMaster server agent you will need the following:

  • A LoadMaster installation, running at least LoadMaster version 3.1-57
  • A Windows Server 2008 server, running IIS (5.0 or later)
  • The permissions to setup Common Gateway Interface (CGI) applications under IIS

2Overview

A KEMP LoadMaster determines how to best distribute load among available Real Servers by a variety of methods. These can include the availability of the servers (by doing health checking), as well as both active connections and connection rates to the Real Servers.

It may be beneficial however to also have information on the performance characteristics of the Real Servers themselves. This is possible through the “adaptive” load balancing method in the load balancer. In conjunction with an agent, the LoadMaster can distribute traffic based on the load on the actual server, which can include CPU load, disk load, and other performance metrics.

The LoadMaster Server Agent works by residing on a server and reporting back to the LoadMaster on how loaded the server is. The metrics used to determine the system's load are entirely configurable by the user.

The LoadMaster Agent simply reports a number, between 1 and 100, with 1 being the idlest and 100 being the busiest. The number is determined by the parameters specified in the configuration file. It can include only one performance metric (such as CPU utilization), or be a combination of up to eight different metrics (such as CPU utilization, memory utilization, disk I/O).

3Setting up the Real Server

The first step is to choose where the agent will reside. The agent exists as a CGI program, and it must be somewhere within the webroot, available to the LoadMaster. The LoadMaster will retrieve the load value through an HTTP call, so it must exist in the webroot.

For instance, if the webroot is C:\Inetpub\wwwroot\site1\, then the agent could be placed in C:\Inetpub\wwwroot\site1\LMagent\.

The two files required are LMperfagent.exeand LMperfagent-config.txt. They must be together in the same directory. There is also a file called LMperfagent-config.xls, which is a file you can edit in Microsoft Excel if you find that easier to work with. If you do edit it in Excel you must save the file as a text file (.txt) as the .xls file will not be read.

4Configuration File

If you look at the configuration file (either the .txt file in a text editor, or the .xls file in a spreadsheet editor), you will see that each metric has its own line, and each line consists of five different fields.

The first field is the weight that the specified metric has on the overall performance value reported. The second field is the top range of the value reported by that metric. For example, if you were to measure system memory in terms of megabytes, and the system had 2 GB of internal memory, the maximum value would be 2048. If the memory utilization was 1024, then the value reported would be “50”, since the memory is 50% utilized.

The third field is weather the value is an up or down value. A good example to illustrate the difference between and up or down metric would be a metric that reports memory. If the metric reports memory available, then it would be a “down” metric. As the metric value goes down, the value reported would go up. A system with 2048 MB of RAM that reports 0 memory available would be a fully utilized system, so it would report 101.

If the metric reported memory utilized, a value of 2048 MB of RAM would mean no RAM was being used, and the value reported would be 1. If the memory utilized shot up to 2048, then the value reported would be 101.

The fourth field is the hard limit value. Setting a value here will cause the agent to override all other metrics, and ignores their weights, and report a 100% loaded condition if this threshold is reached. This could be used for CPU utilization.

If you have CPU weighted to 50%, and you have disk I/O and pages per second each weighted at 25%, you can have a situation where disk I/O and pages per second are nearly at zero, but the CPU hits 100%. In that situation, the agent would report 50% utilization to the LoadMaster. If there is a hard limit set at 100 for CPU - if the CPU hit 100 the agent would report 101.

And the fifth field is the metric itself. A list of available metrics can be found in the example configuration file. Additional information is available in the README file.

5IIS Configuration

Once the files are in place, and the configuration is set (adjustments can be made later, of course), then IIS needs to be configured.

  1. First, open the IIS configuration manager by navigating toControl Panel >Administrative Tools, and opening Internet Information Services (IIS) Manager.

Figure 1: Web Services Extension

  1. Click the Web Service Extensionsfolder in the left panel and click Add a new Web service extension...on the right..
  2. Enter LMperfagent.exe as the extension name and click Add.

Figure 2: Adding Exectuable

  1. Browse for and select the LMperfagent.exe file.
  2. Go to Web Sites in the main window. Select your site and selectProperties.

Figure 3: Home Directory Configuration

  1. Select the Home Directory tab.
  2. Select Scripts and Executables in the Execute permissions drop-down list.
  3. Click the Configuration... button.
  4. Click Add.
  5. For executable, select the LMPerfagent.exe file, and enter in exe under extension.
  6. Remove the tick from the Script engine checkbox, and click OK.

6Registry

There is one more step required; set the Windows registry to provide access to the perflib counters to the agent.

  1. Open the Registry Editor, by clickingStart, selecting Run, and entering regedit.

Figure 6‑1: Perflib folder

  1. In the panel on the left, navigate toHKEY_LOCAL_MACHINE >SOFTWARE >Microsoft >Windows NT > CurrentVersion> Perflib.
  2. SelectPermissionsfor Perflib.
  3. Select Add.
  4. The group being added is called Everyone.

Figure 4: Perflib Permissions

  1. Once that has been added, “Everyone” will have no read/write permissions. Select the box that gives read permission, and click Apply.

Do NOT give Perflib write permissions.

The setup can be tested by navigating to the URL in any browser. A number should immediately appear. The browser can be used to help tweak the results reported.

6.1Repeat

Repeat the above steps for each Real Server that to be included in adaptive load balancing.

All Real Servers configured on a LoadMaster do not necessarily need to have an agent installed. However, all Real Servers in a Virtual Service that is configured for adaptive load balancing do need to have the agents configured.

7Setting up the LoadMaster

In the LoadMaster Web User Interface (WUI), select the Rules & Checking link in the main menu, and then select Check Parameters. The configuration options for adaptive metrics should appear.

Figure 5 Adaptive Parameters Configuration

If the Adaptive Parameters section is not on this screen it may be due to the Scheduling Method that is selected in the Virtual Services. In order to see the Adaptive Parameters section on this screen, the Scheduling Method must be set to resource based (adaptive) for at least one Virtual Service.

The Adaptive Interval (sec) determines how often the adaptive value is pulled. The Adaptive URL tells the LoadMaster where to find the value. Port specifies which port the web server is answering on.

If the webroot for “/” is C:\Inetpub\wwwroot\site1\, and the agent is located in C:\Inetpub\wwwroot\site1\LMagent\LMperfagent.exe, then the Adaptive URL should be changed to /LMagent/LMperfagent.exe.

After the Adaptive URL is input, press Enter on the keyboard and the changes will be saved.

The Min. Control Variable Value is a percentage that specifies a threshold below which the balancer will switch to static weight-based scheduling, i.e. normal Weighted Round Robin. The value is a percentage of the maximum load, but maximum value permitted is 50. The default is 5.

The Min. Weight Adjustment Value is a percentage that specifies the minimum weight that can be assigned to a server, as a percentage of the initial static weight it was given. For example, if the server was given 100 to start with and this adjustment value is 10, then the weight will never be set to below 10. A value of 5 is recommended, and the maximum value is 50.

8Virtual Service Configuration

Once the global settings are configured and the agent has been installed on the Real Servers, adaptive load balancing can be enabled on a per-Virtual Service basis. In the properties for each Virtual Service, there will be an option to select the Scheduling Method. Select resource based (adaptive) to enable adaptive load balancing.

Figure 6: Adaptive Load Balancing Option

9Statistics

When adaptive scheduling is enabled, the latest value can be seen as polled by the LoadMaster in the Real Servers Statistics page.

Figure 7: Real Server Statistics

10Troubleshooting

If the KEMP LoadMaster fails to retrieve an adaptive value from a Real Server, it will automatically assign an adaptive value of “100” to that Real Server. This will cause it to be given the least load possible.

References

Unless otherwise specified, the following documents can be found at http://kemptechnologies.com/loadmaster-documentation.

Web User Interface (WUI), Configuration Guide KEMP LoadMaster, Product Overview

Document History

Date

Change

Reason for Change

Ver.

Res

Jan 2009

Initial draft of the document

First draft

1.0

DD

May 2013

Minor updates

Release 7.0-4

1.1

DD

May 2013

Updated copyright

Updated section

1.2

LB

July 2013

Release updates

Release 7.0-6

1.3

LB

Oct 2013

Minor changes

Aesthetic changes

1.4

LB

Jan 2014

Minor changes

Update to Copyright

1.5

LB

Mar 2014

Minor change

Update to

1.6

LB

Oct 2015

Release updates

Updated for 7.1-30

3.0

LB

Jan 2016

Minor change

Updated

4.0

LB

Was this article helpful?

0 out of 0 found this helpful

Comments