5

I have 4GB of RAM. But according to system monitor my PC never uses above 3.1 GB. When it reaches 3.1 GB used apps start to shut down/crash.

Why is that remaining 800MB not used?

I found a few web resources like: The usable memory may be less than the installed memory on Windows 7-based computers

But my PC does not say anything about usable memory. It's only 4GB and not limited.

Also found few other questions here, but every one has usable part displayed. And my PC does not show it.

system control panel image

I get the following error almost constantly:

low memory error image

Shouldn't it use swap instead of issuing errors?

Just a thought: I have less than 10% free space on disks, and they're red. It's still plenty of space on HDD, but maybe Windows then tries not to use swap?

Memory monitor: memory monitor image

Also, a screenshot of how swap file looks like when errors appear: enter image description here

Gacek
  • 223
  • 3
  • 12
  • 1
    The loaded OS needs RAM, likely to be the 800MB that you are "missing". – Hannu Aug 24 '15 at 14:36
  • What does the Resource Monitor show is using the RAM? – Ƭᴇcʜιᴇ007 Aug 24 '15 at 14:50
  • In resource monitor it was free/standby. After restart i managed to fill whole memory and apps dont crash. I'm confused about this behaviour atm. – Gacek Aug 24 '15 at 14:56
  • "*When it reaches 3.1 apps start to shut down/crash*"??? Don't you have a swap/page file? – Jan Doggen Aug 24 '15 at 14:57
  • I do. its currently 4GB, managed by system. System shows; recommended 6GB. But can take as much as it wants. There is space on SSD drive also. One thing that bothers me is that after restart i just did, I managed to fill it to 3.94GB and no crashes happen. System works stable atm. But that behaviour is not something that just happend. I have those crashes for few months already. Mainly when using memory greedy apps – Gacek Aug 24 '15 at 15:02
  • 2
    @DragonLord read carefully. First of all its 64-bit. Secondly, sees all memory – Gacek Aug 24 '15 at 15:15
  • post a picture of ResourceMonitor->Memory – magicandre1981 Aug 24 '15 at 17:10
  • Please repost this question as it has been incorrectly marked as a duplicate. Make sure you clearly state the question is nothing to do with RAM "not showing" but rather RAM that is showing correctly but not being used because Windows not allocating sufficient pagefile space. The issue is down to VM allocation btw. – qasdfdsaq Aug 25 '15 at 15:24
  • @qasdfdsaq No, re-asking the question is the wrong action here. The question will be re-opened after enough moderation votes are cast for the reopen action. – Kevin Panko Aug 25 '15 at 16:19
  • @KevinPanko: The advice box specifically says to re-ask the question, and IIRC reopen votes are only possible while a question is pending, not closed? – qasdfdsaq Aug 25 '15 at 16:20
  • 2
    @qasdfdsaq Reopening is possible in both the pending and closed states. I have edited this question to try to make it more clear that it is not asking the same thing as the other questions. Also I have cast a vote to reopen this question. If this question is asked again as a new question, there is some risk of confusion because the new question could be considered a duplicate of this question. – Kevin Panko Aug 25 '15 at 16:26
  • 2
    @Gacek What makes you sure your swap file isn't being used? The image you posted of Task Manager's Performance tab indicates have 10 GB of Committed RAM. If this question were open right now I'd post an answer stating that you don't have 800 MB free RAM and that your swap file isn't large enough to accommodate your system's memory demand. – I say Reinstate Monica Aug 25 '15 at 19:37
  • 1
    @twisty In other words, everything is normal here. Only things to do are to free up some hard drive space and/or add more RAM chips. – Kevin Panko Aug 25 '15 at 20:49
  • @KevinPanko Agreed. I'd encourage the OP to look into what's asking for so much memory, but as far as Windows is concerned, its memory management is working correctly. – I say Reinstate Monica Aug 25 '15 at 20:52
  • I freed more memory and increased swap size (set it manually to bigger init one). This seems to have fixed errors! Thank you everyone for your help. I didn't expect I needed so much memory. – Gacek Aug 26 '15 at 14:57

1 Answers1

6

You really are out of memory (virtual memory, that is)

Take a look at your the Commit Charge as highlighted in your Task Manager screen shot:

enter image description here

First number = Current commit
Second number = Commit limit

According to this Super User answer:

The commit limit = current pagefile size + RAM size - RAM permanently allocated to nonpageable memory.

This is a hard limit: Windows cannot grant requests by programs for more memory beyond it. This screen shot indicates you have 10 GB of a possible 10 GB allocated to programs. This is triggering the "Out of memory" message.

What to do?

  1. Install more physical RAM. This will increase your Commit Limit accordingly and improve your computer's performance.

  2. Increase the size of your page file. This too will increase your Commit Limit, but because paging slows down a computer, don't expect any performance benefit.

  3. Close programs that are using the most memory. You can return to the Memory tab in Resource Monitor and sort the processes by the Commit (KB) column to see which ones are having the greatest impact on your memory use. Perhaps you have a program that's using too much memory that can be closed. Be aware that "The total commit charge will always be larger than the sum of these values, as the total includes system-wide allocations such as the paged pool." (Source)

I say Reinstate Monica
  • 25,487
  • 19
  • 95
  • 131
  • Increased paging size limit. 4GB RAM + 10000MB Pagefile (init size) gave me x/13GB commit size. Hope this will suffice for now. But thanks to this i know (or think) now I could utilize even 16GB of RAM. Getting new spec soon and plan to make it 16GB + space for additional 16GB just in case. My current system is 2/2 RAM slots. Very much thank you for your answer. Didnt know what this filed was before. – Gacek Aug 26 '15 at 14:55
  • @Gacek Just a bit of clarification: The total Commit Charge in use on a system *doesn't* necessarily indicate how much physical memory is needed. For example, a program may ask Windows to allocate 900 MB of memory, but only end up using 500 MB of this. All 900 MB will count against the Commit Charge, but only the 500 MB actually used would ever get stored in physical RAM. It's very rare for a system to need enough physical RAM to store this "maximum allocation" requested by programs. – I say Reinstate Monica Aug 26 '15 at 15:06
  • 1
    Correct. Commit is the total amount of comitted memory that has been requested but not necessarily used. A lot of applications speculatively request more memory than actually needed but this all has to be physically backed somewhere, i.e. with RAM or a pagefile. In extreme cases you could have a program that requires 100MB request 100GB ,and you would need a 100GB pagefile to run it. – qasdfdsaq Aug 26 '15 at 15:17
  • Still, requested = granted = needed to run at all without errors, right? – Gacek Aug 26 '15 at 15:35
  • @Gacek No. Programs will ask Windows to reserve the **maximum** memory they'll ever need, but only in the worst-case scenario will the program use this much. You're certainly welcome to install as much physical RAM as you can put into your computer, but beyond a certain point it will go completely unused. As detailed in my answer, you only encounter errors when Windows can't "reserve" this maximum amount of RAM that programs are asking for. – I say Reinstate Monica Aug 26 '15 at 15:47
  • @Twisty Is reserved also occupied? If i have 2GB of ram, program reserves 1GB (but needs 100MB). Can other programs use 1.9GB or 1GB? If 1GB is what is left for other app, then I need to have some of spare memory to run programs. – Gacek Aug 26 '15 at 15:50
  • @Gacek No, the amount of RAM "reserved" (what I've been calling allocated) by a program **does not** indicate how much *physical memory* the program actually needs. In your example, if you had only one program that reserved/allocated 1 GB of memory but only used 100 MB of that, then only 100 MB of physical memory would be consumed, leaving 900 MB of physical memory available for other programs. Windows is *very smart* about memory management and knows you want as much of your program's code as possible in physical memory (vs. the page file) in order to get the best performance. – I say Reinstate Monica Aug 26 '15 at 15:55
  • “Programs will ask Windows to reserve the maximum memory they'll ever need”—this is wrong, entirely. Programs can allocate or release memory as they desire, at any given time. There’s no need to have large amounts of memory reserved. The only exception is an out-of-memory situation. – Daniel B Aug 26 '15 at 16:15
  • @DanielB You're absolutely correct. Forgive me for using simplistic, everyday language. I'm necessarily trading technical accuracy in an effort to communicate clearly to a user who is struggling to grasp the concepts of Windows' memory management. – I say Reinstate Monica Aug 26 '15 at 16:19
  • 1
    @Twisty Acually what DanielB said is clearer to me. I may not be windows memory management spec. I'm just a simple webapp programmer and don't care about how windows manages memory. Only care for apps to take as less as possible. And app allocating memory means to me that it takes this memory and it belongs to this app only. – Gacek Aug 26 '15 at 17:34
  • 1
    @Gacek Fair enough. The very reason we have community is so multiple perspectives can bring about the clearest information. – I say Reinstate Monica Aug 26 '15 at 17:37
  • 1
    Just to note: setting initial level of swap file (my windows does not like to allocate to higher limit and system controlled option fails here. It didn't want to go beyond certain point) high solves all my out of memory errors. Thank you @Twisty :) – Gacek Aug 27 '15 at 16:58