Partager via


Memory Management in Windows Server

I had a question today around how the memory management works in Windows Server 2003 and whats supported.

So hopefully this clarifies.

Address Windowing Extensions (AWE) and Physical Address Extensions (PAE) only work with Windows Server 2003 Enterprise and Datacenter. The "/3Gb" switch works with all versions of Windows Server.

First up though, a little education :)

  • 8bit apps could only address up to 256k of RAM (or 2^8)
  • 16bit apps could only address up to 64MB RAM (or 2^16)
  • 32bit apps can only address up to 4GB RAM (or 2^32)
  • 64bit apps can "only" address up to 16 exabytes (or 2^64) or around 4 billion times bigger than the current 32 bit apps. :)

Here's the differences in 32bits and why.

1. /3GB remaps the memory space and allows for the kernel mode to use less and the user mode to have more. Particularly handy with apps like Exchange especially when you have the maximum of 4GB RAM in the box like in Std Edition. As you know, the majority of processes run in user mode, not kernel mode so this can have some performance benefits. Note: If you dont set this parameter, half of the box's memory will be allocated to kernel mode and half will go to user mode irrespective of whether its using it or not.

2. PAE - allows for the addressing of more than 4GB of RAM in a server. Why the switch then? 32bit applications in general, including any version of Windows Server 32bit I might add, only allow for the addressing of up to 4GB memory (or 2^32). So what happens if you have more than one app on the box (and want all of them to have say 3GB RAM each) as in the case with the OS running and maybe SQL and something else? That’s what PAE is for and allows for the OS to address that much memory even though the OS itself can't use it all at once.

3. AWE - Think EMM386 and himem.sys. These tools allowed apps to kinda go beyond their addressable limits for a 16bit application. AWE allows 32bit applications to "address" more memory as a chunk. SQL worked with this. Exchange didn’t.

That’s why 64bit is so cool. It allows addressing up to 2^64 which is theoretically exabytes of memory. I say theoretically because there isnt a OS in the world currently that supports quite that much...So in reality it could be cheaper to buy Windows Server 2003 x64 Edition if you need larger memory support than Windows Server 2003 Ent and then you wont have a memory addressing problem but of course the app itself needs to be 64bit to take advantage of it! :)

 

More information at: https://support.microsoft.com/default.aspx?scid=kb;en-us;283037

Comments

  • Anonymous
    November 15, 2005
    Most recent servers I've been working on (e.g. IBM xSeries 336 and BladeCentre HS20's) with 4GB of RAM require the /PAE switch in BOOT.INI to allow the server (Windows Server 2003 Standard or Enterprise) to see the full 4GB of RAM. Otherwise the server sees only see 3.15GB.
  • Anonymous
    November 17, 2005
    Great summary! Raymond Chen had a great series on all the various switches, and memory management in general on his OldNewThing blog: http://blogs.msdn.com/oldnewthing/archive/2004/08/22/218527.aspx
  • Anonymous
    November 17, 2005
    Hey Parky - Im not sure why that happened as PAE is only meant to enable memory addressing in machines with over 4GB RAM. Im wondering if youre seeing this issue...
    http://support.microsoft.com/default.aspx?scid=kb;en-us;279151
  • Anonymous
    November 20, 2005
    Think the PAE kernel is loaded by default on any recent hardware (supporting NX/DEP), post XPSP2 and WS2003SP1.

    http://www.microsoft.com/whdc/system/platform/server/PAE/PAEdrv.mspx