It has always been my opinion that the CPU Utilisation and Page Swaps rules are highly variable, and therefore do not often represent the real load of a server. CPU Utilisation can often be too erratic to provide consistent load balancing. Now days you have the CPU Optimisation feature, or a 3rd Party management app controlling this. Once you’ve base-lined your systems, then a custom evaluator with the Server User Load and Memory Usage rule is about the best to receive a consistent balance across all servers.
The following information about how the load index is determined came from a friend at Citrix.
When calculating the value for each rule, perfmon data is taken every 15 seconds and then this is averaged over a five minute period for each rule configured for the load evaluator. The rules are evaluated every time a user connects, disconnects, or between 5 and 30 seconds. Using “qfarm /load” from a command prompt on a Citrix server will display the current load index of the server. A figure of 10,000 means full load. When it evaluates the rule it uses the last 20 samples (5 minutes / 15 seconds) of perfmon data collected. Therefore a server physically running at full load may take up to 5 minutes to register a load index of 10,000 as see by the screenshot below.
A common misconception is that the evaluator’s highest utilised rule determines the load index. However this is not the case. When two servers have the advanced or a custom load evaluator with more than one rule, the average of the other rules are taken into account when calculating the load index. These “secondary” rules effectively become a tie breaker when two or more servers have equally high load numbers. To calculate the load index when multiple rules are used in a load evaluator the below formula is used:
LoadIndex = HigestLoadRule + (AverageOfOtherLoadRules * .1)
Take for example the following scenario for ctxsvr1 and ctxsvr2:
ctxsvr1 has a Custom Load Evaluator which contains Load Rules for: CPU usage, Memory Usage, Server User Load. The following is the mapping from Load Rule -> Load Index for the load evaluator:
CPU usage: 50% -> 5000
Memory Usage: 10% -> 1000
Server User Load: 3 sessions -> 50
ctxsvr2 has a custom Load Evaluator which contains Load Rules for: CPU usage, Memory Usage, Server User Load. The following is the mapping from Load Rule -> Load Index for the load evaluator:
CPU usage: 50% -> 5000
Memory Usage: 20% -> 2000
Server User Load: 6 sessions -> 100
So in this case the load index is calculated as follows:
ctxsvr1: 5000 + (1000 + 50)/2*.1) = 5052
ctxsvr2: 5000 + (2000 + 100)/2*.1 = 5150
Therefore user sessions will be directed to ctxsvr1 due to the slightly lower memory and user load.
And don’t forget to set the load bias to counter “the black hole effect”. Therefore with XenApp 4.5 and above you should also add the Load Throttling rule to your custom Load Evaluator. This is explained in an article written by Brian Madden called “Understanding the new logon throttling load evaluator options in Citrix Presentation Server 4.5“.
All that aside, personally, I just start off using the Default load evaluator, or a custom evaluator with the Server User Load and Load Throttling rules only. And then take it from there.