Pushing the Limits of Windows: Physical Memory

  • Comments 171
  • Likes



Pushing the Limits of Windows: Physical Memory

Pushing the Limits of Windows: Virtual Memory

Pushing the Limits of Windows: Paged and Nonpaged Pool

Pushing the Limits of Windows: Processes and Threads

Pushing the Limits of Windows: Handles



Physical Memory



Windows Server Memory Limits


You can see physical memory support licensing differentiation across the server SKUs for all versions of Windows. For example, the 32-bit version of Windows Server 2008 Standard supports only 4GB, while the 32-bit Windows Server 2008 Datacenter supports 64GB. Likewise, the 64-bit Windows Server 2008 Standard supports 32GB and the 64-bit Windows Server 2008 Datacenter can handle a whopping 2TB. There aren't many 2TB systems out there, but the Windows Server Performance Team knows of a couple, including one they had in their lab at one point. Here's a screenshot of Task Manager running on that system:




That's also why the memory limits table lists lower limits for the same SKU's when booted with 4GB tuning (called 4GT and enabled with the Boot.ini's /3GB or /USERVA, and Bcdedit's /Set IncreaseUserVa boot options), because 4GT moves the split to give 3GB to user mode and leave only 1GB for the system. For improved performance, Windows Server 2008 reserves more for system address space by lowering its maximum 32-bit physical memory support to 64GB.


The maximum 2TB limit of 64-bit Windows Server 2008 Datacenter doesn't come from any implementation or hardware limitation, but Microsoft will only support configurations they can test. As of the release of Windows Server 2008, the largest system available anywhere was 2TB and so Windows caps its use of physical memory there.

Windows Client Memory Limits




32-bit Client Effective Memory Limits 

While 4GB is the licensed limit for 32-bit client SKUs, the effective limit is actually lower and dependent on the system's chipset and connected devices. The reason is that the physical address map includes not only RAM, but device memory as well, and x86 and x64 systems map all device memory below the 4GB address boundary to remain compatible with 32-bit operating systems that don't know how to handle addresses larger than 4GB. If a system has 4GB RAM and devices, like video, audio and network adapters, that implement windows into their device memory that sum to 500MB, 500MB of the 4GB of RAM will reside above the 4GB address boundary, as seen below:





You can see physical memory layout with the Meminfo tool by Alex Ionescu (who's contributing to the 5th Edition of the Windows Internals that I'm coauthoring with David Solomon). Here's the output of Meminfo when I run it on that system with the -r switch to dump physical memory ranges:




What's occupying the holes below 4GB? The Device Manager can answer that question. To check, launch "devmgmt.msc", select Resources by Connection in the View Menu, and expand the Memory node. On my laptop, the primary consumer of mapped device memory is, unsurprisingly, the video card, which consumes 256MB in the range E0000000-EFFFFFFF:



The consumption of memory addresses below 4GB can be drastic on high-end gaming systems with large video cards. For example, I purchased one from a boutique gaming rig company that came with 4GB of RAM and two 1GB video cards. I hadn't specified the OS version and assumed that they'd put 64-bit Vista on it, but it came with the 32-bit version and as a result only 2.2GB of the memory was accessible by Windows. You can see a giant memory hole from 8FEF0000 to FFFFFFFF in this Meminfo output from the system after I installed 64-bit Windows:









The bottom line is that you can fully utilize your system's memory (up the SKU's limit) with 64-bit Windows, regardless of the amount, and if you are purchasing a high end gaming system you should definitely ask the OEM to put 64-bit Windows on it at the factory.

Do You Have Enough Memory?

Regardless of how much memory your system has, the question is, is it enough? Unfortunately, there's no hard and fast rule that allows you to know with certainty. There is a general guideline you can use that's based on monitoring the system's "available" memory over time, especially when you're running memory-intensive workloads. Windows defines available memory as physical memory that's not assigned to a process, the kernel, or device drivers. As its name implies, available memory is available for assignment to a process or the system if required. The Memory Manager of course tries to make the most of that memory by using it as a file cache (the standby list), as well as for zeroed memory (the zero page list), and Vista's Superfetch feature prefetches data and code into the standby list and prioritizes it to favor data and code likely to be used in the near future.





You can see the instantaneous value in Process Explorer's System Information dialog, or, on versions of Windows prior to Vista, on Task Manager's Performance page.

Pushing the Limits of Windows

Out of CPU, memory and disk, memory is typically the most important for overall system performance. The more, the better. 64-bit Windows is the way to go to be sure that you're taking advantage of all of it, and 64-bit Windows can have other performance benefits that I'll talk about in a future Pushing the Limits blog post when I talk about virtual memory limits.

Your comment has been posted.   Close
Leave a Comment
  • It seems to me that you omitted something. To wit, the contribution of SP2 when dealing with Windows XP. I built a system with 4 GB of RAM roughly three years ago because I wanted the extra RAM for pro audio/video applications. By your article, my system should have had about 3.75 GB of free RAM under the 32-bit version  of Windows XP (in light of my video card's 256 MB).

    But that's only true with SP1. From what I've been able to gather, when Microsoft added the DEP feature to SP2, they made what strikes me as a stupid decision: to lop off the top gigabyte of memory altogether, rather than deal with driver issues that could be caused by interactions with DEP. When I boot into WinXP SP1 on that machine, I do have 3.75 GB of RAM available; when I boot WinXP SP2 on the very same hardware, using the very same drivers, I have 2.75 GB available.

    I have received conflicting answers to my support inquiries over the years from Microsoft personnel. Can you perhaps comment on the top gigabyte of RAM when using WinXP SP2 or later?

  • The behavior I describe in the post is the same for all releases of Windows client systems, including Windows XP, so if there's a difference in behavior between SP1 and SP2, it has to do with a video driver or some other factor. You can confirm that by using the Meminfo tool to look at physical memory ranges and the device manager to see what's using the the missing ranges.

  • Great article, thanks!  It's always fun to see Task Manager screenshots from monster systems. :)  One thing I wondered while reading this article: are computer companies afraid to put 64-bit Windows on machines, or do they just not know any better?  At my company we bought several Dell PCs with 4GB last year.  They came with 32-bit Vista, which reports only 3.1GB as being available.  (With Vista SP1 it now reports 4GB in some places, as you mentioned...)

    By the way, I noticed one typo:

    "two 1MB video cards" (should be 1GB)

  • Thanks for the feedback and for pointing out the typo.

  • Excellent article Mark.  I understood the x86 vs x64 memory issues before, but this explains much more in detail, and shows us how to actually discover exactly how much memory we are loosing on the x86 platform.


  • As always great article. Looking forward to more.

  • First, thanks for the response. But second, what I find just doesn't match what you say.

    For the record, I can't use the meminfo utility you suggest because it requires Vista or later. I quote from the bottom of the linked page: "Please note that MemInfo requires Windows Vista or higher as well as full (elevated) administrative privileges."

    Sadly, device manager is no more illuminating, insofar as the memory shown in use is identical across both OS installs and yet SP1 install 3.5 GB of memory while SP2 reports 2.5 GB of memory--I've since upgraded to video that use 512 MB instead of the 256 MB I mentioned originally.

    What I find most interesting is that in order to make the most of my 4 GB of physical RAM, I must (1) run WinXP SP1, and (2) use the /PAE switch in my BOOT.INI file. Only by using the /PAE switch does WinXP SP1 report the extra RAM and make it available. That just doesn't track with your statement that the behavior " the same for all releases of Windows client systems, including Windows XP, so if there's a difference in behavior between SP1 and SP2, it has to do with a video driver or some other factor."

    I would *LOVE* to pursue this further somehow. You're the brightest and most thorough developer I've had the privilege of chatting with, and this is an issue on which I would relish closure.

  • Total Physical Memory 4,096.00 MB

    Available Physical Memory 2.09 GB

    4 GB RAM only 2.09 GB addressed :(

  • Hi.

    I believe that Computer shops are holding back 64 bit OS'es because customer support. Home users have many more or less different gadgets that dont have 64 bit drives. Also - there is still lots of old 16-bit software what they need to run for some reason (mostly sentimental reasons).

  • Good article, but I'd like to add one thing: you may have to manually enable memory remapping in the BIOS to access all of 4+ GB RAM in a 64-bit system. Otherwise, part of it may be obscured by memory-mapped devices at the same location.

  • Thanks! It would be interesting to hear your thought on the windows swapfile too (most likely you've already talked about this somewhere and I've missed it). I've heard a lot of different theories on how to handle the seap on system with large amounts of RAM. Some claim it's better to have no swapfile, while others claim it's better to let Windows handle it.

  • Excellent article as always!  Very informative.

  • @Phileosophos: "From what I've been able to gather, when Microsoft added the DEP feature to SP2.."

    FYI: From what I can remember, when DEP is enabled, /PAE (physical address extension) is also (implicitely) enabled, which may affect available RAM. (depends on system)

  • Mark,

    Excellent article!

    One question, in the system that you show where 7E700000 to FFFFFFFF is reserved for PCI, who's responsible for this reservation? OS? Bios? who?


  • Hi Mark

    Correct me if I am wrong:

    Devices call Windows and say "Oi, Windows! If anyone passed you a pointer to the 4096th MB of the physical memory, that someone is actually addressing our device memory! We just didn't think you have that much memory, now do you?" And Windows goes back and says: "OK. No problem. And no! I don't think any computer with more than 512MB RAM ever exist!"

    Does that sound about right?