Home / Memory Optimization

🧠 Memory Optimization

Page file, LargeSystemCache, compression and Meltdown/Spectre patches

🗁️ Disable RAM Compression

Disable Memory Compression powershell
Disable-MMAgent -MemoryCompression

🔓 Disable Meltdown/Spectre

Improves performance by disabling security mitigations (gaming only):

Kernel-Managed Memory powershell
$path = "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management"
New-ItemProperty -Path $path -Name "FeatureSettings" -PropertyType DWord -Value 1 -Force
New-ItemProperty -Path $path -Name "FeatureSettingsOverride" -PropertyType DWord -Value 3 -Force
New-ItemProperty -Path $path -Name "FeatureSettingsOverrideMask" -PropertyType DWord -Value 3 -Force

💾 DisablePagingExecutive

Prevents drivers from paging to virtual memory:

Keep drivers in RAM powershell
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" -Name "DisablePagingExecutive" -PropertyType DWord -Value 1 -Force

📊 LargeSystemCache

0: ~8 MB cache (recommended gaming)
1: Up to RAM-4MB (LAN throughput)
Configure for gaming powershell
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" -Name "LargeSystemCache" -PropertyType DWord -Value 0 -Force
⚠️

⚠️ Note

Value 1 improves LAN transfers but may have issues with ATI/AMD drivers. For gaming, use 0.

📄 Configure Page File

Large page file (32GB) improves microstuttering:

Configure 32GB page file powershell
wmic computersystem where name="%computername%" set AutomaticManagedPagefile=False
wmic pagefileset where name="C:\\pagefile.sys" set InitialSize=32768,MaximumSize=32768
⚠️

⚠️ Warning

System may become unstable if you don't have enough RAM. Restart after applying.

🔐 NTFS/ReFS Protection

Disable additional mitigations powershell
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager" -Name "ProtectionMode" -PropertyType DWord -Value 0 -Force

⏱️ Realtime Priority for csrss.exe

Configure maximum priority powershell
$path = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\csrss.exe\PerfOptions"
New-Item -Path $path -Force | Out-Null
New-ItemProperty -Path $path -Name "CpuPriorityClass" -PropertyType DWord -Value 4 -Force
New-ItemProperty -Path $path -Name "IoPriority" -PropertyType DWord -Value 3 -Force
💡

💡 Summary

These optimizations improve gaming performance but reduce security and stability. Only apply on PCs dedicated exclusively to gaming.