Why run 64-bit Windows?

On the Windows Performance team we often run into issues with Windows Server 2003 32-bit scaling to support Enterprise workloads. There are a variety of low memory and performance issues that can occur due to the limitations of the 32-bit memory space. While we work to resolve those issues we also like to discuss the many advantages of making the switch to 64-bit Windows sooner rather than later. Today I would like to go over some of those advantages.

The most important advantage is that 64-bit Windows can address much more memory, both virtual as well as physical. As the chart below shows, some of the differences between 32-bit and 64-bit are very large.

Memory Type

Limit on x86

Limit on x64

Physical Memory 4GB
64 GB with PAE
1 TB
Kernel Virtual Address 2 GB
1 GB with 4GT (/3GB)
8 TB
User Mode Process 2 GB
3 GB with 4GT (/3GB)
2 GB for 32-bit processes
4 GB for 32-bit processes with LARGE_ADDRESS_AWARE
8 TB for 64-bit processes
Paged Pool 550 MB 128 GB
Non-paged Pool 256 MB
128 MB with 4GT (/3GB)
75% of RAM up to 128 GB
System Cache 860 MB 1 TB
Page Table Entries ~250,000
~40,000 with 4GT (/3GB)

Note – Chart assumes Windows Server 2003 32-bit without custom HAL in Datacenter, and Windows 2008 64-bit.


Some of the common issues you may see due to 32-bit kernel address limits are:

•    Multi-user systems such as Windows Terminal Servers can only run a limited number of users before memory errors may occur. The goal on any Terminal Server is to run as many users as possible, with 70 or more users per server being a common goal. This is often not possible as kernel memory resources become exhausted long before all physical memory is consumed by users. This results in errors when additional users try to log onto the server. While it may be possible to tune some memory resources, the options are limited and the practical limit for users may be far lower than the goal. The only solution for 32-bit Windows is to add additional servers or reduce the load and/or number of applications run by each user.
•    Copying large files or doing large backups fail due to memory errors. As files have gotten much larger and total number of files on systems have grown sharply, the ability to address them becomes more difficult. Large file operations use a lot of system cache or non-paged pool memory. The only solution in 32-bit Windows is often to use unbuffered I/O or to break up a backup operation into multiple parts.
•    Systems that require the /3G (4GT tuning) switch in the boot.ini (to support Large_Address_Aware applications) may run out of Non-Paged pool memory or PTE’s. This is caused by Non-Paged pool memory being reduced from 256 MB normally to 128 MB with /3G and PTE’s also being significantly reduced. A common Microsoft application that requires /3GB is Exchange Server. While it is possible to tune this memory, it can be a complex and time consuming process. It often requires multiple changes with load testing, and as load and configurations change, additional tuning is required resulting in additional downtime on production systems.


Advantages of the flat memory model with 64-bit applications.

•    Applications can manipulate large amounts of data more efficiently. Video editing and large financial applications are examples of programs that benefit from this the most.
•    Each application has better performance. Increased physical memory allows more applications to run simultaneously and remain completely resident in the system’s main memory.
•    Applications can support more users. All or part of each application must be replicated for each user, which requires additional memory.
•    Each application has more memory for data storage and manipulation. Databases can store more of their data in the physical memory of the system. Data access is faster because disk reads are not necessary.


Security advantages of 64-bit Windows

· Buffer overflow protection – A buffer overflow occurs when a data buffer is populated with more data than it is designed to handle. In 64-bit editions of Windows Server, the first parameters of a procedure call are passed in registers. As a result, it is less likely that the buffer will overflow, because the correct values have to be set up in registers and the variables and addresses have to be aligned on the stack.

· Data execution protection – The 64-bit processors made by AMD and Intel include hardware support for data execution prevention (DEP). Windows Server uses DEP to prevent malicious code from being able to execute, even when a buffer overrun occurs. Even without a processor that supports DEP, Windows Server can detect code that is running in memory locations where it should not be.

· Patch GuardMicrosoft Patch Guard technology prevents non-Microsoft programs from patching the Windows kernel. This technology prevents kernel mode drivers from extending or replacing kernel services, including system service dispatch tables, the interrupt descriptor table (IDT), and the global descriptor table (GDT). Third-party software is also prevented from allocating kernel stacks or patching any part of the kernel.

All of these taken together result in a lower total cost of ownership of Windows 64-bit. Hardware is better utilized, uptime is increased and support cost is lower. At some point 32-bit systems will need to be retired. Better to do this ASAP and reap the benefits instead of being forced to do so when systems and software are no longer supported and still incurring the cost.


What is required to move to 64-bit Windows

•    Hardware that supports 64-bit – Most systems manufactured in the last 5 or 6 years will support 64-bit Windows. Check with your hardware vendor and see if Windows 2008 X64 is supported on your server. Check that 64-bit drivers are available for all of the hardware in the system.
•    Verify application compatibility with 64-bit – Most 32-bit applications will run well or even better on 64-bit Windows. 64-bit Windows provides a subsystem called WOW64 that provides emulation for 32-bit applications. In addition, the Microsoft Application Compatibility Toolkit provides a framework for testing compatibility and implementing application shims for resolving common application compatibility issues when moving applications to a newer version of Windows. Note: 16-bit applications are not supported on 64-bit Windows as there is no 16-bit WOW subsystem. Therefore 16-bit applications will need to be replaced with 32-bit or preferably 64-bit compatible versions.

I hope this information will show you the advantages of moving to 64-bit Windows 2008 or Windows Server 2008 R2 as soon as possible.

Thanks for you time,

Leonard Severt