windows server 内存占用在 90% 分析

 

请参考文章:http://rajdude.com/blog/what-is-driver-locked-memory/

注意: 最好用bing翻译,百度翻译太烂。

其实最后一段 说清楚了。

What is Driver Locked memory?

Posted on November 11, 2014

I noticed that one of my VMs (on Hyper-V 2012) was using a lot of RAM. Strangely, there was no application which was using that much RAM. It was using 14.2/16 GB RAM. At that time task manager showed this:

image

And this in the details tab:

image

Notice that Oracle was using only 1.8GB and that was the highest user. Even if I total everything, it still was nowhere near 14 GB used. What was using all that RAM?

 

To find out more details I used RAMmap tool from sysinternals. It shows me an interesting thing… there is something called “Drive Locked” portion of memory. RamMap showed this:

image

I was like, wait a minute!! What is grabbing 11 GB of my precious memory? I Binged ? and found out this is a result of using Dynamic Memory in Hyper-V. RAM allocated to the guest VM gets ballooned out (increased) in times the OS needs it and then it is set to “drive locked” when the VM does not need it anymore (balloon is ready to be deflated). This not a problem, actually. It is normal behavior.

I was worried that the next time an application needs RAM, it may resort to disk paging and run slow. I read that this is not really the case, but I was not convinced. To prove that the RAM locked is still available to the VM (guest OS) I did this:

I ran MemAlloc utility to allocate 4 GB. (Actually MemAlloc assigns only 2 GB, I think that is the max it can do….probably a 32bit app limitation? You can start another MemAlloc instance to allocate more. So the “Driver locked” value went down by around 4 GB.

image

So I started another MemAlloc instance to allocate 2 more GB. Now driver lock has gone down 2 GB more.

image

Closing MemAlloc did not increase the driver locked immediately. But task manager does show a decrease in the amount of RAM used immediately.

After a few minutes, I see that the driver locked increased to 10GB. Task manager was back up to 14.2/16.

image


Conclusion:


The “driver locked” memory is a RAM amount which was used by the VM at some point in the past. It is not in use anymore. It is ready to be given back to the hyper-vizor, or, if the hyper-vizor needs to assign it to some other machine, it can take it back. The RAM balloon is ready to be deflated by this amount.

This RAM is still actually available to the VM, just in case it needs it (as shown above by using MemAlloc to grab 4 GB). The OS will not resort to disk paging if RAM is suddenly grabbed. It will simply use the “Driver Locked” RAM without any problems.

References:

http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-6-RAMMap

转载于:https://my.oschina.net/u/2293326/blog/684663

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值