How does the Load Balancing work?




How does the Load Balancing inside an AADS Terminal Server Farm work?

1. Settings you can do

If all AADS Terminal Servers are identical:

then you start with the following parameters:

cpu 0%
mem 0%
users 100%
processes 0%

These parameters do imply that the load balancing is solely based on the number of users that is currently logged in on each AADS Terminal Server.
If server 1 has 6 users logged in, and server 2 has 5 users logged in, then server 2 is the preferred server for the next login.
From here, some fine tuning can be done.

Some examples:

Suppose that most of the times, the users do work with the same applications, then the number of processes on each server will be predictable.
However, occasionally, users do start more applications and more processes then on an average day.

cpu 0%
mem 0%
users 70%
processes 30%

When all the users do start the usual processes, the 30% as set on processes does not have much influence on the decision what is the preferred AADS Terminal Server for the next login.
But when a few users on server 1, for example, start many more applications and processes then usual, such that server 1 has more then an average load, more users will login on server 2.

It does also happen that applications do vary in the amount of memory they use.
For example MS-Word. A small document implies that the user, while working on the document, is using just a few MB of memory, while a large document can imply a much larger amount of memory is used.

cpu 0%
mem 30%
users 70%
processes 0%

With these parameters, if all servers in the farm are handling, for example, 10 users, but server 1 is using more memory because it users are working on bigger documents, then the next logins will be assigned to server 2.

It does also happen that applications do vary in the amount of cpu they use.
For example some kind of administrative program that does a lot of lookup's in a database and present the information to the user.
Such a lookup can be cpu-intensive.

cpu 30%
mem 0%
users 70%
processes 0%

When all servers in the farm are handling the same amount of users, then the next logins will go to the server with the lowest cpu utilization.

When your servers are identical, but there is some variation is the size of documents (==> memory usage and cpu load) or the number of applications that are started by the users (== > processes), the following settings are a good start for tuning your AADS Farm:

cpu 15%
mem 15%
users 55%
processes 15%

The previous examples and explanations do assume that all AADS Terminal Servers are identical.
If there are different servers in the AADS Terminal Server Farm:

one can use the parameters to handle this.


Assign 50% to cpu, such that the server with the slower cpu does handle less users then the server with faster cpu.

Assign 20% to cpu, such that the server with the WXP, which is a bit faster then Win7, does handle a bit more users then the server with Win7.

Assign 70% to memory, such that the server with only 4 GB, which will be used quickly, handles less users then the server with 16 GB memory.

2. How to decide what the best parameters are

assign up to 100% to users and start from there.

do attempt to estimate what the bottlenecks will be: cpu utilization, amount of memory used, or the number of started processes, and assign a percentage to each bottleneck, such that each bottleneck gets the right treatment.
For example: if you estimate that there will be more a cpu utilization issue, compared to the amount of memory used, assign more percentage to cpu then to memory.
You can use the TaskManager to get these estimates:

3. The math behind it

Example: The AADS Terminal Server Farm contains 2 servers:

Server 1

Server 2

Load balancing parameters

Pre-calculation / normalization users

Pre-calculation / normalization processes:

Calculation Server 1:

% load
0,30 * 35 = 10,5 (cpu)
0,30 * 55 = 16,5 (memory)
0,25 * 10 * 7,14 = 17,85 (user)
0,15 * 70 * 1,12 = 11,76 (processes)
= 56,61

Calculation Server 2:

% load
0,30 * 25 = 7,5 (cpu)
0,30 * 45 = 13,5 (memory)
0,25 * 14 * 7,14 = 25,00 (user)
0,15 * 89 * 1,12 = 15,00 (processes)
= 61

The load of Server 1 is lower. Server 1 is the Preferred Server for the next login.

Copyright 2012-2018 AADS WorldWide LTD. AADS Terminal Server | Application Server | Remote Desktop solutions | Firewall