What's with the 3Gb memory barrier?

GeezerMan

Platinum Member
Jan 28, 2005
2,145
26
91
I would like comments on this interesting article regarding not needing more than 3GB of ram when using 32 bit Windows. Thanks



Link
 

nullpointerus

Golden Member
Apr 17, 2003
1,326
0
0
Yes, the article is correct. You need 64-bit CPU, chipset, and OS *and* the BIOS memory remapping option activated in order to use the full 4GB of RAM. XP SP2 has a PAE mode, but it is crippled so that it does not make use of the memory remapping, which is what allows the full 4GB of RAM to be used.
 

GeezerMan

Platinum Member
Jan 28, 2005
2,145
26
91
What are the pros and cons if one installs 3GB in a 32 bit Windows XP rig? How does it affect dual channel use? Thanks.
 

TC10284

Senior member
Nov 1, 2005
308
0
0
Makes complete sense and is correct. I've been running 4GB of RAM in my system with 32bit Vista Business edt. I'm only seeing 3.2GB of RAM - I'm running an Asus P4W DH mobo - I'd be running 64bit Vista (or try) but my action pack didn't include it with the Vista Business Upgrade DVD I have. The BIOS only reports 3.2GB of RAM when my system POSTs. But I have looked in my BIOS and there is an option to support more than 4GB of RAM (because this board model supports up to 8GB I think). CPU-Z reports 4GB of RAM and that I am running Dual channel on all four slots.
 

aka1nas

Diamond Member
Aug 30, 2001
4,335
1
0
Originally posted by: GeezerMan
What are the pros and cons if one installs 3GB in a 32 bit Windows XP rig? How does it affect dual channel use? Thanks.

As long as you install in matching pairs, you will only have the regular disadvantages of running 4 sticks. 2x1GB+2x512MB usually works fine.
 

GeezerMan

Platinum Member
Jan 28, 2005
2,145
26
91
So, these posts I have read where people were using 4GB, they were probably using 64 bit windows?
 

aka1nas

Diamond Member
Aug 30, 2001
4,335
1
0
Yeah, depending on your platform, you might get up to around 3.7GB of RAM usable by the OS. Usually it's a bit lower, though.
 

Yellowbeard

Golden Member
Sep 9, 2003
1,542
2
0
The amount of devices installed with memory onboard will affect it also. Video card, PCI device memory, CPU cache, etc are all given memory address space before the system memory.
 

TC10284

Senior member
Nov 1, 2005
308
0
0
Originally posted by: nullpointerus
Yes, or they just let the extra memory sit idle until a future 64-bit windows installation.

Exactly what I plan to do...
 

soydios

Platinum Member
Mar 12, 2006
2,708
0
0
When I upgraded from 2GB to 4 GB of memory, I was stuck at 3.2GB of memory until I enabled memory remapping in the BIOS of my Asus P5W-DH. Vista Ultimate 64-bit just screams now that it has all that memory to work with.
 

4836348435

Junior Member
Jul 2, 2007
11
0
0
The article is wrong. It's possible to use more than 4GB of physical memory. Drivers may not be able to, but applications certainly can. Individual processes only have 2GB of addressable user space, while multiple processes definitely wouldn't have a problem accessing more than 4GB. It's also possible for individual processes to access more than 2GB albeit with remapping overhead.
 

nullpointerus

Golden Member
Apr 17, 2003
1,326
0
0
This is a specific problem with a specific architecture; something as abstract as OS theory is irrelevant.

32-bit x86 processors have a maximum of 4 GB address space. What this means is that the CPU can only work with data that can be addressed. This address space is divided between main memory and devices that require memory mapping to function. So no PC running in 32-bit mode will ever see the upper end of that 4 GB of RAM.

The article is correct because I have tested it extensively on my own rig, as have others with completely different setups. It's also well-documented both on Microsoft's website and on many other websites.
 

4836348435

Junior Member
Jul 2, 2007
11
0
0
Keep in mind that the virtual address space can be remapped. Programs that are aware can access more than 4GB. To test this with a single process under Windows, please see Address Windowing Extensions.

Also, multiple processes have independent virtual address spaces. To test this with multiple processes, create a program that allocates a large amount of memory, yet <2GB. Finally, launch multiple instances of this program such that memory usage exceeds 4GB.

32-bit systems don't limit the amount of memory that an application can use to 4GB or less. One of the advantages of 64-bit systems is not that it makes it possible for developers to use >4GB of memory, but that it makes it less of a pain.

Originally posted by: nullpointerus
32-bit x86 processors have a maximum of 4 GB address space. What this means is that the CPU can only work with data that can be addressed. This address space is divided between main memory and devices that require memory mapping to function. So no PC running in 32-bit mode will ever see the upper end of that 4 GB of RAM.
 

pallejr

Senior member
Apr 8, 2007
216
0
0
Originally posted by: 4836348435
Keep in mind that the virtual address space can be remapped. Programs that are aware can access more than 4GB. To test this with a single process under Windows, please see Address Windowing Extensions.

32-bit systems don't limit the amount of memory that an application can use to 4GB or less. One of the advantages of 64-bit systems is not that it makes it possible for developers to use >4GB of memory, but that it makes it less of a pain.

For at 32-bit system to address more than 4GB it must be running in PAE mode. Desktop versions of Windows doesn't go beyond 4GB, even in PAE mode.

AWE can be used to map a portion of the physical memory space onto a virtual window. This way an application can address all the memory it needs, by moving this window around. To go beyond 4GB, PAE must also be used.

Large memory support in Windows: http://support.microsoft.com/kb/283037/
 

nullpointerus

Golden Member
Apr 17, 2003
1,326
0
0
Originally posted by: 4836348435
Originally posted by: nullpointerus
32-bit x86 processors have a maximum of 4 GB address space. What this means is that the CPU can only work with data that can be addressed. This address space is divided between main memory and devices that require memory mapping to function. So no PC running in 32-bit mode will ever see the upper end of that 4 GB of RAM.

Keep in mind that the virtual address space can be remapped. Programs that are aware can access more than 4GB. To test this with a single process under Windows, please see Address Windowing Extensions.

Also, multiple processes have independent virtual address spaces. To test this with multiple processes, create a program that allocates a large amount of memory, yet <2GB. Finally, launch multiple instances of this program such that memory usage exceeds 4GB.

32-bit systems don't limit the amount of memory that an application can use to 4GB or less. One of the advantages of 64-bit systems is not that it makes it possible for developers to use >4GB of memory, but that it makes it less of a pain.

Yes, that is correct, but (1) full PAE is not 32-bit addressing and (2) XP SP2 and Vista's PAE kernels are limited to 32-bit addressing.

These two operating systems cannot address the full 4 GB of RAM even though they already run on PAE kernels for many PC's. You see, NX requires PAE, so when Microsoft added support for NX, they cut out the address remapping portion of their PAE kernels to avoid driver compatibility problems in their 32-bit desktop OS's.

Since these two operating systems do not support address remapping, they cannot see the full 4 GB RAM. What they cannot see, they cannot allocate for user-space processes, even through AWE. The bottom line is that neither these two OS's nor their third-party software can access the full 4 GB RAM. This was explained in the article BTW:

PAE's no good to the everyday 3Gb-problem-afflicted user, though, for two reasons.

First, it presents 64-bit addresses to drivers, and thus causes exactly the same compatibility problems as a proper 64-bit operating system, except worse, because now you need PAE-aware drivers for 32-bit Windows, instead of just plain 64-bit drivers for a 64-bit OS. From a normal user's point of view, PAE gives you the incompatibility of a 64-bit operating system when you're still running a 32-bit OS.

For this reason, Microsoft changed the behaviour of the /PAE option in all versions of WinXP as of Service Pack 2. They fixed the endless driver problems by, essentially, making /PAE in XP not do anything. All versions of WinXP except for the x64 Edition now have a hard 4Gb addressing limit, no matter what hardware you use them on and what configuration you choose.

This isn't a big problem, of course, since XP is not meant to be a server operating system. But it's still mystifying to people who try the /PAE flag and can't figure out why it doesn't work.

Oh, and just in case you for some reason still wanted to try PAE: It eats CPU time, too.

This information is found in several Microsoft KB articles and was explicitly stated as having this particular effect by a senior Microsoft platform developer in his Microsoft employee blog entry. I've also verified it on my own PC, as have others.


EDIT: clarified wording and added a quotation from the article
 

4836348435

Junior Member
Jul 2, 2007
11
0
0
Good point on the desktop versions only supporting 4GB.

To answer GeezerMan's question, if you're using a 32-bit desktop version of Windows, then depending on the programs you use and how you use them, anything up to 4GB may be useful.

Originally posted by: pallejr
For at 32-bit system to address more than 4GB it must be running in PAE mode. Desktop versions of Windows doesn't go beyond 4GB, even in PAE mode.
 

4836348435

Junior Member
Jul 2, 2007
11
0
0
I recall having written a program that was able to make use of remapping. However, it was running under Windows 2000 server operating system. I think what you've posted is a good clarification.

Yes, that is correct, but (1) full PAE is not 32-bit addressing and (2) XP SP2 and Vista's PAE kernels are limited to 32-bit addressing.

These two operating systems cannot address the full 4 GB of RAM even though they already run on PAE kernels for many PC's. You see, NX requires PAE, so when Microsoft added support for NX, they cut out the address remapping portion of their PAE kernels to avoid driver compatibility problems in their 32-bit desktop OS's.

Since these two operating systems do not support address remapping, they cannot see the full 4 GB RAM. What they cannot see, they cannot allocate for user-space processes, even through AWE. The bottom line is that neither these two OS's nor their third-party software can access the full 4 GB RAM. This was explained in the article BTW
 

pallejr

Senior member
Apr 8, 2007
216
0
0
I don't know if there is a confusion somewhere. When talking about the RAM that is lost because MMIO is overlapping, this cannot be recovered by software. This need to be fixed at the hardware level. After is has been fixed here, then you need some addressing scheme that can use more than 32 bit
 

nullpointerus

Golden Member
Apr 17, 2003
1,326
0
0
The "Memory Remapping" option in the BIOS must be enabled--even under a 64-bit OS. I assume this is because the ACPI BIOS configures the hardware resources on modern x86 computers instead of leaving this task to the operating system (as it used to be with a PnP BIOS). Some computers (e.g. some laptops) do not support the Memory Remapping option in their BIOS because their motherboard chipsets physically are only wired for 32-bit addressing; therefore, such computers cannot support the 64-bit processor's full addressing capabilities.

I'm not exactly sure how PAE is related to the above paragraph. There's probably an article available through Google that explains the relationship in detail.
 

tcsenter

Lifer
Sep 7, 2001
18,363
266
126
There would be no point to enabling the memory remapping option unless the operating system can support more than 4GB physical addressing, whether by native 64-bit or 36-bit PAE. In addition, using the memory remap on pure 32-bit OS can actually cause more memory to be 'lost' than with memory remap disabled and may also result in various undesirable glitches (e.g. BSOD, application and driver crashes, etc.).

All modern ACPI and APIC BIOS decide what memory address ranges will be reserved to the hardware and thus unavailable to the operating system. The memory remapping option is a way for the user/builder/integrator to let the BIOS know that its OK to break 32-bit compatibility.

Memory remap disabled = assume OS supports 32-bit (4GB) total physical address space
Memory remap enabled = assume OS supports more than 4GB physical addressing, whether by native 64-bit or 36-bit PAE

Its not an eloquent solution, but as long as there are developers who don't fully debug applications and drivers with addressing > 4GB, and users who cling to 32-bit applications because they don't want to pay for an upgrade, we will have BIOS with the added complexity of having to support both 32-bit and 64-bit.
 

lopri

Elite Member
Jul 27, 2002
13,211
597
126
Even if 64-bit OS isn't an option, I'd still get 4GB and let 1GB just sit there. I mean, even with 2GB, most of RAM is sitting idle with 32-bit XP anyway. What matters is when applications (i.e. games) actually use huge amount of RAM. When those apps try to consume ~2GB of RAM, the OS can still breathe through the remaining 1GB that it still sees.
 

Fun Guy

Golden Member
Oct 25, 1999
1,210
5
81
Will you take a performance hit by installing 4GB in a 32-bit OS machine? In other words, is there any penalty for having the extra ram - is there any overhead or resource management issues to contend with?

If not, I think I will get 4GB for my next machine....1GB x 4 to fill all the slots.
 

JustaGeek

Platinum Member
Jan 27, 2007
2,827
0
71
Get 2x1GB and 2x512MB for a total of 3GB of physical memory.

Some MB's have trouble dealing with the 3 to 4GB area - the bracket between 2 and 4GB is reserved for the "system", but the system counts it "backwords" starting at 4GB and going down from there.

Unless you have 1GB of VRAM, 3GB of RAM seems to be the "sweet spot" for the 32-bit OS'.