What limits Windows 7 x64 machines to <=192GB RAM?

117

16

I know motherboards, BIOS, etc may set upper limits on how much RAM we can install or use on individual machines. However, what defines the maximum RAM for Windows 7 x64?

Is that a fundamental architectural limitation of the OS? Different Windows 7 versions have different RAM maximums (Starter edition <= 2GB, Professional <= 192 GB). Is it something that may be actually changed?

As a comparison, Ubuntu 64x allows for as much as 1024GB RAM.

Lucas Fortini

Posted 2014-02-03T22:21:45.487

Reputation: 993

3

possible duplicate of 64 Bit OS and RAM

– Ƭᴇcʜιᴇ007 – 2014-02-03T22:33:39.653

1They pick physical limitations. When Windows 7 was released there was no hardware that supported more than 192GB of memory in the non-server market – Ramhound – 2014-02-03T23:01:24.607

5install Windows 8, here the Pro/Enterprise can use 512GB RAM. – magicandre1981 – 2014-02-04T05:05:34.267

Answers

185

Short answer: the license

Excluding hardware from the equation, it is mostly an artificial software restriction:

[The] limit is retrieved from the registry by calling a function named ZwQueryLicenseValue, which is itself called from an internal procedure which Microsoft's published symbol files name as MxMemoryLicense.

Source: Licensed Memory in 32-Bit Windows Vista

Additional information­

Of course, license data stored in the registry even in an undocumented format might easily be changed by users, which they would have some incentive to try since Microsoft charges significantly different prices for different licenses. Microsoft therefore has an elaborate scheme for checking that the license data remains as Microsoft wants it. The kernel is the repository for whether the licensing data has been tampered with, and to this end exports two more functions, ExGetLicenseTamperState and ExSetLicenseTamperState.

Source: Software Licensing

­

ExGetLicenseTamperState

This [undocumented] function asks the kernel whether the license data has been tampered with.

The internal use is in a timer that recurs approximately every hour. If the tamper state is found to be 4, then Windows stops. The bug check code is SYSTEM_LICENSE_VIOLATION (0x9A), with 0x1B as the first argument.

Source: ExGetLicenseTamperState

A practical example

Let's say you have a computer with 32 GiB of RAM, and you install Windows 7 Home Premium x64 (64-bit). In that case you would be limited to 16 GiB. If you were to use Windows Anytime Upgrade, and upgrade to a more expensive edition, suddenly the limit would be set to 192 GiB instead.

Conclusion

All Windows 7 editions share the same source code. The main difference is the number of features/limitations which are either enabled or disabled. Professional and higher client editions have no upper limit to how much RAM they can handle, and are just licensed to what Microsoft guarantees to support.

Additionally, the Windows 7 EULA explicitly says that you may not "use the software for commercial software hosting services", hinting Microsoft assumed that if you need more RAM that what the highest client edition is licensed to, then what you really want is a server license. Windows 7's server counterpart (that is, Windows Server 2008 R2) can use up to 2 TiB of RAM in the Enterprise and Datacenter editions.

As technology moves fast, what was acceptable yesterday might not be enough tomorrow. In order to catch up, Windows 8 raised the limits to 128 GiB and 512 GiB for the Core and Pro/Enterprise editions, respectively. That only applies to 64-bit versions, though: 32-bit versions are still capped at 4 GiB. The server version, Windows Server 2012, can address up to 4 TiB of RAM in the higher editions.

Further reading

and31415

Posted 2014-02-03T22:21:45.487

Reputation: 13 382

32This is the best answer because it links to a good source with analysis. – Kevin Panko – 2014-02-04T01:09:01.993

9

Just a slight defense: the source code may be the same, but it's not necessarily the same code that would have been there without the support. As an example, a lot of work was done to improve scalability when you have lots of processors (see "global dispatcher lock" here: http://www.tomshardware.com/news/microsoft-windows-server,6589.html). That code is almost certainly the same in all editions, however higher editions of Windows support more CPUs. But supporting more CPUs took more work. Is it fair to charge more for that work?

– Mark Sowul – 2014-02-04T16:36:36.290

1The counter-argument could also be made, that they might develop the whole sophisticated thing all at once, but offer a less expensive restricted version for people who do not need the functionality. In the case of hardware, reduced features translates to smaller die size, less complicated memory interfaces, etc. and thus lower production cost. In the software world, cost is almost entirely associated with man-hours of development (and to some extent training / certification). But many consumers are hard-wired to expect an option of paying less for a product that does less. – Andon M. Coleman – 2014-02-04T19:20:57.880

8in short: min(license_limit, physical_limit) – akira – 2014-02-04T19:42:06.703

2@AndonM.Coleman products like Windows that sell so many copies the development costs per license are insignificant compared to most other costs per license. I see online articles saying Windows 8 sold over 100 million licenses in the first 6 months. Over the life of Windows 8/8.1 I expect the development cost per license will be less than the cost of producing a retail box and contents per box. New versions of Windows are typically not written from scratch. Windows 8/8.1/2012 are all VERY similar, and similar under the hood to vista/7/2008. XP/2003/2000 can be grouped together too – BeowulfNode42 – 2014-02-05T12:16:41.677

5Don't get me wrong, the new versions have had work done on them to make them better than the old versions. But things like memory management stays almost identical between versions. A few tweaks are often made as new hardware highlights issues that were not evident in testing before. But the main code stays the same in a product group. – BeowulfNode42 – 2014-02-05T12:20:46.663

2

@Mark Sowul The OP question was more geared towards client versions. Consider the less-featured edition: Windows 7 Starter (which is x86-only, BTW). Here they decided to not let people customize the desktop background, a feature available since Windows 95. The code to handle it was already there, they just crippled it. The default wallpaper is set to %windir%\Web\Wallpaper\Windows\img0.jpg. The picture SHA-256 hash is hard coded in shell32.dll, and is checked every time you log on, restoring the original registry value if changed. That took more work. Source

– and31415 – 2014-02-06T11:33:51.277

@akira Thing is Microsoft doesn't talk about a "license" limit. The EULA doesn't even mention the word "memory." The closest related thing is "the legalese's restriction to two processors [which] is not factually correct for all editions." Only Professional and higher client editions are licensed to use two physical processors. Everything else is limited to just one. Source From the server side, the highest edition (i.e. Datacenter) is licensed to use up to 64 physical processors.

– and31415 – 2014-02-06T12:29:54.340

1@and31415 You're right that it's certainly not always a matter of "not adding extra features", and yours is a good example. Usually when this sort of thing comes up in conversation, it seems the lower editions are seen as artificially taking things away, I just wanted to provide another perspective on at least some of those removals. Windows Starter, though is almost solely "make it super cheap and remove enough features to hopefully entice people to at least go up to 'home edition'" – Mark Sowul – 2014-02-07T01:14:50.590

53

Microsoft licences it that way. They likely want you to go and pay for a Windows Server product that is licensed to run with greater resources. It's the same with other products like SQL Server. SQL Server Express has limitations placed on it so that if you need more resources, you must buy the product that permits it.

Dave Lucre

Posted 2014-02-03T22:21:45.487

Reputation: 1 167

6He he, Windows Server is available for free to students ([tag:dreamspark]), so for us, it's more feasible to get that than to buy a copy of Windows... (no affiliation) – gparyani – 2014-02-04T02:16:21.917

2this is one of the reason why 32-bit windows XP and above can support PAE but MS restricts the limit to 4GB of RAM – phuclv – 2014-02-04T03:57:13.307

@LưuVĩnhPhúc support "PAE"? – unknownprotocol – 2014-02-04T08:29:53.587

132-bit windows is limited not because of licence but because you can't address more than 4GB with 32bits. In fact, it's limited to 2GB and 3GB with PAE from memory because only 31bits are used from memory. But needless to say it's a physical limitation. With 64bit windows it's a logical software limitation imposed by MS licencing – Matt H – 2014-02-04T08:36:46.303

3@MattH the limit to 3GB is because the upper Gig is memory mapped to peripherals – ratchet freak – 2014-02-04T08:50:55.613

@ratchet freak - We're both wrong I just looked it up. http://www.openrce.org/reference_library/files/reference/Windows%20Memory%20Layout,%20User-Kernel%20Address%20Spaces.pdf.

– Matt H – 2014-02-04T09:01:08.623

2

@MattH That's a common misconception. As an example, take a look at the official Windows Server 2008 System Requirements: "Maximum (32-bit systems): 4GB (Standard) or 64GB (Enterprise and Datacenter)." In this case 4 GB is a license restriction, and 64 GB is the Physical Address Extension limit (assuming the chipset supports remapping).

– and31415 – 2014-02-04T14:08:38.093

1

@MattH The usable RAM could be further reduced if reserved by the hardware (e.g. integrated graphic card). You also need to consider that each 32-bit process on a 32-bit Windows is limited to 2 GB, or 3 GB if it's large address aware. The limits in 64-bit Windows are 2 GB and 4 GB, respectively. Source

– and31415 – 2014-02-04T14:26:34.057

3The reason consumer 32-bit Windows refuses to use more than 4GB of address space is that there are too many legacy 32-bit drivers that aren't aware of PAE and would cause BSODs if used with it. It would be a support nightmare if MS enabled that. – nobody – 2014-02-07T03:22:08.153