One reason Why Windows Server 2008 Terminal Server Will Allow You To Get More Users On A Box
Monday, 11 February 2008 by Michel Roth
Windows Server 2008 brings an astonishing amount of new features and optimisations compared to Windows Server 2003. In this article we are going to be focusing on a particular improvement that has been made the area of Kernel memory management and optimisation and how this improvement will impact Terminal Server environments.
 
 

Introduction

One of the biggest improvements that has been made in Windows Server 2008 isn't a flashy feature like TS RemoteApp but it is more of an "under the hood" improvement. Windows Server 2008 introduces something called Dynamic Kernel Address Space. Dynamic Kernel Address Space is an improvement that was made to the Windows Server 2008 memory management subsystem. In a nutshell, Dynamic Kernel Address Space enables the different portions of kernel memory to be reallocated in real-time without reboot.

 

Why is Dynamic Kernel Address Space important to Terminal Servers?

Time to take a small step back. 32 bit Windows is limited to 4 GB of physical memory (the /PAE switch is out of scope for this article). This 4 GB is, by default, divided into 2GB for Kernel mode memory and 2GB for user mode memory. The 2GB Kernel mode memory is a crowded space. This is the space that is used for, as I like to call it, "Terminal Server housekeeping". All system-related activities have to be fit into that 2 GB. On single user systems this usually isn't to much of a problem. Since the amount of "housekeeping" increases tremendously when there are 50 users "living" on the Terminal Server, it's not that hard to understand that it is not uncommon to run out of Kernel mode memory on Terminal Servers. To full understand why the Dynamic Kernel Address Space in Windows Server 2008 helps out with this problem, we need to take a somewhat deeper look at Kernel mode memory. 

Kernel mode memory on Windows Server is divided into a couple of separate areas like: the System PTEs, Paged Pool and Non Paged Pool. To discuss the function of these area's is out of scope of this article. For the sake of this article it's sufficient to realise that all of these area's play a vital role in the operation of a Terminal Server (or any Windows server for that matter). In Windows Server 2003 and ealier versions of Windows, the dividing of the 2GB Kernel memory amongst the System PTEs, Paged Pool and Non Paged Pool took place at boot-time and would remain fixed for the duration of the entire uptime. This means that the 2GB of Kernel mode memory could not be re-allocated during a Windows Server session. The dividing of Kernel memory could only take place at boot-time. This poses a big problem in Terminal Server environments. Why? Depending on the setup and usage of your Terminal Server, you could for example run out of Paged Pool but still have plenty of space left in the System PTEs area. Wouldn't it be great if you could transfer some (surplus) memory from the System PTEs over to the Paged Pool? Unfortunately Windows Server 2003 does not support this. This is where Dynamic Kernel Address Space comes in. Dynamic Kernel Address Space takes away this limitation in that Windows Server 2008 will dynamically allow for the reallocation of Kernel mode memory to the best performance for the current workload of your (Terminal) server.

 

What's in it for me? 

This means that Windows Server 2008 will be able to host more users on a box, before (lack of) Kernel mode memory becomes an issue. This also means that the tuning on Kernel mode memory will become something of the past. This is definitely a good thing because Kernel mode memory tuning was like walking a tightrope anyway. Dynamic Kernel Address Space is certainly not the only new feature in Windows Server 2008 that will allow for more sessions per Terminal Server but it is one that is going to play a role in making the dreaded 2GB Kernel mode memory limitation less of a problem in Terminal Server environments. It is impossible to say just how many more users you can cram onto a Terminal Server because of Dynamic Kernel Address Space but I think it is safe to say that you should not be expecting to get twice as much users on a box. It all depends on the exact workload of your Terminal Servers. 


Related Items:

Should I Use The /3GB In My BOOT.INI With Virtual Server (29 May 2006)
Troubleshooting Server Hangs - Part One (26 September 2007)
Patch Vista?s Kernel to Address more than 4 GB of Memory (25 June 2009)
Windows CE 6.0 Has Been Released To Manufacturing (18 September 2006)
Performance Monitoring On TS: Memory Management (15 September 2009)
Microsoft Rolls Out Windows CE 6 (9 May 2006)
What Is Virtual Memory (In WindowsCE) ? (7 November 2006)
What's going On With My Pagefile ... And The Rest Of My Server? (15 May 2007)
GDI Limits (4 September 2007)
How Terminal Services Works (Technical Reference) (13 June 2005)
Comments (4)
written by Dan Shappir, February 11, 2008
Great article Michel! Thank you for providing this information.
I do think it's worth mentioning, though you obviously know this, that the kernel memory constraints are effectively removed on Windows x64. This is true for both 2003 x64 and 2008 x64. This is one important reason why x64 Terminal Servers can host more sessions.
Not everybody can switch to Windows x64, primarily because of driver problems, so the improvement you describe is certainly a Good Thing.
Dan
written by Michel, February 11, 2008
Dan,

You are very right. x64 does indeed make the Kernel Memory limit become a thing of the past. The truth however is that the percentage of SBC environments on x64 is astonishingly low (as far as I can see). I bet that someone over at MS is pretty disappointed with all this. x64 has great potential but got off to a huge false start with the lack of driver support by 3rd party vendors. I think it will take quite some before x64 becomes the default installation option, which is a shame... So this is why I'm very happy with Dynamic Kernel Address Space.
written by Mats, February 11, 2010
This might be a bit late (about a year ) but I find no sufficient answer anywhere.

I recently purchased an old server. Because ddr memory is really expensive, it is currently limited to 1GB of memory.

Now, how does your article fit in this? What's my best option for a terminal server: 2003 or 2008? The memory usage for a single user makes 2003 the better one. But what happens when a lot of users join? On what can I base my average memory usage per user?

Thanks already,
Mats
written by Mats, February 11, 2010
I couldn't edit, but I notice it's been exactly 2 years. Still, I hope for your answer.
Thank you