Behind the 4GB Memory Limit In 32-Bit Windows
An anonymous reader points us to a very detailed post by Geoff Chappell, first put up early this year, explaining how the 4GB memory limit commonly bandied about for 32-bit Windows (he is writing mainly about Vista) is more of a licensing preference than an architectural limit. The article outlines how Chappell unlocked his system to use all the memory that is present, but cautions that such hackery is ill-advised for several reasons, including legal ones. "If you want [to be able to use more than 4GB in Vista] without contrivance, then pester Microsoft for an upgrade of the license data or at least for a credible, detailed reasoning of its policy for licensing your use of your computer's memory. ... [C]onsider Windows Server 2008. For the loader and kernel in Windows Vista SP1 (and, by the way, for the overwhelming majority of all executables), the corresponding executable in Windows Server 2008 is exactly the same, byte for byte. Yet Microsoft sells 32-bit Windows Server 2008 for use with as much as 64GB of memory. Does Microsoft really mean to say that when it re-badges these same executables as Windows Vista SP1, they suddenly acquire an architectural limit of 4GB? Or is it that a driver for Windows Server 2008 is safe for using with memory above 4GB as long as you don't let it interact with the identical executables from Windows Vista SP1?"
is more of a licensing preference then an architectural limit
So it's a licensing preference, followed by an architectural limit? If so, how is this a story?
Now they will say nobody needs more than 4G of RAM.
I remember back in the day when 8M of RAM was considered too much.
Looks like Microsoft will force upgrades to Windows 7 to get over the 4G RAM limits?
Ah for the days of the AST Rampage card that got over the 640M RAM limits using EMM/EMS memory standards. Can't someone just write a RAM extender driver for 32 bit Windows for XP and Vista to get over the 4G RAM limit?
Remember, Slashdot does not have a -1 disagree moderation, and no, troll, flamebait, and overrated are not substitutes.
Linux does not have the same limit
Does Microsoft really mean to say that when it re-badges these same executables as Windows Vista SP1, they suddenly acquire an architectural limit of 4GB? Or is it that a driver for Windows Server 2008 is safe for using with memory above 4GB as long as you don't let it interact with the identical executables from Windows Vista SP1?
Windows Server 2008 drivers have to be signed. For them to get signed, they can't do stupid shit like assume they are loaded in the memory space between 3GB->4GB, I'd imagine.
"When life gives you lemons, don't make lemonade. Make life take the lemons back!" -- Cave Johnson
Price is the same. In fact, you can barrow someone's 64 bit disk and use your 32 bit license key to to install 64 bit Vista. It is on the front page because it is quite interesting.
I have a feeling he hit it on the head when he mentioned third party drivers as being a possible reason for the limit.
Do you Gentoo!?
On a 32-bit system a single process will always be limited to 4 GB due to the number of address bits, unless the programmer goes through hoops to access a larger memory area one small piece at a time (tricks like that were common in the DOS era -- anyone remember EMS?). On Windows the kernel typically reserves one half of the address space, cutting the usable memory of a single process down to 2 GB. Thus you won't get much advantage from a 64 GB capable kernel unless you run multiple programs that all require 1-2 GB of memory. Come to think of it, such usage is most likely on a server.
yes, PAE has been around forever infact you can enable it in Windows 32bit versions,
But it wont do you a lick of good in MS windows, except for a very few version of windows.
http://msdn.microsoft.com/en-us/library/aa366778(VS.85).aspx
Funny... What version of linux are you using that has the same limit? Slackware and Ubuntu don't have that limit.
Do not look at laser with remaining good eye.
In fact, you can barrow someone's 64 bit disk ...
Barrow:
A mound of earth and stones raised over a grave or graves.
Your plan to put 64 bit copies of Windows in the ground and cover them with grave stones and dirt intrigues me and I wish to subscribe to your newsletter.
My work here is dung.
Seriously, there are no real technical reasons why we can't just run 64bit operating systems. Let's just stop selling 32bit ones.
I skimmed the article.
What it boils down to is : it's possible for 32-bit windows to use more than 4 gigs of memory. Microsoft doesn't allow this for the consumer licensed versions of Windows. While the article makes various allegations that Microsoft is doing this to be bad, the author found out that many device drivers intended for 32 bit windows will break if PAE is enabled. In addition, PAE is an ugly hack, and it still won't let a single thread access more than 3 gigs of RAM. These days, single applications like games and video editing software can easily use more than 3 gigs of RAM.
Long story short : Get, and use 64-bit Windows for Windows machines with a lot of RAM. Since 64-bit XP is poorly supported, and Vista is dog-shit, then that means you should be using 64-bit Windows 7.
Are there people out there who have more than 4GB of memory but still run old 32b operating systems? How uncharacteristically anachronistic of any technology enthusiast...
A slashdotter who didn't build his own computer is like a Jedi who didn't build his own lightsaber.
And in other news, it costs precisely the same to press a copy of Vista Home Crippled versus Vista L337 OMG, and yet Microsoft charges differently based on which bits are enabled on the particular copy that HP installed on your laptop. This called "market segmentation". If you think a proprietary software company's going to give the cheap version all the same features as the expensive one, just because it wouldn't directly cost them more to do so, then you are hopelessly naive.
Dewey, what part of this looks like authorities should be involved?
I dunno... maybe because they think that price maximizes their profitability?
Or do you feel that they're morally obligated to only make a certain profit margin off of their price?
I have added you to my newsletter as requested. Email confirmation should be received in 1-2 hours.
Do you Gentoo!?
This sounds like more PAE shenanigans. Using PAE on 32 bit Windows has already been well covered by The Old New Thing.
So is that the reason that Linux has the same limit?
Unless I'm misunderstanding you and the summary (not RTFAed yet - I know, I'm bad) Linux doesn't necessarily have the same limitation. The summary seems to imply that only 4GB of *physical* memory are being supported on 32-bit systems by some versions of Windows. All OSes running on 32-bit x86 are restricted to a 4GB virtual address space, therefore neither Linux nor Windows can offer more than 4GB of directly addressable memory *per process*. But many 32-bit x86 CPUs can address more than 4GB of physical memory using PAE mode.
The base requirement for using PAE is that the OS supports it - Windows can use it, Linux can too. PAE gets you the ability to address physical memory addresses over 4GB but only if the motherboard has enough address lines to actually relay these requests to the memory. Even if you can't / don't have more than 4GB of RAM installed, it may still be worth it because PAE also lets you use NX (no execute) on 32-bit. PAE on 32-bit doesn't make the process address space any larger, so any given process is still limited to 32-bit pointers.
32-bit Linux has to be compiled with or without PAE support, so your distro should make sure it installs a the right kernel version to correctly support your hardware. Some OSes (e.g. Solaris) can switch between PAE and non-PAE at boot time, so they only need one kernel image to support both modes. I don't know how Windows handles this.
A further benefit of PAE, that I've left till last because it's really somewhat gross: the memory mapped IO regions used by PCI devices also take up part of your physical address space. This can result in a "memory hole" where your *real* RAM is overshadowed by an area of memory-mapped IO regions - the real RAM is there but you can't access it. As a result, if you put 4GB of RAM in your system and use a non-PAE kernel (only 4GB of physical address space) then you are *guaranteed* not to be able to use all that RAM because you will *definitely* have hidden some of it "behind" the memory mapped IO regions. If you use PAE mode, the motherboard can potentially remap that "hidden" RAM to a higher physical address, so that you can use it. Not all motherboards support this remapping, even if they *do* support 4GB worth of DIMMs - which is rubbish because they're claiming to support memory that the hardware will never let you actually address. It pays to be wary of this kind of craziness - my mobo has this limitation, which I discovered after buying 4GB of DIMMs (so I stuck one in another PC, which kept me happy in the end).
Uh, sorry to the parent poster, I've rambled a bit off the point I was originally making and probably just told you a load of stuff you already knew!
I have added you to my newsletter as requested. Email confirmation should be received in 1-2 hours.
Mr. Brinestar, confirmation of E-mail confirmation received at 3:31 PM EST:
Subject: Subscription Confirmation for Binestar's newsletter that you requested on slashdot.
This is an automated email confirming your subscription to Binestar's newsletter as requested in your slashdot post here: http://tech.slashdot.org/comments.pl?sid=1347281&cid=29191073
There is currently no way to remove yourself from this newsletter subscription. I hope you knew what you were doing when you subscribed!
Having completed reading your first newsletter (posted above), I found it vapid and devoid of the call to Microsoftalypse that I look for in all the periodicals I read (most notably my own newsletter entitled eldavojohn's Microsoftalypse that has a staggeringly high readership of a one eldavojohn of Slashdot.org).
Furthermore, to my horror, I noticed it was sent using an account from a hotmail.com address. Considering this datum, I found your footnote warning eerily apt. I shall post a scathing review of your newsletter (seven times longer than necessary) under the guise of frequent and unquestioned Slashdot contributor Bennett Haselton on the morrow. Good day, sir!
My work here is dung.
It would be pretty hard to get worked up about what you lose from the memory mapped regions(except on aesthetic grounds), except that your video RAM is one of those regions. All the weird legacy stuff below 16 megabytes is very nearly a rounding error; but with cheap, basic graphics cards packing 512megs(and high end cards pushing 1.5gigs, and possibly more than one card per system) you can exhaust a fair slice of the first 4GB that way.
Why is /. greenlighting yet another article just for the sake of MS-bashing? Other posters have already pointed out the remaining process memory limits and consumer driver issues that make this a non-starter technically. Not to mention that there's not much (any?) consumer-level 32-bit hardware that has BIOS/Northbridge support for more than 4GB of RAM. Since the 64-bit versions don't cost any more, who cares?
But this guy is saying that Microsoft is doing something "illegal" because he was able to hack his system and enable PAE, even though MS charges extra for that in their server OSes. Is it "illegal" for Ford to sell me a car that's computer governed to 105 MPH even though the engine can get it up over 130? Can I complain to the FTC if I chip the car to remove the limit and then destroy the transmission?
No sig, sorry.
Meh, us Linux users sneer at your pathetic Windows barrows. We put our stuff in SSH tunnels.
AT&ROFLMAO
Even 4GB is too much for 32 bit WinXP. The OS will only let any app. use a maximum of 2 GB.
Unless you enable the /3GB switch in boot.ini, which leads to other problems: your registry system hive must now remain smaller than 12 MB.
Did you read the article? (No, you didn't) It points out most modern Windows systems automatically use PAE because Microsoft has turned on DEP by default where supported. It appears 32bit desktop Windows has a limitation imposed by the licensing code since around XP SP2, not some option you can disable. It also points out most applications don't use anywhere near 4GB of memory (yet at least) and the primary practical use of that much RAM these days IS multiple applications.
but with something like Linux and how it is developed, you don't have it being designed for marketing. With Windows, Microsoft does things like restrict the number of TCP/IP connections either in software or in their license. They disable part of the system to limit its usefulness and sell it at a lower price as in Windows XP Starter Edition and almost did the same with Windows 7 with all that talk about only being able to run 3 applications.
So there's been a hardware based solution to this since the days of the Pentium Pro( early 90s ) and it is used by open source while Microsoft uses the 4GB limit as a tool to get people to pay up. Surprise, that's why Microsoft has so much of your money in their bank account. These kinds of things are old news but it always helps to let others know that in the open source world, these restrictions and/or features get worked around to improve the product instead of getting used to extract money.
LoB
"Anyone who stands out in the middle of a road looks like roadkill to me." --Linus
Just like that airplane seat, hotel room, rental car, theater ticket, etc... the same thing is sold for different prices according to willingness to pay. Just like senior discounts.
It's econ 101. demand curve pricing. if the demand versus price curve is actually curved with a long tale then maximum profit is achieved when a company is able to segregate consumers by willingness to pay. Your revenue is the are under the curve. and single price just gets the area of the larges rectangle you can place under the curve.
Econ 201: in second term economics we learn that the price demand curve is not actually a single curve but is a family of curves parameterized by the total number of units manufactured. So as the company is able to sell things at different prices to more people the entire curve shifts down, making it either cheaper for everyone, or mor profitable for the company depending who gets the benefit of the increased production.
even though it's galling to know the product you bought is just a dumbed down version of a beter one at no difference in manufacturing costs it may well be much cheaper than it would have been had they sold one thing at one price.
Of course it may be that your customers hate this. a few companies like Apple and Saturn use a more price fix model precisely because it fits their style of minimizing aggravation. But even they have college student or military discounts.
Some drink at the fountain of knowledge. Others just gargle.
If you remap the memory from 3.5-4G above 4G, you can put the PCI memory there and stick the .5G of ram on the end of your existing RAM.
"We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
They should be selling the 64-bit version. They should be preinstalling the 64-bit version. People *shouldn't* be using the 32-bit version, becuase there's still a very real architectural limitation in the 32-bit version: a given process can only see 3 GB of memory, no matter how you set up your licensing.
I RTFA and I have to say, I think the author is attempting to find a conspiracy where none exists. If the author had searched MS's website for information on PAE, he would have soon learned why MS decided to remove PAE, and thus support for more than 4 GB of physical memory, from XP SP2.
Why this is a non-story:
1) MS removed PAE in XP SP2 because of incompatibility with 32 bit drivers and resulting instability issues.
XP did support PAE before SP2. However, Microsoft received complaints from users regarding compatibility and instability issues resulting from the use of 3rd party 32 bit drivers. Many users were getting BSODs. It was only then that MS chose to remove PAE from XP SP2.
This decision makes quite a bit of sense. Manufacturers were unlikely to update drivers to include PAE support because, at the time, 4GB+ of memory was very uncommon, and relegated to power users who had a specific need for large amounts of RAM. The situation has since changed due to the plummeting cost of RAM, Vista's need for greater memory resources, more demanding applications, and Superfetch, which allows users to make use of idle memory to preload commonly used applications. My own experiences on Vista x64 show that programs start up significantly faster than in XP due with Superfetch enabled.
Now that 64 bit drivers can be had for pretty much all modern hardware, there is no reason to use a hack like PAE to support more than 4 GB of RAM. Most machines sold by Dell, HP etc. now include 64 bit Vista if the machine has 4 GB of RAM, which is now becoming standard.
See below for MS's explanation of the removal of PAE from SP2.
Source: MS Website, "Operating Systems and PAE Support", June 14 2006 - http://www.microsoft.com/whdc/system/platform/server/PAE/pae_os.mspx
Driver Issues Typically, device drivers must be modified in a number of small ways. Although the actual code changes may be small, they can be difficult. This is because when not using PAE memory addressing, it is possible for a device driver to assume that physical addresses and 32-bit virtual address limits are identical. PAE memory makes this assumption untrue.
Several assumptions and shortcuts that could previously be used safely do not apply. In general, these fall in to three categories:
Buffer alignment in code that allocates and aligns shared memory buffers must be modified so that it does not ignore the upper 32 bits of the physical address. Truncation of addresses information in the many locations this might be kept must be avoided. It is necessary to strictly segregate virtual and physical address references so DMA operations do not transfer information to or from random memory locations.
PAE mode can be enabled on Windows XP SP2, Windows Server 2003 SP1 and later versions of Windows to support hardware-enforced DEP. However, many device drivers designed for these systems may not have been tested on system configurations with PAE enabled. In order to limit the impact to device driver compatibility, changes to the hardware abstraction layer (HAL) were made to Windows XP SP2 and Windows Server 2003 SP1 Standard Edition to limit physical address space to 4 GB. Driver developers are encouraged to read about DEP.
2. Windows isn't trying to screw users over by purchasing a higher priced 64 bit version. Any retail version of Vista or Windows 7 comes with both the 32 and 64 bit installers. As others have mentioned, it's also possible to activate 64 bit Windows with a 32 bit OEM key.
3. PAE will not allow a single process to use more than 4 GB of RAM so a true 64 bit OS is still superior for programs that need large amounts of memory such as HD Video editing, editing of large images in Photoshop etc.
That's complete bullshit. If you purchased the 32 bit version of Vista, you can go on the Microsoft website and order the 64 bit version for a little more than the cost of shipping. Or you can just buy 64 bit to start with - there's no price difference between the 32 bit and 64 bit editions.
Not only that but I have to call FUD, as there is a REASON why 32bit XP and Vista don't support more than 3.25 and it AIN'T about licensing. You want to know why? One word-drivers. I have found that there are plenty of seriously flaky drivers that act buggy as hell if PAE is used, and that is with the standard 3.25Gb limit. Capture cards, some of the older Sata and IDE cards, and those are just the ones off the top of my head that I have run into personally.
So while there are those that want to scream about MSFT and look for any reason to have a shitfit, considering the 64bit and 32bit OS editions are the same price it makes no sense. More likely MSFT tested extending PAE like they allow with 2K3 and found that non server (read Cheap Chinese Crap) drivers get uberflaky and fuck up with large amounts of RAM enabled. This of course would lead to a HUGE spike in the "Why don't my shit work? Fix it!" calls to MSFT, and they decided it just wasn't worth the hassle. At least with X64 they can say "Hey it ain't OUR fault, as we didn't build the device. Contact the manufacturer for a driver" whereas with 32bit folks would go "I GOT a &%&^ driver! Your OS don't work!" thus raising support costs.
So in a way it IS a business decision, but it ain't got to do with licensing. It has to do with the millions of 32bit drivers out there, a probably not insignificant amount of which don't play nice with PAE over 4Gb.
ACs don't waste your time replying, your posts are never seen by me.
Example of several Windows distributions:
Windows XP
Windows XP Media Center Edition
Windows Server 2003
Same cat, different skin.
What's the problem? Just grab the source and recompile it.
Nathan's blog
Tell that to my cheap ass capture card, that is a good 4x more flaky now that I have PAE enabled. Since I have no intention of getting rid of my nice gobs o' RAM, and I haven't had time to find a card with XP X64 drivers for under $80(If anybody knows of one it would be appreciated) I have just learned to deal with it. For example it will crash more when switching channels in the 25-35 cable range, which is naturally where 3 of my favorite channels are. i have tested it by comparing side by side with my buddies card (we bought ours together on a "buy two and save!" sale) and his you can flip through that range til hell freezes over with no crashes, but he only has 2Gb.
So you can scream FUD all you want, I have seen it with my very own peepers. Now imagine how many millions of devices there are out there with WinXP 32bit drivers. Everything from funky USB stuff to the truly weird ass shit (like that cassette deck I saw a couple of years back) and then figure how much MSFT would have to pay for the "My shit don't work! Fix it!" calls.
It is cheaper in the long run just to make the switch to x64 than it is trying to make a hack work, especially a bad hack like over 4Gb support in an OS released in 2001, when 128Mb of RAM was a common configuration. If you are foaming at the mouth and truly need to hate MSFT for something, hate them for this...XP was NEVER supposed to last this long. Longhorn was supposed to be out in 2K3, and because they decided to start over with the Longhorn reset, that of course ended in the clusterfuck that is Vista, you have an OS pushing the decade mark still in widespread use. XP32 just wasn't built to handle gobs of RAM, and trying to force it down is like trying to drop a Mac truck engine in a Pinto. It is just more of a PITA than it is worth.
ACs don't waste your time replying, your posts are never seen by me.
The best source for info for this is likely Mark Russinovich. His blog is the origin of the "difficult to measure risk" quote.
Because device vendors now have to submit both 32-bit and 64-bit drivers to Microsoft's Windows Hardware Quality Laboratories (WHQL) to obtain a driver signing certificate, the majority of device drivers today can probably handle physical addresses above the 4GB line. However, 32-bit Windows will continue to ignore memory above it because there is still some difficult to measure risk, and OEMs are (or at least should be) moving to 64-bit Windows where it's not an issue.
He also acknowledges the commercial aspect of product differentiation on MS 64-bit OS versions, but suggests that the 32-bit issue derives from actual experience;
64-bit Windows client SKUs support different amounts of memory as a SKU-differentiating feature, with the low end being 512MB for Windows XP Starter to 128GB for Vista Ultimate and 192GB for Windows 7 Ultimate...
the Windows team started broadly testing Windows XP on systems with more than 4GB of memory. Windows XP SP2 also enabled Physical Address Extensions (PAE) support by default on hardware that implements no-execute memory because its required for Data Execution Prevention (DEP), but that also enables support for more than 4GB of memory.
What they found was that many of the systems would crash, hang, or become unbootable because some device drivers, commonly those for video and audio devices that are found typically on clients but not servers, were not programmed to expect physical addresses larger than 4GB. As a result, the drivers truncated such addresses, resulting in memory corruptions and corruption side effects.
http://blogs.technet.com/markrussinovich/archive/2008/07/21/3092070.aspx
I'd suggest though, the decision to completely disable PAE instead of only enabling it when paired with drivers certified by WHQL as being PAE-safe was a commercial one, based on SKU differentiation rather than risk.
"I've got more toys than Teruhisa Kitahara."
That's a completely different thing. He's referring to an incident where MS limited the number of inbound connections on port 80. They did that specifically to make it impossible for people to run large scale web-servers on NT Workstation. It had nothing to do with security/stability - it was purely an attempt to protect their profit margin.
And, btw, one of the first things I did after installing XP was get rid of that silly TCP/IP restriction. I agree that it was useful for at least slowing the transmission of worms, as well as limiting how effective they could be as part of a DDOS botnet attack, but I had the exact opposite experience from yours when it came to P2P apps.
I'm also fairly certain that you're wrong about it being "a simple reg entry". You actually had to patch TCPIP.SYS in order to remove/modify the connection limit.
WRONG!! WRONG!! WRONG!!
You are confusing virtual (app) memory and physical memory.
Virtual memory is ALWAYS limited to 4GB (with 2/2GB or 3/1GB split of user/kernel) on 32-bit, PAE or not, Workstation or Server.
PAE allows for more than 4GB PHYSICAL memory. That means you could have 2 3GB apps running all in RAM (no swap) in 6+GB RAM.
For ONE app to use more than 4GB, you NEED 64-bit.
Each application page (usually 4K) is mapped to physical space, whether it's RAM or swap (when idle of course). The PAE allows you to map a page on more than 4GB RAM. This is done entirely by OS.
The problem is that drivers need to know the physical address, because that is what HW devices can access. Some drivers are poorly implemented and fail to do this (like giving a 32-bit address when they sould give 36-bit to the HW).
For a server, the company usually has an IT department that can get certified HW (not off-the-shelf cheap HW) and they usually test the server before deploying. So any driver issue can be corrected (either change the HW or resolve the driver issue) before deployment.
So MS did not want to get calls of data corruption and limited PAE on client windows. My problem (and the article's author's) is that WE (tech-savy computer users) cannot activate it afterwards.
PS: PAE was implemented since Pentium Pro. As I recall it already had 36-lines for adresses (that is 64GB memory space).