Citrix Presentation Server Load Management – Part 3: Load Evaluators

If you missed the other articles in this series please read:

The final part of this three-part series will provide insight into the Citrix supplied load evaluators and the many available load evaluator rules. Several tips for creating custom load evaluators along with suggestions for successful monitoring to ensure the success of a load management strategy will complete the load management picture.

Introduction

Of all the components in the load management subsystem, load evaluators and load evaluator rules are probably the most misunderstood. It is quite common to find Citrix Presentation Server farms using the “Default” load evaluator and often times administrators don’t even realize this load evaluator is in use. If no load evaluators are specifically assigned to a Presentation Server, the “Default” load evaluator will be applied to that particular server automatically. Is the “Default” load evaluator satisfactory for most Presentation Server environments? In most cases the answer to this question is “no”, but there are exceptions which should be explored in more depth.

Citrix Supplied Load Evaluators; To use or not to use, that is the question!

Two load evaluators are present in the basic installation of Presentation Server Advanced and Enterprise editions; “Default” and “Advanced”. The “Default” load evaluator consists of a single rule, “Server User Load”, and is synonymous with “Round Robin” load balancing in the DNS world. With the “Default” load evaluator in place, the only criteria the load management subsystem will use in determining the server load, or “Score” is simply the number of current ICA sessions running on the server. The “Default” load evaluator uses a maximum value of 100 sessions, meaning full load (a load value of 10,000) is reached when the particular server has 100 sessions. Since Citrix chose to use a nice round number like 100, it becomes quite easy to calculate how this will extrapolate from zero sessions to 100 sessions. The load value will be 2500 with 25 active sessions, 5000 with 50 active sessions, 7500 with 75 active sessions, etc. In farms where all servers consist of the same hardware configuration (number of processors, processor speed, amount of memory), AND the same applications are installed on each and every server, AND each and every application is published on all servers, AND all users utilize all applications the same way, the “Default” load evaluator will probably suffice. However, keep in mind the “Default” load evaluator does nothing to consider how resources are utilized, such as processor and memory; it only cares about the number of sessions. For example, if two servers have 25 and 26 active sessions respectively, and a request for a new session is generated, the server with 25 sessions will be the host of that new session. That’s right; even if the server with 25 sessions has a processor utilization that is running 50 percentage points higher than the server with 26 sessions, the “Default” load evaluator will “balance” the load by causing both servers to serve 26 sessions apiece.

Before you scramble to unassign the “Default” load evaluator from all your Presentation Servers, let’s look at the second of the Citrix supplied load evaluators, the “Advanced” model.  Most experienced Citrix administrators would agree the two most important resources on a Citrix server are processor and memory. Since the “Advanced” load evaluator contains both of these rules (in addition to the “Page Swaps” rule), it must be the ticket, correct? The “Advanced” load evaluator does indeed result in more intelligent load management versus the “Default” load evaluator by weighing heavily the two most critical resources on a Presentation Server. In fact, in some cases the “Advanced” load evaluator can be a part of a very successful load management strategy. However, an argument could be made regarding the maximum values for both the “CPU Utilization” and the “Memory Usage” rules as configured in the “Advanced” load valuator, as they are both set at 90%. This argument would be based on these values being too high; that once a server has reached and sustained 90% of either of these two resources the users on this particular server will already be experiencing performance degradation. A Presentation server running with 90% of its processor or memory depleted will not provide a high quality user experience.

Which way should we turn? A Custom Load Evaluator

Arguments have now been presented against both Citrix supplied load evaluators, leaving us to ponder, which way should we turn? The best alternative is to create your own custom load evaluator using load evaluator rules and maximum values that are the most optimal for your current environment. Then apply this custom load evaluator to your Presentation Servers, monitor resource utilization and session load distribution, and tweak the load evaluator rules and/or values until load balancing nirvana is reached. This method will ensure a more equitable distribution of sessions with regard to server resources, and with the proper maximum values present will also prevent overloading of any servers in the farm.

In order to create a functional load evaluator it is necessary to understand how load evaluator rules apply, and how the individual rules function. Figure 1 shows the list of available load evaluator rules within the Citrix Presentation Server Console. Note that selecting a particular rule brings up an explanation of that specific rule, as shown in figure 2. This is a quick and easy method for learning more about the individual rules. In addition, the rules are discussed in the Citrix CTX-1256BI courseware, and in the Load_Manager_Guide.pdf, which can be found in “Document Central” on the Presentation Server itself.


Figure 1


Figure 2

The old common sense rule “keep it simple” definitely applies when creating and attaching load evaluators. The more complicated the load evaluator, the more effort will be required to calculate the load value. The more load evaluators that apply to a given scenario, the less effective the load management strategy will be. A good rule to follow when creating a load evaluator is to keep it lean and mean; that is use the fewest rules possible to obtain your objectives. For example, if your sole objective is to distribute user load as evenly as possible across your Presentation Servers, a load evaluator with as few as 2 rules (CPU Utilization & Memory Usage) could suffice. If the requirements also contain items such as creating a server maintenance window, the “Scheduling” rule would need to be added to prevent access to the servers during the maintenance window period. Additional objectives may require more load evaluator rules to be included in your custom load evaluator. Starting with a list of objectives and a thorough understanding of the available load evaluator rules will allow you to create custom load evaluator(s) that will provide the best possible results for your particular environment.

Beware: Multiple Load Evaluators May Apply

Another characteristic of load evaluators is they can be applied to servers and published applications. You can only apply a single load evaluator at a time to either a server or a published application; however this does not mean that a hard limit of only one load evaluator applied on a given server is in place. Consider a scenario where ten load evaluators have been created, and the first load evaluator is applied to the servers in the farm. Things are fine at this point, but not for long as you will see! The next steps in this scenario consist of applying each of the remaining nine load evaluators to nine published applications, respectively. With no user sessions on a server, a single load evaluator will be in effect; the one applied to the servers. However, if user sessions present on this particular server happen to be running all nine of the published applications on this server, suddenly all ten load evaluators will be in effect, and the “keep it simple” rule has been violated. Imagine how complex this situation would be if separate load evaluators were applied to each and every published application in a farm. The result would be a completely non-functional load management subsystem and ultimately a serious impact to end user performance.

Monitoring the Load Management Process

Once a sensible load management strategy has been executed the only task remaining is to effectively monitor this process to ensure the strategy in place has met your objectives. Fortunately there are several tools provided by Citrix to track the load management process and ensure it is in an optimal state. The least useful tools are found in the Presentation Server Console; the “Load Manager Log”, which is found on the “Log” tab, under the “Load Evaluators” node, and the “Load Manager Monitor”, found on the “Load Manager Monitor” tab under the properties of a particular server. The logging service of the “Load Manager Log” is off by default and must be manually enabled to begin collecting data. Furthermore, the log file has a hard coded limit in size and does not provide for automatic purging of older data; once the log file is full, logging stops. Logging will not begin again until the log file has been manually saved to another file and cleared. Figure 3 displays the choices from the “Log” selection under the “Actions” menu. As you can see, logging must be enabled by an administrator, and the log must be manually saved and cleared.


Figure 3

The “Load Manager Monitor” provides a graph of load evaluators applied to a particular server, one server at a time. The graph can also be viewed in a window separate from the Presentation Server Console, but provides a weak view of load management compared to other tools available.

The most useful tools to track the load management process are command line tools. The “QFARM /LOAD” command provides a real time view of Presentation Servers and their corresponding load values. Figure 4 shows the result of this command in a simple two server farm:


Figure 4

Another very useful command line tool is “QueryDS.exe”. Unfortunately this tool is not installed with Presentation Server. It is located along with several other command line tools on the Presentation Server CDROM under “Support\debug\w2k3” for the Windows 2003 media, or “Support\debug\w2k” if you are using the Windows 2000 media. Simply copy this file to your Presentation Servers to unlock its potential. QueryDS can query data contained on the data collectors regarding the load management subsystem (LMS). The three tables that can be queried are:

  1. “LMS_AppLoadTable” – Information on load management for published applications. This table will only contain data when a load evaluator is applied to a published application.
  2. “LMS_ServerLoadTable” – This will show the current load value for all servers in the zone, along with the rules applied and the current value for each rule.
  3. “LMS_LicensedServerTable” – Provides a list of all licensed servers in the farm and which zone each server is a member of.

Figure 5 is the result of the following command: “queryds /table:LMS_ServerLoadTable”. Note two very important things; the table names are case sensitive, and two of the three tables display information for the local zone only. The only table that will display data from more than one zone is the “LMS_LicensedServerTable”. There is no option for specifying the zone you wish to query; QueryDS always queries the local data collector. The “/query” argument allows the output to be filtered based on certain desired information. Specifying the “/query” argument and piping the QueryDS command’s output to a utility such as “grep” or “findstr” can provide a powerful method for monitoring the load management process.


Figure 5

As you can see QueryDS provides a real time insight into the load values for all servers in a given zone, going beyond just the total server load value and specifying the individual rules and how each rule is weighing in. In Figure 5 above, we can see there are 2 load evaluator rules applied to this particular server; rule #3 (Memory Usage) has a value of 64, while rule #1 (CPU Utilization) has a value of 0. Comparing this data to information gathered via Windows Performance Monitor or Citrix Resource Manager will allow you to judge whether your load management strategy is functioning according to plan. Additional tools provided by Citrix are the CTXtrace utility and its GUI counterpart the Common Diagnostic Facility present in the Access Suite Console. These tools are rather complex to use effectively and are well beyond the scope of this article, but you should be aware these options exist if you have a need to dig deeper into the load management process.

Conclusion

This three part series has provided an insight into the inner workings of the load management subsystem, which is critical to a successful Citrix Presentation Server deployment. A better understanding of the components that effect load management along with suggestions for creating and monitoring a successful load management strategy should  provide Citrix administrators with the information necessary to address this small, but powerful piece of Citrix Presentation Server environments.

If you missed the other articles in this series please read:

Leave a Comment

Your email address will not be published.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top