Reducing Windows 10 x64 memory footprint – can I tune the system's automatic memory compression?

Having recently migrated to Windows 10 from a Windows 7 and Linux (Ubuntu/Kali/Redhat) along with extensive usage of virtual OS's

Finding it difficult to reduce memory footprint of windows 10 OS on a new lenovoZ51-70 laptop trying to run a migrated guest OS which is failing with below error in eventvwr logs of host OS

Provider [ Name] Application Error

EventID 1000 [ Qualifiers] 0

Level 2

Task 100

Keywords 0x80000000000000

TimeCreated [ SystemTime] 2016-01-26T10:26:59.000000000Z

EventRecordID 2163

Channel Application

Computer ZeroCool

Security
EventData VirtualBox.exe 5.0.14.5127 569e6712 QtCoreVBox4.dll 4.8.6.0 5565c7c8 c0000005 0000000000023217 1594 01d1582400729aef C:\Program Files\Oracle\VirtualBox\VirtualBox.exe C:\Program Files\Oracle\VirtualBox\QtCoreVBox4.dll 6f631a15-7ad8-4d59-bde5-59a431caf81e

and Virtual box virtual logs point towards lacking of available ram for application to lock on to ... where the guest only requires 1600MB and the laptop has 4GB ram and OS limits the apps from consuming ram more than 1400MB and as per suggestion from Virtual box community have increased virtual memory of the OS significantly.

Upgrading to another ram module is highly unlikely for next few months !! this query is raised only after considerable research in all technical forums available ..... Being an Enterprise app developer have done my homework...

All i require from this forum is to provide me list of Useless OS services consuming the memory i would not mind to hack into registry or a Dll if need be ....

Or steps to decrease memory footprint of Windows 10 OS

After going through few technical forums changed a registry key and page file size.

REGISTRY UPDATE * Start > regedit (type regedit after clicking Start) * HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Control > Session Manager > Memory Management * Right click ClearPageFileAtShutDown > Modify > change Value Data to 1. * Reboot (either now or after Control Panel Update below)

CONTROL PANEL UPDATE * Control Panel > System and Security > System > Advanced system settings > Performance > Settings > Virtual memory * Uncheck "Automatically manage paging file size for all drives" * Check "System managed size" button * Reboot

Still memory consumption of the Windows 10 64bit still remains 3Gigs oddly.

Windows resource manager screenshotWindows taskmanager screenshotVirtual Box error message Virtual box error screen shot

In Windows 10, they have added a new concept in the Memory Manager called a compression store, which is an in-memory collection of compressed pages. This means that when Memory Manager feels memory pressure, it will compress unused pages instead of writing them to disk. This reduces the amount of memory used per process, allowing Windows 10 to maintain more applications in physical memory at a time. This also helps provide better responsiveness across Windows 10. The compression store lives in the System process’s working set. Since the system process holds the store in memory, its working set grows larger exactly when memory is being made available for other processes. This is visible in Task Manager and the reason the System process appears to be consuming more memory than previous releases.

Is there a way I could tweak Compression Store for my requirements ?


Solution 1:

You can try adding more memory pressure to your system such that Windows pushes memory pages from RAM to the page file. The sysinternals testlimit program lets you allocate lots of memory (as outlined in one of Russinovich's blog posts), which should (hopefully) convince the memory manager to push data to the page file.

Run the following and let it hammer for a while (monitor your RAM in task manager), then terminate it.

testlimit64 -m 100

You should see other processes physical commit charge (ie: actual RAM usage) decrease and testlimit hog everything. When testlimit ends, you should have more RAM available than when you started.

Important note: this may let you start your VM, but will also slow down all the other programs running on your computer because when you next use them, they'll have less physical RAM to use and will need to load from the page file.

(This is a workaround rather than an actual fix. More RAM is the best solution, as already noted) .