win-memcomp
Windows 内存压缩管理
补充说明
Windows 10 / Windows 11 引入内存压缩功能,将压缩后的页面存储在内存中,减少磁盘 I/O。关闭后可释放部分 CPU 资源,但可能增加磁盘换页。
通用说明
- 以下操作需要管理员权限
- 修改后必须重启才能生效
查看当前状态
Get-MMAgent
输出示例:
ApplicationLaunchPrefetching : True # 应用预读取开启
ApplicationPreLaunch : True # 应用预启动开启
MaxOperationAPIFiles : 512 # OperationAPI 最大文件数
MemoryCompression : True # 内存压缩已启用
OperationAPI : True # 存储感知 API 开启
PageCombining : True # 页面合并优化开启
关闭内存压缩
Disable-MMAgent -mc
重启后验证:
Get-MMAgent
输出示例:
ApplicationLaunchPrefetching : True # 应用预读取开启
ApplicationPreLaunch : True # 应用预启动开启
MaxOperationAPIFiles : 512 # OperationAPI 最大文件数
MemoryCompression : False # 内存压缩已关闭
OperationAPI : True # 存储感知 API 开启
PageCombining : True # 页面合并优化开启
开启内存压缩
Enable-MMAgent -mc