[英]Memory reported in Resource Monitor not showing in UMDH
I have a service which intermittently starts gobbling up server memory over time and needs to be restarted to free it.我有一个服务随着时间的推移间歇性地开始吞噬服务器内存,需要重新启动才能释放它。 I turned +ust with gflags, restarted the service, and started taking scheduled UMDH snapshots.
我用 gflags 关闭 +ust,重新启动服务,并开始拍摄预定的 UMDH 快照。 When the problem reoccurred, resource manager reported multiple GB under Working set and Private bytes, but the UMDH snapshots account only for a few MB allocations in the process' heaps.
当问题再次发生时,资源管理器在工作集和专用字节下报告了多个 GB,但 UMDH 快照仅占进程堆中的几个 MB 分配。
At the top of UMDH snapshot files, it mentions "Only allocations for which the heap manager collected a stack are dumped".在 UMDH 快照文件的顶部,它提到“仅转储堆管理器收集堆栈的分配”。
How can an allocation in a process be without a trace when +ust flags were specified?当指定了 +ust 标志时,进程中的分配怎么可能没有踪迹?
How can I find out where/how these GBs were allocated?如何找出这些 GB 的分配位置/方式?
UMDH is short for User Mode Dump Heap. UMDH 是用户模式转储堆的缩写。 The term Heap is a key term here: it refers to the C++ heap manager only .
术语堆是一个关键项的位置:它是指只有C ++堆管理器。 This means that all memory which is allocated by other means than the C++ heap manager is not tracked by UMDH.
这意味着 UMDH 不会跟踪通过 C++ 堆管理器以外的其他方式分配的所有内存。
This can be这可以是
VirtualAlloc()
VirtualAlloc()
But even for C++, there is the case that allocations larger than 512 kB are not efficiently manageable by the C++ heap manager, so it just redirects it to VirtualAlloc()
and does not create a heap segment of such large allocations.但即使对于 C++,也存在大于 512 kB 的分配无法由 C++ 堆管理器有效管理的情况,因此它只是将其重定向到
VirtualAlloc()
而不会创建如此大分配的堆段。
How can I find out where/how these GBs were allocated?
如何找出这些 GB 的分配位置/方式?
For direct calls to VirtualAlloc()
, the WinDbg command !address -summary
may give an answer.对于直接调用
VirtualAlloc()
,WinDbg 命令!address -summary
可能会给出答案。 For .NET, the SOS extension and the !dumpheap -stat
can give an answer.对于 .NET,SOS 扩展和
!dumpheap -stat
可以给出答案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.