Citrix Load Evaluators

by Jeremy Saunders on July 9, 2008

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.

Jeremy Saunders

Jeremy Saunders

Technical Architect | DevOps Evangelist | Software Developer | Microsoft, NVIDIA, Citrix and Desktop Virtualisation (VDI) Specialist/Expert | Rapper | Improvisor | Comedian | Property Investor | Kayaking enthusiast at J House Consulting
Jeremy Saunders is the Problem Terminator. He is a highly respected IT Professional with over 35 years’ experience in the industry. Using his exceptional design and problem solving skills with precise methodologies applied at both technical and business levels he is always focused on achieving the best business outcomes. He worked as an independent consultant until September 2017, when he took up a full time role at BHP, one of the largest and most innovative global mining companies. With a diverse skill set, high ethical standards, and attention to detail, coupled with a friendly nature and great sense of humour, Jeremy aligns to industry and vendor best practices, which puts him amongst the leaders of his field. He is intensely passionate about solving technology problems for his organisation, their customers and the tech community, to improve the user experience, reliability and operational support. Views and IP shared on this site belong to Jeremy.
Jeremy Saunders
Jeremy Saunders

Previous post:

Next post: