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 | |
IntroductionOne 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. |
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
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.