Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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)

share|improve this question

closed as not constructive by Ƭᴇcʜιᴇ007, Zoredache, 8088, Synetech, HackToHell Nov 3 '12 at 9:20

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Swap is disabled for performance reasons. really seemed to work out with processes crashing and all… –  Baarn Nov 2 '12 at 15:42
    
Are you apps 64 bit also? A 32 bit app cannot use more then 2 GB normally. –  Zoredache Nov 2 '12 at 15:44
    
Disabling swap generally decreases performance, once you take into account the lack of disk cache that comes with disabling it. –  Darth Android Nov 2 '12 at 15:45
    
no application eats more than 300mb of ram. The system has 4gb of ram, but applications eats about 1gb. The rest of memory is not available for unknown reasons. –  Petr Nov 2 '12 at 15:52

2 Answers 2

up vote 2 down vote accepted

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.

share|improve this answer
    
Ok, how do I check how much virtual size is each process eating then? So that I can trace which process is eating so much. How do I let the system allocate the remaining 20% of free ram, which is flagged as unused, zeroed RAM –  Petr Nov 2 '12 at 16:05
    
@Petr You let it allocate the memory by enabling your paging file. Every program is going to have unused memory space, but some more than others. As noted at the bottom of my post, the "Commit" column will show you the biggest offenders if you compare it to the Working Set. I don't think this will help much, because many system processes allocate an extra 30-50Mb of virtual memory. It's not much, but it adds up quickly. –  Darth Android Nov 2 '12 at 16:11
    
ok, I had to read it again, now I get it –  Petr Nov 2 '12 at 16:22
    
is it possible to decrease the amount of memory which is given to process when it request more memory so that there is less zeroed memory which can't be used? –  Petr Nov 2 '12 at 16:32
    
@Petr No. Memory allocation doesn't work that way. A process requests a specific amount of memory, and the OS either commits or denies. –  Darth Android Nov 2 '12 at 16:41

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?

share|improve this answer
    
regarding the pagefile: if I enable pagefile, the computer become unusable, it stuck for several minutes every few seconds. Everytime it attempts to move some memory to / out of swap, the processes this memory belongs to are frozen, and this operation takes a lot of time. Enabling swap is simply not possible here. –  Petr Nov 2 '12 at 16:07
    
resource monitor is displaying 500mb of Free memory. However I am not able to start even application that eats 200mb of memory. Why? This free ram can't be allocated and I don't see a reason. –  Petr Nov 2 '12 at 16:08
    
@petr Can you post a screenshot into your question similar to the one in this answer, sorted by "Commit" descending ? –  Darth Android Nov 2 '12 at 16:14
    
@DarthAndroid i.imgur.com/kLpvO.png –  Petr Nov 2 '12 at 16:26

Not the answer you're looking for? Browse other questions tagged or ask your own question.