-4

With pagefile disabled and 4GB of memory allocated, Windows 6.2 (8 and Server 2012 with desktop experience) starts up using just under 1GB. As applications are loaded, memory usage reaches 3GB, at which point Windows starts to struggle; using any more memory causes Windows elements on screen to glitch and disappear. Somewhere between 3GB and 3.5GB of usage, explorer.exe will crash, or Windows will throw the user to the login screen, or the desktop render will crash altogether (but the right side charms bar still works... evidently, MS priorities are not in order).

  1. Why is the user not able to use all 3GB of remaining memory for applications without having Windows crash?

  2. There are no new useful features in Windows 6.2 compared to 6.1 that one would expect to require additional memory on startup, so why has idle memory usage gone from 0.5GB to 1GB? Even installing Windows 6.2 in HV requires 1024MB of minimum startup memory, compared to 512MB for 6.1.

2
  • 6 and 6.2? Which versions should that be?
    – Journeyman Geek
    Commented Nov 13, 2015 at 8:06
  • @vandidant - Why don't you just use their proper names?
    – Ramhound
    Commented Nov 13, 2015 at 11:57

1 Answer 1

2

Why is the user not able to use all 3GB of remaining memory for applications without having Windows crash?

Without a pagefile, Windows has to reserve enough memory to back every single allocation it's ever made. So even if there's plenty of free memory, use of that memory can be restricted. This is why you need a pagefile.

This question is basically the same as "why can't I write a check even if there's plenty of money in my account". It's because you need to keep enough money in your account to cover every check you've ever written that's still out there, even if some of them are very, very unlikely to ever get cashed.

Modern operating systems cannot make efficient use of memory without backing store. In the case of Windows, that's the pagefile.

There are no new useful features in Windows 6.2 compared to 6.1 that one would expect to require additional memory on startup, so why has idle memory usage gone from 0.5GB to 1GB? Even installing Windows 6.2 in HV requires 1024MB of minimum startup memory, compared to 512MB for 6.1.

It doesn't require that memory. It just uses it because you can't save memory for later. There is absolutely no disadvantage to using memory that you have, so modern operating systems (including Windows) make no effort to make RAM free when they're not under memory pressure.

For example, say a program runs and then terminates. You don't need to keep that program in RAM, but if you have the RAM, why not? It will reduce disk I/O should the program run again. And you can always switch the RAM to another purpose later if you need the RAM for something else. What possible advantage do you get from making the RAM free now, when you have lots of free memory anyway?

5
  • To your first point: It's just like when you write a check. Even if it's very unlikely that the check will get cashed, you have to assume it will. With no page file to cover, it has to heavily restrict what it uses RAM for. To your second point: If Windows is running out of available memory, it should definitely not free up the memory, it should use it for whatever is causing it to run out of available memory. That is, it directly transitions RAM from one use to another without wasting effort to make it free just to make it used again. Commented Nov 13, 2015 at 8:36
  • The usage drops to 1GB because sometimes you have no choice but to make memory free. This is your worst case option, because you just have to go to the trouble of making it used again. But if you have dirty anonymous pages, and a program terminates, there's nothing you can do but make that memory free. Commented Nov 13, 2015 at 8:37
  • 1
    Consider a program that memory maps a 1GB file and makes a private, writable mapping. The operating system has to reserve 1GB of backed memory in case that program modifies every single byte of that memory. With no page file, the only place it could store that data is in RAM. So even though no RAM is yet used by the mapping, 1GB of RAM is now heavily restricted and cannot contain anything but clean, backed pages. (With a page file, it could just reserve 1GB of page file and continue to use RAM for any purpose.) Commented Nov 13, 2015 at 8:39
  • Yes. The two major exceptions would be if you know that you have much more RAM than you will ever need or if you have very tight control over exactly what software you are going to run (such as embedded systems). The amazing thing is that pagefile has huge effects on system behavior and performance even if it isn't used. Its mere existence removes those restrictions on how RAM can be used. Commented Nov 13, 2015 at 8:45
  • @vandidant That's not quite correct. What happens is that certain types of memory mappings cause RAM to become restricted and unable to hold modified data. The OS handles this restriction by refusing to permit allocations of virtual memory that might require backing store that it can't be sure it has (and popping up those annoying "running low on memory" messages). This overhead does apply to embedded systems and embedded systems that don't have page files are either designed with excess RAM or have all their software carefully designed to minimize demand for backed memory. Commented Nov 13, 2015 at 8:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .