How can I enable PAE on Windows 7 (32-bit) to support more than 3.5 GB of RAM?

178,172

Solution 1

A few years ago, a group of programmers have released a kernel patch for Windows 7 to allow the usage of more than 4 GB of RAM under Windows 7. Recently, due to some virus scanners detecting the patch as a false positive, the download was removed from the website. Fortunately, I have saved a copy of the patch (which uses the RTM Windows 7 kernel), and uploaded it to my website here (see option #1 when I discuss the two methods to patch your Windows kernel). Furthermore, the authors have posted instructions on how to patch your kernel manually.

Even if you have Windows 7 SP1 (Build 7601), you can install the patch which contains kernel 7600. This is because your default kernel is not modified; a new one is copied to your system folder, and an additional boot menu option is added to boot Windows with the new, patched kernel instead of the older one. While I haven't found any problems running Windows 7 SP1 with the older kernel, if you do wish to use build 7601 of ntkrnlpa.exe, you need to manually patch your kernel (see the link above).


The patch basically modifies the Windows 7 Kernel to be more like the Windows Server 2003 Datacenter Edition, which is compatible with up to 8 GB of RAM under 32-bit mode. This allows you to extend the PAE well into 8 GB of RAM under Windows 7 32-bit. For more information about why Microsoft implemented this technical limitation, see Licensed Memory in 32-Bit Windows Vista (requires JavaScript to be allowed from www.geoffchappell.com).

As mentioned above, note that individual processes will still be limited to 4 GB even if the system can access more... Although if you had 8 GB of RAM, then at least you'd still have another 4 GB for other processes ;)


For those interested in the technical aspects, this happens because of memory-mapped input/output (MMIO for short). This allows a CPU to access both peripherals and RAM through the address bus itself. Usually this is done though the higher-order memory addresses to avoid lower-order address conflicts. However, this gave rise to the commonly known 3 GB Memory Barrier in all consumer variants of 32-bit Windows operating systems.

Solution 2

This article at Microsoft's MSDN site shows the memory limits for versions of Windows and Windows 7 32-bit is listed as a 4 GB limit.

You used to be able to use PAE to see more than 4 GB of RAM with Windows XP but this option was disabled in Service Pack 2.

The reason was that most drivers weren't PAE aware and threw their toys out of their pram if they ended up in memory above the 4 GB boundary.

If you use the /PAE switch now on Windows XP you'll make DEP available, but you won't be able to see more than 4 GB of RAM.

This 4 GB limit is still in place for Windows 7 32-bit. If you want to see more than 4 GB of RAM you will have to use a 64-bit version of Windows.

(This option to use PAE to see more than 4 GB of RAM is still available on 32-bit Server versions of Windows which I assume is down to a better quality of drivers expected for the kind of hardware you'd run Windows Server on.)

Solution 3

According to the MSDN article Physical Address Extension:

Windows automatically enables PAE if DEP is enabled on a computer that supports hardware-enabled DEP, or if the computer is configured for hot-add memory devices in memory ranges beyond 4 GB. If the computer does not support hardware-enabled DEP or is not configured for hot-add memory devices in memory ranges beyond 4 GB, PAE must be explicitly enabled.

To explicitly enable PAE, use the following BCDEdit /set command to set the pae boot entry option:

bcdedit /set [{ID}] pae ForceEnable

IF DEP is enabled, PAE cannot be disabled. Use the following BCDEdit /set commands to disable both DEP and PAE:

bcdedit /set [{ID}] nx AlwaysOff
bcdedit /set [{ID}] pae ForceDisable

Windows Server 2003 and Windows XP: To enable PAE, use the /PAE switch in the boot.ini file. To disable PAE, use the /NOPAE switch. To disable DEP, use the /EXECUTE switch.

Solution 4

PAE should be enabled by default - Windows already uses it internally for the DEP/No-Execute feature.

But these instructions might help if Windows is doing its thing again.


Note that individual processes will still be limited to 4 GB even if the system can access more.

Solution 5

Windows 7 32 has PAE disallowing access past the 4 GB mark. See http://msdn.microsoft.com/en-us/library/aa366778(VS.85).aspx for details.

For people out there who insist on 64 bit usage - there are some things that would not work in 64 bit environments that could benefit a performance gain from a ram disk that COULD access past the 3.25 mark in a 32 bit environment - specifically applications that page often. You could also put the page file within said ramdisk. In addtion, a VM is great, however emulation never really works as great as the real thing -- it all really depends on the application and the way it is implemented. There are still many hardware devices that will not work in a 64 bit world, and need the real time access to make them work well (while there are accelerators that help with real time access, it can still present problems.)

So, while 64 bit is technically superior, 32 bit is a legacy that will take a while go away, and there will be plenty of reason why people would like to access memory through PAE.

PS: There is a reply to this post stating that putting a page file on RAM disk makes no sense. Let me explain. If the system has 4GB RAM and you make a 2GB RAM disk and put the page file there, then yes, this configuration makes no sense. However, if the system has 8GB RAM and you make a 4GB RAM disk (accessing the extra memory that 32 bit Windows can not reach) and put the page file (and temp folder, and turn on "ReadyBoost" and add any other frequently used files) on there, then yes, the speed up is very considerable. And "yes" is the answer, you can get software that allows you to create RAM disks above the 4GB limit on 32bit systems.

Share:
178,172

Related videos on Youtube

Niphoet
Author by

Niphoet

Updated on September 17, 2022

Comments

  • Niphoet
    Niphoet over 1 year

    I know that Windows XP 32-bit can be configured, through PAE, to support more than 3.5 GB of RAM. Is there a good tutorial to do this with Windows 7 32-bit?

    As to why I don't simply use 64-bit Windows 7: The software for my Internet connection (cell phone-as-modem) will only work in 32-bit environments.

    • Admin
      Admin over 14 years
      Unless you are using applications that are specifically designed to take advantage of the 36-bit PAE extensions in the CPU and the AWE API, there is absolutely NO point in using the PAE switch.
    • Jamie Hanrahan
      Jamie Hanrahan almost 7 years
      @Molly7244 AWE and PAE have nothing to do with each other. And there is a point to using PAE without extended RAM, and that is to enable hardware No-Execute protection. On an x86 processor there is no NX without PAE.
    • ctrl-alt-delor
      ctrl-alt-delor over 5 years
      @JamieHanrahan AWE uses PAE.
    • Jamie Hanrahan
      Jamie Hanrahan over 5 years
      @ctrl-alt-delor Sorry, but that is clearly a misunderstanding, because AWE works on 32-bit Windows systems that don't have PAE enabled. Heck, AWE even works on systems where PAE isn't even an option (x64, ARM, Itanium - those CPUs don't support PAE). It is true that on a 32-bit x86 Windows system without PAE enabled, an AWE-aware app won't find much RAM to let you open "windows" into, but it'll work within the available RAM. AWE does not at all depend on PAE; it's just that on x86, having PAE + more than 4 GB RAM supported will give more RAM for AWE (and everything else) to work in.
    • ctrl-alt-delor
      ctrl-alt-delor over 5 years
      Sorry AWE does not always use PAE, only when it exists. They work together, or alone. You could say that they are orthogonal. This is not the same as having nothing to do with each other.
    • ctrl-alt-delor
      ctrl-alt-delor over 5 years
      The other day I read that ARM has PAE (May have a different name).
    • Jamie Hanrahan
      Jamie Hanrahan over 5 years
      When I say they don't have anything to do with each other, and that AWE does not use PAE (nor vice versa), I mean that the code that implements AWE has no overlap with and does not call the code that implements PAE (nor vice versa). (Other than that both use some common header files, like mi.h, which defines the internal memory management structures.) Even when both exist, AWE flatly does not "use PAE". It may access RAM that would have been inaccessible without PAE (or it may not), but that is not the same thing.
  • Will Eddins
    Will Eddins over 14 years
    I think the Server support is less due to better driver quality and more due to the fact that system administrators will be able to handle the situation much better than a mom.
  • user1686
    user1686 over 14 years
    But Niphoet (the asker) uses Windows 7, which has a limit of 8 GB (Home Basic; even more in other versions).
  • Julian
    Julian over 14 years
    @grawity: yes, it's 8GB if you're using 64-bit Windows 7. The limit is still 4GB in 32-bit Windows 7.
  • davr
    davr over 14 years
    He's got Windows 7...you completely forgot to mention "XP Mode", which is the new free virtualization feature included in Windows 7.
  • Julian
    Julian over 14 years
    I didn't directly mention XP mode since they didn't say if they were running 7 Professional or Ultimate (it's unavailable for the other SKUs) :)
  • Jon Seigel
    Jon Seigel over 13 years
    Warning: that first link has some NSFW content.
  • Breakthrough
    Breakthrough over 13 years
    Warning added to response, thank you. I didn't even notice that :S
  • Mark Gibaud
    Mark Gibaud over 12 years
    Any information on whether this works well or is unreliable?
  • Breakthrough
    Breakthrough over 12 years
    @Mark Gibaud I used it for a year with no problems. I only had 4GB of RAM, but at least I was able to use the whole thing. Do note that the patch modifies the Windows Kernel, so I would make a backup before you patch your system. That being said, I never had a problem (I applied the patch on both my desktop and laptop a few times with no problems, even after everything was installed).
  • Mark Gibaud
    Mark Gibaud over 12 years
    "The reason was that most drivers weren't PAE aware and threw their toys out of their pram if they ended up in memory above the 4GB boundary." - Does this apply to Windows 7 32bit as much (using the kernel hack)?
  • user541686
    user541686 over 12 years
    @Breakthrough: This is amazing. Do you happen to know how to get XP to do something similar?
  • ElvisFanTCB
    ElvisFanTCB over 12 years
    Putting your pagefile on a RAMdisk makes no sense.
  • ElvisFanTCB
    ElvisFanTCB over 12 years
    The great Mark Russinovich explains the rationale behind the client and server memory limits under windows in his "Pushing the Limits of Windows" series of blog posts. blogs.technet.com/b/markrussinovich/archive/2008/07/21/…
  • Breakthrough
    Breakthrough over 12 years
    @Mehrdad as far as I know, nothing exists of the sort. It is possible, however, since some Windows 2003 variants (32-bit) can use more then 4 GB of RAM. For more information, see this MSDN article: Memory Limits for Windows Releases
  • Garik
    Garik over 12 years
    @richard - the address limit includes address space needed for other hardware, most notable graphics cards which can eat up a lot of the 4GB.
  • Kushal
    Kushal about 12 years
    I have laptop with 4 GB or RAM, but with Windows 7 32 bit, only 2.7 GB is shown as available, what can be a fix for that?
  • Garik
    Garik about 12 years
    @Kush - the only fix is to back up your files and then install Windows 7 64-bit.
  • Kushal
    Kushal about 12 years
    @DaveWebb: But then what is the use of BCDEdit /set PAE forceenable as I've heard it can enable a 32bit machine to address memory up to 8 GB, but still keeping a process size is limited to 4 GB. This didn't worked for me though.
  • Garik
    Garik about 12 years
    It might work on some 32-bit Server versions but not on Windows 7. Check here: msdn.microsoft.com/en-us/library/… Your only option is a 64-bit re-install.
  • slhck
    slhck over 11 years
    FYI, the patch has been removed so the first link is more or less broken: unawave.de/windows-7-tipps/virusnote.html?lang=DE
  • Breakthrough
    Breakthrough over 11 years
    @slhck thanks for bringing that to my attention. I have a version of the older patch saved, so I'll mirror that on my website, but I also noticed that the patch replaced the Windows kernel with build 7600 (RTM) instead of 7601 (SP1); looking into this issue as well.
  • Edward J Beckett
    Edward J Beckett over 11 years
    The 'patch' is quite simple to do yourself and you don't need 'easybcd' to fix your boot records :: it's quite trivial to fix your boot record with bcdedit.exe ... RTFM
  • Vojtěch Dohnal
    Vojtěch Dohnal almost 9 years
    Putting your pagefile on a RAMdisk makes no sense only when RAM is available normally in the system, which is not this case.
  • El Suscriptor Justiciero
    El Suscriptor Justiciero over 8 years
    @DaveWebb a 64-bit reinstall is an option... IF the machine itself is 64-bit. Just to clarify.
  • ctrl-alt-delor
    ctrl-alt-delor over 5 years
    I was running Debian Gnu/Linux with PAE for a while. I got 3GB per process, and could user all 8GB (more if I had it) of RAM with no problem. I later changed to a 64bit kernel. To do this I just clicked on the new kernel in the package manager, it installed, and set itself as the default kernel. I then had to re-boot.