揭开Windbd内存使用标签的神秘面纱:很大,而内存被标记为RegionUsageFree [英] Demystify Windbd memory usage labels: "Private Working Set" is large while memory is marked as RegionUsageFree
问题描述
运行后,我看到我的应用程序在TaskMgr中占用了3.5Gb
After a run, i see that my application takes 3.5Gb in TaskMgr
我在Windbg中看到的内容有点令人困惑:
What I see in Windbg is a little bit confusing:
0:022> !address -summary
ProcessParametrs 0000000001b7ed70 in range 0000000001b7e000 0000000001b80000
Environment 0000000001c0c970 in range 0000000001c0c000 0000000001c0e000
-------------------- Usage SUMMARY --------------------------
TotSize ( KB) Pct(Tots) Pct(Busy) Usage
1037fe000 ( 4251640) : 00.05% 87.22% : RegionUsageIsVAD
7fed67a5000 (8585059988) : 99.94% 00.00% : RegionUsageFree
7dd6000 ( 128856) : 00.00% 02.64% : RegionUsageImage
1900000 ( 25600) : 00.00% 00.53% : RegionUsageStack
32000 ( 200) : 00.00% 00.00% : RegionUsageTeb
950000 ( 9536) : 00.00% 00.20% : RegionUsageHeap
1bff4000 ( 458704) : 00.01% 09.41% : RegionUsagePageHeap
1000 ( 4) : 00.00% 00.00% : RegionUsagePeb
0 ( 0) : 00.00% 00.00% : RegionUsageProcessParametrs
0 ( 0) : 00.00% 00.00% : RegionUsageEnvironmentBlock
Tot: 7ffffff0000 (8589934528 KB) Busy: 000000012984b000 (4874540 KB)
-------------------- Type SUMMARY --------------------------
TotSize ( KB) Pct(Tots) Usage
7fed67b5000 (8585060052) : 99.94% : <free>
7dd7000 ( 128860) : 00.00% : MEM_IMAGE
2e76000 ( 47576) : 00.00% : MEM_MAPPED
11ebee000 ( 4698040) : 00.05% : MEM_PRIVATE
-------------------- State SUMMARY --------------------------
TotSize ( KB) Pct(Tots) Usage
df283000 ( 3656204) : 00.04% : MEM_COMMIT
7fed67b5000 (8585060052) : 99.94% : MEM_FREE
4a5b8000 ( 1218272) : 00.01% : MEM_RESERVE
那么,99.94%的内存是RegionUsageFree吗?
So, 99.94% of memory is RegionUsageFree ?
有人可以揭开上述术语的神秘面纱吗? RegionUsageFree
表示内存已被free
占用并且可以使用? Private Working Set
是什么意思?
Can someone demystify the terms above ? RegionUsageFree
means memory was free
'd and can be used ? What is Private Working Set
means ?
如果免费,为什么显示在Private Working Set
中?我应该为此担心吗?可以(重新)使用该内存吗?我在64位上,OOM在这里不是问题,在32位上可能是?如何减少Private Working Set
?
If free, why is shown in Private Working Set
? Should I worry about this ? That memory can be (re)used ? I'm on 64 bit, OOM is not an issue here, on 32 it might be ? How can I reduce this Private Working Set
?
PS:堆看起来不错:
PS: The heap look good:
0:022> !heap -s
LFH Key : 0x0000005b29625009
Termination on corruption : ENABLED
Heap Flags Reserv Commit Virt Free List UCR Virt Lock Fast
(k) (k) (k) (k) length blocks cont. heap
-------------------------------------------------------------------------------------
00000000000e0000 00000002 1024 8 1024 3 1 1 0 0
0000000003c20000 00001002 512 8 512 3 1 1 0 0
0000000004d40000 00001002 512 8 512 3 1 1 0 0
00000000001e0000 00008000 64 8 64 5 1 1 0 0
00000000070e0000 00001002 64 8 64 3 1 1 0 0
0000000004d30000 00001002 64 8 64 3 1 1 0 0
0000000007010000 00001002 512 8 512 3 1 1 0 0
0000000004d00000 00001002 64 8 64 3 1 1 0 0
000000000c8b0000 00001002 512 8 512 3 1 1 0 0
00000000070b0000 00001002 64 8 64 3 1 1 0 0
000000000ef00000 00001002 64 32 64 27 1 1 0 0
0000000012180000 00001002 512 8 512 3 1 1 0 0
000000000f630000 00001002 512 8 512 3 1 1 0 0
0000000010490000 00001002 64 8 64 3 1 1 0 0
00000000105b0000 00001002 512 8 512 3 1 1 0 0
0000000012170000 00001002 64 8 64 3 1 1 0 0
0000000039860000 00001002 512 8 512 3 1 1 0 0
00000000397e0000 00001003 512 8 512 5 1 1 0 bad
000000003ca30000 00001003 512 8 512 5 1 1 0 bad
000000003dbc0000 00001003 512 8 512 5 1 1 0 bad
0000000010900000 00001003 512 8 512 5 1 1 0 bad
0000000012090000 00001003 512 8 512 5 1 1 0 bad
0000000039730000 00001003 512 8 512 5 1 1 0 bad
0000000010aa0000 00001003 512 8 512 5 1 1 0 bad
00000000136b0000 00001002 64 8 64 3 1 1 0 0
000000000eff0000 00001002 64 8 64 3 1 1 0 0
0000000013590000 00001002 64 8 64 3 1 1 0 0
0000000013850000 00001002 64 8 64 3 1 1 0 0
000000000fd70000 00001002 64 8 64 3 1 1 0 0
-------------------------------------------------------------------------------------
推荐答案
TaskMgr和WinDbg都显示正确的数据.在如何解释Windows任务管理器中查看有关私有工作集的更多信息? 99.94%的内存是RegionUsageFree,因为x64具有虚拟的8TB大小用户模式下的地址空间,几乎所有空间都是可用的并且可以使用.您不必减少工作量. Windows为您修剪工作集. (尽管您可以在查看"菜单中使用 VMMap 空工作集功能)有关更多信息,请参阅M. Russinovich博客突破极限Windows版本:虚拟内存.
TaskMgr and WinDbg both display right data. Look more about Private Working Set at How to interpret Windows Task Manager? 99.94% of memory is RegionUsageFree because x64 has 8TB size virtual address space in user mode and almost all of it is free and can be used. You do not must reduce working set. Windows trims working sets for you. (Although you can use VMMap Empty Working Set feature in the View menu) For more information see M. Russinovich blog Pushing the Limits of Windows: Virtual Memory.
这篇关于揭开Windbd内存使用标签的神秘面纱:很大,而内存被标记为RegionUsageFree的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!