Adaptive Agent Installation Windows 2012

1 Introduction

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 Input/Output (I/O)).

1.1 Document Purpose

The purpose of this document is to provide step-by-step instructions on how to install Adaptive Agent and configure the LoadMaster to use it. This document provides steps on how to install Adaptive Agent on Windows Server 2012. For instructions on previous versions of Windows Server, refer to the Install Adaptive Agent – Windows 2008, Technical Note document.

1.2 Intended Audience

This document is intended to be read by anyone who is interested in finding out how to install the Adaptive Agent tool.

1.3 Prerequisites

There are some prerequisites that must be in place before installing Adaptive Agent:

2 Install Adaptive Agent

Follow the steps in the sections below to install Adaptive Agent on Windows Server 2012.

2.1 Create a Dedicated User for Executing the Adaptive Agent

Create a user called lmagent and ensure the user is a member of the Performance Monitor Users group. To do this, follow the steps below:

1. Log in to Windows Server 2012 as an administrator.

Create a Dedicated User for.png

2. From the Start menu, click Administrative Tools.

Create a Dedicated User for_1.png

3. Double-click Computer Management.

Create a Dedicated User for_2.png

4. Expand Local Users and Groups.

5. Click Users.

6. Select Action from the application menu and click New User.

Create a Dedicated User for_3.png

7. Type lmagent as the User name and Full name.

8. Type a Description, for example LoadMaster Agent.

9. Fill out the other fields as needed. A password can be set but is not required.

10. Click Create.

11. Click Close.

12. Right-click lmagent and select Properties.

Create a Dedicated User for_4.png

13. Select the Member Of tab.

14. Click Add.

Create a Dedicated User for_5.png

15. In the Enter the object names to select field, enter Performance Monitor Users.

16. Click Check Names.

17. Click OK.

2.2 Install Internet Information Server

As an administrator, install the Internet Information Server by following the steps below:

Install Internet Information.png

1. From the Start menu, click Server Manager.

Install Internet Information_1.png

2. Click the Add roles and features link.

3. Click Next.

Install Internet Information_2.png

4. Select Role-based or feature-based installation.

Install Internet Information_3.png

5. Select the Select a server from the server pool option.

6. Select the appropriate server.

7. Click Next.

8. Select the server in the Server Pool section.

9. Click Next.

10. Expand Application Development. Select CGI.

11. Click Next.

Install Internet Information_4.png

12. Click Install.

Install Internet Information_5.png

13. Verify the installation of IIS by browsing to http://localhost.

2.3 Install Microsoft Windows Adaptive Agent

To install Adaptive Agent, follow the steps below:

1. Log in to Windows Server 2012 as an administrator.

2. Create a folder called load in the default IIS web root.

The default IIS web root is usually C:\inetpub\wwwroot.

3. Decompress the agent files.

Install Microsoft Windows.png

4. Copy the Lmperfagent.exe and LMperfagent-config.txt files into the load directory.

5. Open the Internet Information Services (IIS) Manager.

Install Microsoft Windows_1.png

6. Select the relevant connection on the left.

Install Microsoft Windows_2.png

7. Double-click ISAPI and CGI Restrictions.

Install Microsoft Windows_3.png

8. Click Add on the right in the Actions section.

Install Microsoft Windows_4.png

9. Navigate to LMperfagent.exe.

10. Change the drop-down to .exe.

11. Select LMperfagent and click Open.

Install Microsoft Windows_5.png

12. Type a Description, for example LMperfagent.

13. Select Allow extension path to execute.

14. Click OK.

Install Microsoft Windows_6.png

15. Expand the Sites folder on the left.

16. Expand Default Web Site.

17. Right-click the load folder and select Convert to Application.

Install Microsoft Windows_7.png

18. Ensure to configure the Connect as to use the lmagent user.

The lmagent user was created in the Create a Dedicated User for Executing the Adaptive Agent section.

Install Microsoft Windows_8.png

19. Verify that the settings are correct by using the Test Settings feature.

Install Microsoft Windows_9.png

20. Select Default Web Site in the Connections section.

21. Double-click Handler Mappings.

Install Microsoft Windows_10.png

22. Select CGI-exe.

23. Click Edit Feature Permissions on the right in the Actions section.

Install Microsoft Windows_11.png

24. Select the Execute check box.

25. Click OK.

Install Microsoft Windows_12.png

26. Test by going to http://localhost/load/LMperfagent.exe in a web browser.

27. A value between 0 and 99 is displayed.

2.4 Configure the LoadMaster

2.4.1 Set the Check Parameters

To set the configuration options for adaptive metrics, follow the steps below:

1. In the main menu of the LoadMaster WUI, select Rules & Checking > Check Parameters.

Set the Check Parameters.png

2. Type /load/LMperfagent.exe as the Adaptive URL and click Set URL.

The Adaptive Interval value determines how often the adaptive value is pulled. The Adaptive URL instructs the LoadMaster where to find the value. The 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\load\LMperfagent.exe then the Adaptive URL should be set to /load/LMperfagent.exe.

The Min Control Variable Value is a percentage that specifies the threshold below which the LoadMaster will switch to static weight-based scheduling, for example weighted round robin. The value is a percentage of the maximum load, but the maximum valid value of this field is 50. The default is 5. 5 is also the KEMP-recommended value for this field. If the Min Control Variable Value is set to 10, the weight will never be set below 10.

2.4.2 Configure the Virtual Services

To configure the LoadMaster to use LMperfagent.exe, the Scheduling Method in the Virtual Service(s) must be set to resource based (adaptive). To set this, follow the steps below in the LoadMaster Web User Interface (WUI):

1. In the main menu of the WUI, select Virtual Services > View/Modify Services.

2. Click Modify on the relevant Virtual Service.

Configure the Virtual Services.png

3. Expand the Standard Options section.

4. Select resource based (adaptive) as the Scheduling Method.

5. Repeat the above steps for any other Virtual Services as needed.

6. Expand the Real Servers section.

Configure the Virtual Services_1.png

7. Click Add New.

8. Fill out the details as needed and click Add This Real Server.

Configure the Virtual Services_2.png

After adding a Real Server that has LMperfagent installed (and selecting resource based as the Scheduling Method for the Virtual Service), the adaptive value is displayed in Statistics > Real Servers.

Configure the Virtual Services_3.png

You can run the lmagent from command line or by navigating to the website and lmagent directory. From the command line, you can run it as the admin user, use the lmagent user, or run it in debug mode. This is useful for testing permissions and running it in verbose mode (refer to the Troubleshooting section for further information). Running it from a browser simulates the way the LoadMaster obtains the value. Therefore, the values should match regardless of what way you have accessed it.

2.5 Configuration File

If you look at the configuration file (in C:\inetpub\wwwroot\load - 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.

Configuration File.png

The five fields are described below:

  • WEIGHT (% of 100): The weight that the specified metric has on the overall performance value reported.
  • MAX VALUE: The top range of the value reported by that metric. For example - if you were to measure system memory and the system had 2 GB of internal memory, the maximum value would be 2048 MB. If the memory utilization was 1024 MB, the value reported would be 50, because 50% of the memory is utilized.
  • DIRECTION: The direction column indicates if the value is an up or down value. A good example to illustrate the difference between an up or down metric is a metric that reports memory. If the metric reports memory available, then it is a “down” metric. As the metric value goes down, the value reported goes 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 instead the metric reported memory utilized, a value of 2048 MB of RAM would mean that no RAM was being used, and the value reported would be 1. If the memory utilized shot up to 2048 MB, the value reported would be 101.
  • HARD LIMIT VALUE: Setting a value here causes the agent to override all other metrics and ignore their weights. The agent reports 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 reports 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.
  • COUNTER: The metric itself. A list of available metrics can be found in the example configuration file. Additional information is available in the README file.

2.6 Troubleshooting

Some of the common problems occur due to issues with permissions. Try logging in with the lmagent user and try running the agent using the command line:

Troubleshooting.png

1. Navigate to the load folder.

2. Run LMperfagent.exe in verbose mode by typing LMperfagent.exe v.

If it runs when you are logged in as lmagent, permissions are OK.

Check the memberships of the lmagent user and verify that the access level is high enough. Ensure that the configuration file for the agent can be read by the lmagent user and is located in the load directory.

2.6.1 Negative Values

The normal weighted performance load value should be between 0 and 99. A value of 101 means that a Real Server is disabled.

A negative value means that a parameter is configured incorrectly. For example, by default the configuration file isn set with 2048 MB of memory. If your server has a greater value and more than 2048 MB of RAM is being used, a value of more than 100% is returned for memory used. If 2048 MB is set as the memory value and 4096 MB is in use, an adaptive value of -200 is displayed.

2.6.2 Common Error Codes

Common error codes and their meanings are listed below:

  • 1 – Unable to open the local LMperfagent-config.txt file
  • 2 – Unable to open a performance query
  • 3 – Error collecting performance query data
  • 4 – Error closing performance query

References

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

Install Adaptive Agent – Windows 2008, Technical Note

Last Updated Date

This document was last updated on 28 March 2018.

Was this article helpful?

0 out of 0 found this helpful

Comments