1

Windows reserves some memory for it's internal use which is not normally allocated to applications. This reserve is seen most easily if you run without a page file or limit the pagefile to relatively small size (such as 3GB). Windows will allocate primarily RAM up to the limit, fill up remaining free space in the page file (if any) and issue a low memory warning when there is no page file space left and the allocated RAM limit is exceeded.

The limit appears to be a percentage of the total system RAM. Windows 7 x64 limit is discussed here and methods for circumventing the "low memory warning" is discussed here.

Disabling the low memory warning has some advantages - You can use some 600MB more RAM on 8GB machine) But there is a serious disadvantage - When you're out of ram, programs will crash.

How much RAM can you allocate on 8GB Windows 8 x64 before you get the low memory warning? Is it possible to adjust the warning threshold?

Edit: I can't answer this myself as it got closed due to arguing for arguing's sake. However I answered it here: What is the "low memory warning" threshold with 16GB x64 windows?

In short, yes, Windows 8.1 x64 will behave the same way as Windows 7 x64 did. If you're low on Commit limit - Commit charge, a fairly large percentage of RAM is still kept available if at all possible. This is done by moving more things into pagefile.

What is the "low memory warning" threshold with 16GB x64 windows?

Barleyman
  • 332

2 Answers2

13

This behavior is inherent in modern memory management. It will occur on pretty much every modern virtual memory OS if the amount of available backing store (pagefile or swap space) is not sufficient relative to the amount of physical memory.

If you look at modern applications on a Windows system, you can see that their working set (the physical memory they are using) will tend to be a bit less than their commit size (the virtual memory the operating system has promised them).

For example, on my desktop Windows machine, the browser I'm using to type this answer is using 207MB of RAM, but the operating system has already promised it 280MB of virtual memory. This means that at any second, the browser can consume 280MB of virtual memory without having to ask the operating system for permission, just by accessing mappings it already has. The operating system either needs to provide the process with this memory, or it has to forcefully terminate it, failing to honor commitments it has already made.

With no backing store at all, with just physical RAM, 73MB of additional RAM would have to be reserved for this application. Even though the browser is only using 207MB of RAM, it can balloon to 280MB just by using memory it has already allocated that the operating system has not actually allocated to it yet (just reserved).

If the operating system has sufficient backing store for all its commitments, then it can continue to make commitments. But it not, it's forced into an unpleasant choice. It can tell applications that it cannot make any more commitments, even though there's plenty of free RAM. Or it can grant application commitments, but then have to forcefully terminate applications when they go to use resources they've already allocated.

The solution is simple, configure ample backing store. This used to not be a problem. Everybody had giant disks with hundreds of gigabytes. So adding backing store equal to your physical memory wasn't a problem. However, recently machines with small SSDs are becoming common. So this is becoming an issue again.

Note that the page file need not even be touched for it to solve this problem. The operating system just needs to know it's available in the unlikely case that a significant number of commitments be called in at the same time. This almost never actually happens -- it's kind of like a run on the memory bank.

6

From Memory Limits for Windows Releases:

1
2
3

4
(See full table for further details about user and kernel-mode virtual address space limits etc.)

That bit highlighted in red is probably where you got that idea of a 25% limit from. Yes, only ~3 GB of RAM out of 4 GB installed is available to 32-bit processes on 32-bit versions of Windows, and this hasn't magically changed with Windows 8. As for why this is, I'm not going to bother repeating all the articles on the internet that have already explained this in detail, including Jeff Atwood's Dude, Where's My 4 Gigabytes of RAM?

Karan
  • 57,289