• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.
  • The forums have been upgraded with support for dark mode. By default it will follow the setting on your system/browser. You may override it by scrolling to the end of the page and clicking the gears icon.

Memory Compression On or Off?

Memory Compression


  • Total voters
    47
Joined
Sep 27, 2019
Messages
1,213 (0.59/day)
Location
Canada
System Name New compy
Processor AMD Ryzen 5800x3D
Motherboard MSI MPG x570S EDGE MAX WiFi
Cooling Noctua NH-D15S w. FHP141 + Xigmatek AOS XAF-F1451
Memory 32gb G.Skill Ripjaws V Samsung B-Die Dual Rank F4-4000C16D-32GVKA
Video Card(s) ASUS TUF GAMING RTX 4070ti
Storage 17tb (8+4tb WD Black HDD's, 2+2+0.5+0.5tb M.2 SSD Drives) + 16tb WD Red Pro backup drive
Display(s) Alienware AW2518H 24" 240hz, Sony X85K 43" 4k 120hz HDR TV
Case Thermaltake Core v71
Audio Device(s) iFi Nano Idsd Le, Creative T20 + T50, Sennheiser HD6Mix
Power Supply EVGA Supernova G2 1000w
Mouse Logitech G502 Hero custom w. G900 scroll wheel mod, Rival 3 + Rival 3 wireless, JLab Epic Mouse
Keyboard Corsair K68 RGB + K70 RGB + K57 RGB Wireless + Logitech G613
Software Win 10 Pro
Benchmark Scores https://valid.x86.fr/s2y7ny
I turned it off after a user on another forum suggested it might help with gaming, what are your thoughts?

It's as easy as opening powershell as an admin and running either of the following commands

Disable-MMAgent -mc
Enable-MMAgent -mc

And you can check the status with the following command

Get-MMAgent

It will say False next to memory compression if it's disabled or True if it's enabled.

Check yours on your task manager performance tab.

compressiond.jpg
 
Last edited:
Depends.

Having it on helps if you have low ram capacity on your computer.
Having it on will take cpu cycles to decompress and compress said ram, thats a good tradeoff if you have low ram capacity.

If you have enough ram (16GB upwards) the option does literally nothing but take cpu cycles.

I personally turn it off because its pointless for my system and theoretically (the impact is very very low) worsens the CPU performance.
 
Some logic in that poll. 1=0, 0=1
 
Just leave it alone. It's probably having zero effect on your games.
You should see for yourself in some games.
Windows tries to utilize your unused RAM, before using your SSD.
It's not something just for systems with low RAM.
 
Some logic in that poll. 1=0, 0=1
Don't you logic my poll, lol, I just wanna know if you use it or disable it, also can't edit it
 
Last edited:
Just leave it alone. It's probably having zero effect on your games.
You should see for yourself in some games.
Windows tries to utilize your unused RAM, before using your SSD.
It's not something just for systems with low RAM.
It's faster (barely) than pagefile but takes cpu cycles, its a tradeoff.

On prevents some ssd wear, something to bare in mind aswell.
 
I will test here
 
I didnt know this is a thing. Only prob use would be for high end cpu with low ram capacity.
 
Hi,
Default.
 
Leave it on, it will only really be utilized when it's actually needed!
edit: to see how much cpu memory compression used one can open powershell as admin and run, Get-Process -Name "Memory Compression"
on my system it basically uses the cpu not at all
 
Last edited:
In addition to what has been said already it also depends on your workload and what kind of data fills your RAM.

Video and audio data sets, even raw (uncompressed) don't compress with the algorithms used for emory compression. Waste of CPU time.

Database, virtual machines, development tools, Javascript running in a web browser compress well.

3D games could go one way or another.
 
the kind of compression being used is basicly free
leave well enough alone stop fiddling with windows internals without understanding what you are doing
I don't need anymore support tickets today
 
You know what else is free? The rest of system memory. Server 2016 really did a better job handling this. Win10 why?

1706743954318.png


I don't mess with the compression controls but they're usually off anyway.
 
I just tested it while playing cyberpunk at 720p, thus cpu bottlenecked - didn't improve fps at all.
 
I disable it but I have gobs of ram. 64GBs. It's probably not long until that won't be so much and I'll come around to using it again.
 
I leave it on, I was under the impression that there's no real benefit to turning it off.
 
I leave it on, I was under the impression that there's no real benefit to turning it off.
Honestly... the benefit is very slim if there at all, you certainly will benefit more from having it on if you ever top out your ram or even come close to doing so.
 
Never bothered because my only bottleneck is a GPU (4K gaming with 6700 XT, you know the drill) since I'm only gaming. Nothing else is at least 2010s level demanding what I'm doing on my PC.
 
I opened the most memory demanding game I currently have (Star Citizen) and flied to big cities and ran around on them to fill the RAM as much as I could. And I also had the web browser open in the background (memory compression is enabled). Even then I haven't seen any movement on compressed amount on task manager, it stayed at zero. If this is not enough for it to start compressing I actually want it stay enabled in the hope of seeing its help when I actually need the memory. I'd choose to give up some performance at that point.scscsc.jpg
 
The OS isnt constantly trying to compress everything, I am suspect over the odd potential snake oil report on gaming and think the more likely culprit is probably page combining, a feature that scans for duplicate pages in memory and replaces them with pointers.

So I would suggest if you want to tinker to try this first, and leave memory compression alone.

Disable-MMAgent -PageCombining

Memory compression has a very nice benefit, it basically fixes Windows page file management, without it Windows is prone to start using the swap file before physical memory usage is even at 50%, with compression enabled it wont use anything more than a small amount until it needs to when approaching critical memory utilisation.

Sadly the internet is prone to masses of copy and paste, and is a ton of articles on disabling compression, but thats my 5 pence worth anyway.
 
Memory compression is very rare on systems that have 64 GB of RAM or more, and relatively uncommon on 32 GB. It's something that benefits primarily systems with low RAM (16 GB and below), on 16 GB memory compression will always be trying to stave off pressure as the OS is always paging and fighting for capacity, and that's where you see the performance impact of it.

Considered your specs, leave this setting on automatic. Windows will only compress significantly if you ever run into the 28+ GB range and that point, you should be looking at a higher capacity memory kit anyhow.
 
Compactor

If ever something should be compresseed, it can help.
 
There are a bunch of settings related to it. The -MaxOperationAPIFiles # adjusts the prefetch amount 8192 is max and best to make the most of the compression. The other big settings is the -PageCombining setting which makes it more efficient. Page combining causes the memory manager to periodically combine pages in physical memory that have identical content. (aka wasted space from identical data residing within memory)

The Get-MMAgent shows how it's setup. Regardless of how much memory is installed it can be helpful. It takes CPU cycles, but you're getting better memory performance by compressing and page combining for higher I/O.

I think people are really over blowing the CPU cycles angle on it. It makes your memory more efficient and I/O higher. It's similar to direct storage in essence except the decompression isn't performed on the GPU end though future GPU's maybe could be OS aware and leveraged for this kind of OS memory compression hopefully. I wouldn't worry the CPU cycles even on a dual core CPU let alone any modern one. I do agree with unwind in part though that already heavily compressed files won't really see a benefit.

It would be nice if it were more like some of the other compression tools that allow you omit certain file type from being compressed, but maybe there is some option for that somewhere I don't really know. I'd say otherwise it's great and you'll absolutely see it compressing memory a bit in task manager.

Memory Compression / Page Combining / MaxOperations

Code:
Enable-MMAgent -ApplicationLaunchPrefetching
Enable-MMAgent -ApplicationPreLaunch
Set-MMAgent -MaxOperationAPIFiles 8192
Enable-MMAgent -MemoryCompression
Enable-MMAgent -OperationAPI
Enable-MMAgent -PageCombining
Set-Service sysmain -StartupType Automatic
Start-Service sysmain

Get-MMAgent

Makes better usage of system memory regardless of how much is installed. The page combining options saves on memory by purging duplicates of identical stuff held in memory for no reason other than the OS just being generally stupid like that. The MaxOperations options adjust the prefetching higher or lower depending on setting. It's most effective on high, but a little more resource intensive technically. If I could set that like x4 or x16 I'd absolutely try it honestly, but the limit MS has imposed on it is 8192. It would be nice if they allowed it to go higher, but it's probably the most reasonable max setting they settled on. It doesn't really tax the CPU much at all in reality. It's basically a extension of NTFS compression and prefetch and already very light weight on CPU's a decade ago let alone today.

The polling rate on your mouse or keyboard is going to waste more CPU cycles honestly by a landslide between the two if I had to guess or that RGB lighting software that wastes 4-6% CPU utilization easily doing squat.
 
Last edited:
I disable it but I have gobs of ram. 64GBs. It's probably not long until that won't be so much and I'll come around to using it again.
Dude, just no. It took 20 years to get here. In 2000 my main workstation was 64MB of PC133 with an 8MB video card. In 2020 it was 64GB and an 8GB video card.

In another 20 years the best workstation will be 64TB ram and 4-8TB vram. The way everyone is hyping AI, it's extremely believable too.

Anyway look at memory consumption and you'll realize it isn't really an everybody thing, just enthusiasts. Maybe we'll daily 16K streams by then.
 
Back
Top