1

Edit

The video files I talk about were unrelated to LoL (game). They were separate files that I personally downloaded. Of the 8GB that was used then the game crashed, the game was using less than 500MB. Chrome was using 1GB. The system services was using less than 500MB and everything else I have running was less than 1GB. My average memory consumption is around 2.5GB - 3GB for all programs / games.

Edit

The 6GB being used was after I closed the game and all other apps out. When the game crashed all 8GB was being used (non in standby or free / not available to be used when needed) with 5GB of it being cached MKV video files that were not in standby/free. The game was able to crash with "out of memory" because I have my virtual memory (swap file) disabled (the problem was not the game being able to crash but why these large MKV video files were sitting on all of the memory pool forcing the game to crash).

TL;DR

Windows 8 was caching a ton of large MKV files as active memory (not standby). These MKVs were not open in any program and this was after several restarts without opening the MKVs. Using RAM MAP to release all "working sets" cleared all the MKVs from RAM cache and reduced my RAM usage from 6GB to 2GB.

How do I prevent this?

INTRO

I'm running Windows 8 64bit with 8 GBs of RAM.

I don't use a lot of programs. The only "heavy" programs I use is Chrome, League of Legends, and perhaps Malwarebytes. Not a whole lot.

Yet my game kept crashing with out of memory errors. I was getting really puzzled by this because I know I wasn't using 8GB of RAM with what I was doing.

So I look at task manager and adding most of the stuff in my head I get around 2GB used by resource monitor reports 6GB being used (with no active "heavy" programs). Really puzzled now.

Get more detailed with Ram Map program. It tells me that mapped files are using 4GB is not a bother to me if it's all in standby or ready to be released anytime. But it wasn't... all 4GB was active not in standby.

So I dug deeper and went to file lister and listed it by active memory and found the culprit...

5
  • 1
    Do you have your swap file disabled? Feb 25, 2014 at 15:44
  • Could be a driver memory leak.
    – Bigbio2002
    Feb 25, 2014 at 15:52
  • I have my swap disabled because I know for a fact I don't use enough programs to approach 8GB. In-fact after I reset the memory pool I am only maxing out at 3GB with all of the major programs I usually use being open. Feb 25, 2014 at 16:09
  • post the saved data of RAMMap (rmp file): blogs.technet.com/b/askperf/archive/2010/08/13/… Feb 25, 2014 at 16:21
  • upload the RAMMap data. I need to look at them to help you. Feb 26, 2014 at 19:27

4 Answers 4

1

Windows programs do not run "out of memory" because they're out of RAM. They're out of addressable memory. In practice, that only happens to 32 bits processes, as they can address only 4GB (232) in the best case, and often just 2 GB (231).

Furthermore, RAM used for caching files is available to programs when they need it. Windows still had 2GB free, so of course it didn't throw out cached files. Why would it? Better to use free memory instead, when a program asks. (But your program probably couldn't ask for more than 2GB anyway)

Note that this fixes a bug in earlier Windows versions (up to XP), which mistakingly freed cache memory even when there was other free memory available. You seem to want this bug back.

4
  • 1
    They can run out of memory if the addressable space is larger than the total available virtual memory (which can easily happen if you have a swap file disabled) Feb 25, 2014 at 15:55
  • @ScottChamberlain: Well, that's setting up your system for problems, therefore it's not the default config. It's not mentioned in the question either, and with 2GB spare RAM it doesn't matter anyway.
    – MSalters
    Feb 25, 2014 at 15:59
  • Yes I had my swap disabled. This is why the program was actually able to crash with an "out of memory" error. The problem wasn't why it was crashing, but why these MKV video files were sitting on all my RAM making it unusable for other programs (these cached video files were not in standby mode, they were active memory part of the "mapped files"). I also edited my question to reflect this now. Feb 25, 2014 at 16:12
  • The active RAM used by the cached files can still be used by other processes. Windows will shrink the file cache's working set (and any other processes' working sets) if something else needs a lot of RAM (evidenced by a high pagefault rate). That is not your problem. The problem is that your commit limit is too low for the programs you're trying to run. See my answer. Aug 13, 2014 at 13:33
1

Both Chrome and the game is not designed to be run on a system without a swap file, it assumes that there will be a swap file and uses much more memory than "the bare minimum needed" to run to help improve performance.

Your options are to contact the developers of League of Legends and Chrome asking them to re-write their software to be no-swap file friendly (which would cause the software to have worse performance because they need to have it spend extra CPU cycles on memory management) or start using a swap file.

Note, while back in the days of windows XP and earlier disabling your swap file would actually give you a performance boost due to a flaw in the memory manager being too aggressive, it is no longer true today. There is no compelling reason not to have a swap file on a modern version of Windows.

3
  • I guess I need to clarify this even further. I checked the file names under "file summary" in rammap. The files had nothing to do with LoL. They were video files that I personally downloaded. Feb 25, 2014 at 16:26
  • The answer is still the same, the game is not designed to run on a system with no swap file. Your two options are still the same. Feb 25, 2014 at 16:27
  • 1
    I have played this game for years with no swap file. It has only crashed when my RAM usage was 100% for the first time in those years. I feel like everyone is trying to avoid the actual question. I have made so many edits and clarifications to such a simple question. Feb 25, 2014 at 16:33
1

"I have my swap disabled because I know for a fact I don't use enough programs to approach 8GB"

Yeah... the "out of memory" errors you're seeing are telling you otherwise.

You are laboring under a fundamental misconception.

The "out of memory" message has nothing to do with RAM, and would not be helped even if all of those mapped files were unmapped, even if all of your RAM was free.

It refers to virtual memory, or more precisely, commit charge, which can be no greater than the commit limit. The commit limit is the size of RAM (not just "free RAM"! All of RAM) plus the current size of your pagefile.

Your game is apparently asking for a huge allocation of virtual address space. Your system doesn't have enough commit available to satisfy the request, so the game crashes.

Note that after the game crashes, you will not be able to see why the problem occurred. The commit charge will be at or below the commit limit. (It always is.) Since the game's allocation request failed, it is not reflected in the current commit charge. There's no easy way to know how much the game was asking for.

As for why you used to be able to run the game with no pagefile, the question is not "who's using the RAM", but "who's using the commit charge". n.b.: Files mapped by the file cache do not contribute to commit charge (because the files themselves are the backing store; if there is not space in RAM for them they don't have to be paged to the pagefile). Nor of course does the standby page list.

The cure is to either add RAM, or enable your pagefile.

More details here: http://azius.com/blog/pagefile-yes1/ - second part. But the first part helps to understand the second part.

0

MKV splitters like LAV and Haali map the MKV file to "standby" memory. Divx Media Foundation MKV splitter maps the MKV file to "active" memory for some reason, consuming a massive amount of RAM, not allowing it to reallocate as needed.

I believe the Divx Media Foundation MKV splitter is doing this incorrectly and the splitter needs to be told to map to standby memory like the other MKV splitters.

I have some screenshots with RAMMAP detailing how the splitter maps the memory differently:

https://superuser.com/questions/778562/standby-memory-mapping-divx-media-foundation-splitter-mkv-playback-on-media

If there isn't a way to fix this "active" mapping, I will probably bite the bullet and upgrade to 16GB of RAM.

4
  • 1
    A program cannot map anything to standby. That is an action taken by SuperFetch. Nor can a program map anything directly to active RAM. Files are mapped to virtual address space. The pager in the OS brings the pages from the files into RAM as they are accessed and pushes them out of "active" as they are no longer needed, or when the file is unmapped. Aug 13, 2014 at 13:36
  • 1
    Thank you, Jamie. I believe this problem then wouldn't be with the DivX Media Foundation splitter, since it can only map to virtual address space. The problem would exist in the functioning of the pager in the OS bringing the files into active RAM when using the Divx Media Foundation splitter. I wonder if there a way to disable the pager from mapping MKV files to active RAM when using the Divx Media Foundation Splitter. Aug 14, 2014 at 14:45
  • Umm... How do you propose the splitter work on the data in the MKV file if the data is not brought into "active RAM"? The CPU can't manipulate anything that's not in RAM. All it can do with data in a file is read it into RAM, or write it from RAM to the file. Aug 14, 2014 at 14:57
  • Oh, and... LAV and Haali don't "map the MKV file to standby memory". They bring the file contents into their virtual address space, and the OS pager brings it into RAM as it is accessed. It ends up in standby either when the program is done with those pages, or when SuperFetch says "oh, you might need that file again, I'll leave it in / bring it into Standby memory." But Standby pages are just as available for immediate use as "Free". They do not represent any sort of loss of available RAM. And they have NOTHING to do with the "out of memory" message. Aug 14, 2014 at 17:05

You must log in to answer this question.

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