windows2008內存使用過高問題

最近一段時間發現業務的一臺機器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服務。注意:需要重啓應用。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章