I will start this blog with a small series of posts that describe changes to the architecture of Windows Server 2008 that are relevant to Terminal Services.
Dynamic Kernel Address Space
The number of users a Terminal Server can host is in most cases limited by the amount of free kernel memory, especially the free memory in the following areas:
- Paged pool
- Non-paged pool
- System page table entries (PTEs)
Windows x64 essentially eliminates these boundaries by setting them to 128 GB each, but 32 Bit versions of Windows have relatively low maximum values for these memory areas, that all need be carved out of the 2 GB of kernel virtual memory space. This carving out was done in all versions of Windows up to Vista at boot-time. The system would at startup determine the maximum amount for each area depending on a number of factors, e.g. the amount of RAM installed. This could easily lead to the situation, that, for example, paged pool became exhausted but non-paged pool and System PTEs had space left.
When you think about it, this is quite ineffective.
In Windows Vista and Server 2008 Microsoft introduced a simple but effective change: the system can take away memory from one area and assign it to the others. While this sounds easy and obvious, it probably meant they had to modify any number of things in the background. But the effect should be very noticeable: Server 2008 should be able to sustain more sessions on the same hardware than Server 2003.
Why? Think of the following scenario: Users connect to a published desktop on a Terminal Server and use 20 different applications. In this example, the type, number and usage pattern of the applications leads to the situation that 50 users can connect and work undisturbed, but when the 60th user logs on, the system becomes sluggish and unresponsive. At that time the percental usage of the kernel memory areas might be like this:
- Paged pool: 60%
- Non-paged pool: 75%
- System PTEs: 95%
Essentially the system is loaded to its maximum capacity because the System PTEs are exhausted. Now, if memory from the paged pool could be reassigned to the System PTEs the system might sustain another 10-20 users. This is what Server 2008 promises to do.
I am looking forward to seeing this in action on real production machines.