I was wondering if there is any way to configure Windows to consume MORE ram. I have a desktop PC with 16 GB of ram and only 2 is used on a normal workload. The maximum which i witnessed till now is 6 GB. Is there any way to tell Windows to tune its inner working for such an environment?
It likely already is using it. In this example:
- Total RAM: 12GB
- Used: 4.45GB
You would think there's 7.55GB of unused RAM. Wrong. Windows uses it as caching, either by keeping previously used data that is not required anymore, or by loading up frequently accessed data in advance (mostly OS stuff like libraries and prefetches - it's not loading up your word files or anything). With some luck, some of it will be re-used which will improve performance.
- Cached: 7.8GB (most marked as available because for other stuff can use it at any moment)
- Actually free: 16 megabytes.
It already is.
What is important to note is the difference between memory that the system must have to run and memory that is nice to have for caching and such. That 2GB of memory, up to 6GB at times, is memory that windows must keep in memory to run your programs or face serious pagefile thrashing issues. However, that doesn't mean that the other 14GB aren't in use! On the contrary, the rest of memory is being used heavily for caching files from disk and other frequently used but slow data stores. However, since this is just cache, windows doesn't consider the memory to be "in use" -- it can just dump it if it needs the space for actual application data.
"But then why do I need a pagefile?"
Having a page file allows windows to manage the cache in the best way possible. See, we humans think we know a thing or two about how to best manage some 128 billion bits of data in the most effective way possible. The truth is we don't know squat compared to the algorithmic efficiency that a computer otherwise attempts to use when we stop meddling and let it do its thing.
Let's say a program needs 200MB of memory, but it's only accessing 100MB of that memory frequently. Windows will allocate 100MB of memory for the application (part of that 2GB you're seeing), and then allocate 100MB of page file for the rest of the space that the application needs. And when you have the spare memory available, it'll just load that 100MB from the page file into memory, so that it's sitting there, always ready. When windows does this, it knows that that 100MB of memory is still available for more important needs-- let's say you're loading a 100MB level file for a game frequently, every couple of minutes or so, but that application only uses that extra memory once a day (and while we're at it, assume the rest of memory is already filled with cache). Should that memory sit there idle, while the game level is loaded off disk each time? Of course not! Windows will dump the application data from the cache and load the game level into the cache, making your game run considerably faster.
With 8GB of memory or more I'd suggest you try disabling kernel paging. This will force your kernel into the memory instead of paging part of it and you might get a slight increase in responsiveness from your system. What I would not suggest is disabling the page file, although you could probably get away with setting it at a minimum of 1GB and a max of 2GB. Windows 7 is actually very good at managing memory and although you probably won't run into any low memory issues by disabling the page file it will likely effect SuperFetch. Even though 6GB might be used for running programs, Windows will use almost the all the rest of the memory to cache files you a likely to open at a given time. This is SuperFetch (Prefetch's older brother). Disabling the page file will almost certainly give you no improvement in performance and you'll probably be shooting yourself in the foot when in comes to load times.
Disable pagefile. Generally a bad idea, but will do what you want.
To do that, go to: Control Panel\System and Security\System\
Advanced systems settings\performance settings\advanced tab\change (under virtual memory)\uncheck automatically, click no paging file
This is an example of why its a bad idea not to have a page file. If this cant happen to you (you have enough RAM), then there will be no issues.
Removing pagefile entirely can cause more disk thrashing. Imagine a simple scenario where some app launches and demands 80% of existing RAM. This would force current executable code out of RAM - possibly even OS code. Now every time those other apps - or the OS itself (!!) need access to that data, the OS must page them in from backing store on disk, leading to much thrashing. Because without pagefile to serve as backing store for transient data, the only things that can be paged are executables and DLLs which had inherent backing stores to start with.
If you have Windows 7 Home Basic edition, your OS cannot use more than 8GB of RAM anyway. I believe no-one mentioned it. Plus, some processors do not support 16 GB RAM too. I believe you need i5 or higher to run more than 8 GB RAM. I'm not sure about AMD processors, although there definitely is a limit to RAM addressed by a processor too. Your RAM load seems fine and not out of the ordinary. You would have to edit a video or compose some 24-bit music in order to use 16 GB of RAM.