3

This question follows the previous How do I precisely analyse the memory usage in Windows 7?

Why on a system where real processes eats only about 40% of physical memory (private working set) and the rest is somehow mysteriously eaten by operating system, kernel doesn't allow processes to allocate more memory even if there is still about 800MB of zeroed memory?

Memory

Is it possible to change kernel settings so that I can utilize 100% of operating memory? Right now, in task manager when I reach 80% of memory usage, kernel acts like if it was 100% because that's the edge when application starts to crash and are unable to allocate memory. How do I release these 20% so that I can utilize all memory I have up to 100%? Why these 20% are "reserved" and for what? The system is windows 7 64 bit with 4gb of ram in total. Swap is disabled for performance reasons. (hard drive is terribly slow and enabling swap makes the computer nearly unusable)

Petr
  • 2,481

2 Answers2

4

The private working set is not the entirety of a process's memory:

Private Bytes, Working Set, Virtual Size

The virtual size is the total amount of memory that a program might possibly need to run. Many programs don't use all of the virtual memory allocated to them, but they request it to make sure that they have enough to do any operation that you request of them. It's also used for memory-mapped files and other things that are easier to do as memory (shared memory spaces, IPC), but not strictly related to the process requesting private memory.

In order for this to work, the OS has to either:

  • Provide a guarantee for the memory that it will be available
  • Decline the memory request (most of the time, this will return in the application crashing/quitting)

Normally, the system will allocate this unused virtual memory into the page file, and then only the parts of it which are actually used will take up physical RAM. However, by disabling your page file, you're forcing the OS to use physical memory to provide these guarantees. This means you'll wind up with a lot of zeroed memory pages that can't be allocated to another process.

When you have a page file, a process only needs somewhere between the Working Set and Private Bytes amount of physical memory. When you disable your paging file, Windows must allocate it the full Virtual Size amount of memory, or decline the memory request. (In Windows' Resource Monitor, this is the Commit column, because Windows is Comitting that amount of virtual memory to the process.

Darth Android
  • 38,658
1

Resource Monitor should show if you actually have any free memory.

Resource Monitor

Also see Any benefit or detriment from removing a pagefile on an 8GB RAM machine?