Notes on MetaFrame Load Balancing
Load Balancing is one of the features of Citrix MetaFrame that really sets it apart from Microsoft Terminal Services. It works just the way it should -- by directing user connections to those systems that are best able to handle the load, thereby optimizing performance for everyone. It is hard to imagine a multi-server Citrix installation that would not benefit from Load Balancing. The key is to set it up properly.
This fairly terse document describes some of the underlying principles and characteristics of MetaFrame Load Balancing. It is intended for use by administrators who are already familiar with the tool's operation, but are unsure how to use the configuration parameters to get the results they need. This is not a how-to for novices.
The GUI
Load Balancing Administrationtool is used for setting the load balancing parameters. It does not, however, display any useful information on current actual loads, nor does it provide a useful indication of likely relative performance of different machines. For that, you need command line utilities.Use the command
QSERVER [servername] /LOAD /[protocol]to see the actually load and configuration on a given server. There is no wildcard-servername version of this command; each server must be specified individually.E.g.:
H:\>qserver [servername] /tcp /load
LoadLevel: 9235
LoadWinStations: 200
RatioWinStations: 0
LoadUserLicenses: 3800
RatioUserLicenses: 23
LoadPageFile: 1045
RatioPageFile: 0
LoadPageFaults: 0
RatioPageFaults: 0
LoadMemory: 0
RatioMemory: 0
LoadProcessor: 8371
RatioProcessor: 76
It doesn't matter which protocol (e.g., "tcp") you use -- the numbers are all the same -- but if you don't specify one, you get them all.
The calculation works something like:
LoadLevel=1/[OverallAdjusment] *
(LoadWinStations*RatioWinStations/100
+ (LoadUserLicenses/MaxUsers)*RatioUserLicenses/100
+ LoadPageFile*RatioPageFile/100
+ LoadPageFaults*RatioPageFaults/100
+ LoadMemory*RatioMemory/100
+ LoadProcessor*RatioProcessor/100)
Load Levelis the total computed load on the server. If it exceeds 10000, the server will not accept new connections. Anything that causes this to occur (see below) effectively takes the server out of the load balanced server pool.- The
Load*lines are the raw loads as measured by the MetaFrame self-monitoring software.- The
Ratio*lines are the "importance" values used as multipliers against their related raw load values, to calculate total load.OverallAdjustmentis not displayed by theQSERVER /LOADcomand in any way.- Both
OverallAdjustmentand all of theRatio*values are manually adjusted by usingLoad Balancing Administration.The relationship between the values as displayed in
QSERVER /LOADand in theLoad Balancing Administrationtool is not immediately obvious (although it can be determined with analysis), and for the most part, not critical.
The parameters most people will usually use are:
Processor Usage-- most important
User Load importanceandmaximum users
Overall Adjustment
In most cases, load balancing should be done based on equalizing Processor (CPU) load. If there is a need to move users off of one machine (e.g., for maintenance), it works well to adjust the
Overall AdjustmentandNumber of usersvalues.Note on making adjustments:
- if MaxUsers <= 1, load level will always be >= 10000
- if OverallAdjustment is at maximum, load level will always be >= 10000
- if OverallAdjustment is at minimum, load level will probably always be = 0
- the OverallAdjustment definitely includes the Basic settings
The
Server Administration toolBrowser "Do not participate" settings for various protocols ONLY affect browser elections. They does NOT affect services themselves, or load balancing calculations.The availability of winstations or logins on a given server does NOT affect load balancing. Thus, it is quite possible for load balancing to direct a client to a non-functional server.
To summarize, MetaFrame Load Balancing offers far more flexibility than most sites will need, in a tool whose function may not be immediately obvious. The "KISS" (Keep It Simple, Stupid") principle applies here more that usual. But once properly set up, it's a joy to watch.