windows2008内存使用过高问题

发布时间:2020-07-19 08:26:22 作者:老逗先生
来源:网络 阅读:3471

最近一段时间发现业务的一台机器windos2008的可使用内存持续降低,今天已经降低到2G。
计算了跑着的进程的内存和,发现与实际不符(不知道那剩余的4G跑哪去了)
后来使用了RAMMap v1.51进行分析内存,下载地址,请点击此处

分析发现

windows2008内存使用过高问题

Mapped file占用大量内存4G,根据微软官网给出的解释:
You experience performance issues in applications and services in various versions of Windows XP, Windows Vista, Windows Server 2003, Windows Server 2008, and Windows Server 2008 R2. Additionally, you notice the following symptoms:
1)Available memory is almost exhausted.
2)The system file cache consumes most of the physical RAM.
3)There is a continuous and high volume of cached read requests to the hard disk.

If there is a continuous and high volume of cached read requests from any process or from any driver, the working set size of the system file cache will grow to meet this demand. The system file cache consumes the physical RAM. Therefore, sufficient amounts of physical RAM are not available for other processes
也就是说文件系统的缓存没有做限制导致,持续增加文件系统的缓存持续占有物理内存。

解决方案:
官方提供的解决方案是做内存的限制(不允许占有的内存持续增加)

安装Windows Dynamic Cache Service,下载地址点击此处
注册服务
Dynamic Cache Registry settings,这里我设置了10G(物理内存12G)

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DynCache\Parameters]
"MaxSystemCacheMBytes"=dword:00002800
"MinSystemCacheMBytes"=dword:00000064
"SampleIntervalSecs"=dword:0000003c
"CacheUpdateThresholdMBytes"=dword:00000064
只需设置MaxSystemCacheMBytes,这里设置为10G

在服务中启动Dynamic Cache服务。注意:需要重启应用。

关键词说明:
Process Private: 分配给单一Process专用的内存
Mapped File: 用来储放档案内容快取(Cache)的内存空间
Shared Memory: 标注给多个Process共用的内存分页(Page,内存管理单位)
Page Table: 用来描述虚拟内存位址的分页表(裡面是一笔一笔的PTE,Page Table Entries)
Paged Pool: 允许移至硬盘的核心集区内存(Kernal Pool Memory)
Nonpaged Pool: 不允许移至硬盘的核心集区内存
System PTEs: 与I/O空间、核心堆叠、内存描述清单等系统分页相关的PTE
Session Private: 登入工作阶段相关的内存
Metafile: 是系统快取的一部份,包含NTFS Metadata(包含MFT及其他NTFS Metadata档案)。在MFT中,每个档案属性记录佔用1K,而一个档案至少有一个属性记录,再加上其他NTFS Metadata档,当档案数众多,这块会很快速成长。
AWE: 启用Address Windowing Extension技术所使用的相关内存空间(较常应用在SQL或其他DB)
Driver Locked: 驱动程式锁定的实体内存。多用于I/O的暂时性小量应用,如果有装RAMDisk,也会算在这一区。
Kernel Stack: 核心执行绪推叠,执行绪愈多,用量愈大。

每项分类都有以下栏位:

Active: 正在使用中的实体内存分页(Process Working Set或System Working Set)
Standby: 留在实体内存但暂不使用的分页,保留供后续能快速重覆利用
Modified: 与Standy类似,但内容被修改过,重覆使用前要先回写到硬盘机
Modified no write: 与Modified类似,但标注为不需回写到硬盘
Transition: 在分类之间转换的分页
Zeroed: 内容已清空可供使用的分页,系统刚开机时明显增加,随著使用一段时间逐步转为Standby
Free: 可以使用但残留先前资料的分页,使用前需先转为Zeroed
Bad: 标注损坏的内存
推荐阅读:
  1. centos系统内存 buff/cache 占用过高
  2. 如何解决MySQL占用内存较大与CPU过高测试的问题

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

matefile windows2008

上一篇:Dev Treelist使用经验(2)

下一篇:ubuntu批量添加IP

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》