wcf - Confusing DebugDiag report to identify High Memory usage -
recently got new batch of dumps identify highmemory usage in 3 of our wcf services. hosted on 64bit apppool , windows server 2012.
- application 1 :
processup time : 22 days
gc heap usage : 2.69 gb
loaded modules : 220 mb
commited memory : 3.08 gb
native memory : 2 gb
issue identified large gc heap usage due un closed wcf client proxy objects. accounting 2.26 gb , rest cache in gc heap.
- application 2 :
processup time : 9 hours
gc heap usage : 4.43 gb
cache size : 2.45 gb
loaded modules : 224 mb
commited memory : 5.13 gb
native memory heap : 2 gb
issue identified of objects of system.web.caheentry, due large cache size. 2.2 gb of string object on gc heap has roots cacheref root objects.
- application 3 :
cache size : 950 mb
gc heap : 1.2 gb
native heap : 2 gb
we upgrade windows server 2012, had old dumps well. dumps not show native heap same application. around 90 mb.
i use windbg explore native heap !heap -s command. shows minimal native heap sizes shown below.
i confused why debugdiag 2.0 showing 2gb of native heap in every wcf service. understand !heap -s should dump same native heaps , should match debug diag reports graphs. report shows values in thoushand of tbytes.
0:000> !heap -s lfh key : 0x53144a890e31e98b termination on corruption : enabled heap flags reserv commit virt free list ucr virt lock fast (k) (k) (k) (k) length blocks cont. heap ------------------------------------------------------------------------------------- 000000fc42c10000 00000002 32656 31260 32552 2885 497 6 2 f lfh 000000fc42a40000 00008000 64 4 64 2 1 1 0 0 000000fc42bf0000 00001002 3228 1612 3124 43 9 3 0 0 lfh 000000fc43400000 00001002 1184 76 1080 1 5 2 0 0 lfh 000000fc43390000 00001002 1184 148 1080 41 7 2 0 0 lfh 000000fc43d80000 00001002 60 8 60 5 1 1 0 0 000000fc433f0000 00001002 60 8 60 5 1 1 0 0 000000fc442a0000 00001002 1184 196 1080 1 6 2 0 0 lfh 000000fc44470000 00041002 60 8 60 5 1 1 0 0 000001008e9f0000 00041002 164 40 60 3 1 1 0 0 lfh 000001008f450000 00001002 3124 1076 3124 1073 3 3 0 0 external fragmentation 99 % (3 free blocks) -------------------------------------------------------------------------------------
can explain me why windbg command !heap -s , debugdiag report varing. or have incorrect knowledge of above command.
i use pykd script dump native object stats. not show large number of objects.
also mean external fragmentation 99 % (3 free blocks) in above output. understand fragmented memory has less large block of continuous memory place. fail relate percentage.
edit 1 : application 2 :
0:000> !address -summary mapping file section regions... mapping module regions... mapping peb regions... mapping teb , stack regions... mapping heap regions... mapping page heap regions... mapping other regions... mapping stack trace database regions... mapping activation context regions... --- usage summary ---------------- rgncount ----------- total size -------- %ofbusy %oftotal free 363 7ffb`04a14000 ( 127.981 tb) 99.98% <unknown> 952 4`e8c0c000 ( 19.637 gb) 98.54% 0.01% image 2122 0`0e08d000 ( 224.551 mb) 1.10% 0.00% heap 88 0`03372000 ( 51.445 mb) 0.25% 0.00% stack 124 0`013c0000 ( 19.750 mb) 0.10% 0.00% other 7 0`001be000 ( 1.742 mb) 0.01% 0.00% teb 41 0`00052000 ( 328.000 kb) 0.00% 0.00% peb 1 0`00001000 ( 4.000 kb) 0.00% 0.00% --- type summary (for busy) ------ rgncount ----------- total size -------- %ofbusy %oftotal mem_private 643 4`ebf44000 ( 19.687 gb) 98.79% 0.02% mem_image 2655 0`0eb96000 ( 235.586 mb) 1.15% 0.00% mem_mapped 37 0`00b02000 ( 11.008 mb) 0.05% 0.00% --- state summary ---------------- rgncount ----------- total size -------- %ofbusy %oftotal mem_free 363 7ffb`04a14000 ( 127.981 tb) 99.98% mem_reserve 725 3`b300d000 ( 14.797 gb) 74.25% 0.01% mem_commit 2610 1`485cf000 ( 5.131 gb) 25.75% 0.00% --- protect summary (for commit) - rgncount ----------- total size -------- %ofbusy %oftotal page_readwrite 868 1`3939d000 ( 4.894 gb) 24.56% 0.00% page_execute_read 157 0`09f10000 ( 159.063 mb) 0.78% 0.00% page_readonly 890 0`035ed000 ( 53.926 mb) 0.26% 0.00% page_writecopy 433 0`0149c000 ( 20.609 mb) 0.10% 0.00% page_execute_readwrite 148 0`0065d000 ( 6.363 mb) 0.03% 0.00% page_execute_writecopy 67 0`0017c000 ( 1.484 mb) 0.01% 0.00% page_readwrite|page_guard 41 0`000b9000 ( 740.000 kb) 0.00% 0.00% page_noaccess 4 0`00004000 ( 16.000 kb) 0.00% 0.00% page_execute 2 0`00003000 ( 12.000 kb) 0.00% 0.00% --- largest region usage ----------- base address -------- region size ---------- free 101`070a0000 7ef6`e77b2000 ( 126.964 tb) <unknown> fd`72f14000 0`d156c000 ( 3.271 gb) image 7ff9`91344000 0`012e8000 ( 18.906 mb) heap 100`928a0000 0`00544000 ( 5.266 mb) stack fc`43240000 0`0007b000 ( 492.000 kb) other fc`42ea0000 0`00181000 ( 1.504 mb) teb 7ff7`ee852000 0`00002000 ( 8.000 kb) peb 7ff7`eeaaf000 0`00001000 ( 4.000 kb)
application 3 :
0:000> !address -summary --- usage summary ---------------- rgncount ----------- total size -------- %ofbusy %oftotal free 323 7ffb`9f8ea000 ( 127.983 tb) 99.99% <unknown> 832 4`4bbb6000 ( 17.183 gb) 98.15% 0.01% image 2057 0`0e5ab000 ( 229.668 mb) 1.28% 0.00% heap 196 0`04f52000 ( 79.320 mb) 0.44% 0.00% stack 127 0`01440000 ( 20.250 mb) 0.11% 0.00% other 7 0`001be000 ( 1.742 mb) 0.01% 0.00% teb 42 0`00054000 ( 336.000 kb) 0.00% 0.00% peb 1 0`00001000 ( 4.000 kb) 0.00% 0.00% --- type summary (for busy) ------ rgncount ----------- total size -------- %ofbusy %oftotal mem_private 783 4`51099000 ( 17.266 gb) 98.63% 0.01% mem_image 2444 0`0ec06000 ( 236.023 mb) 1.32% 0.00% mem_mapped 35 0`00a67000 ( 10.402 mb) 0.06% 0.00% --- state summary ---------------- rgncount ----------- total size -------- %ofbusy %oftotal mem_free 323 7ffb`9f8ea000 ( 127.983 tb) 99.99% mem_reserve 621 3`e3504000 ( 15.552 gb) 88.83% 0.01% mem_commit 2641 0`7d202000 ( 1.955 gb) 11.17% 0.00% --- protect summary (for commit) - rgncount ----------- total size -------- %ofbusy %oftotal page_readwrite 919 0`6dc07000 ( 1.715 gb) 9.80% 0.00% page_execute_read 153 0`0a545000 ( 165.270 mb) 0.92% 0.00% page_readonly 734 0`02cf5000 ( 44.957 mb) 0.25% 0.00% page_writecopy 470 0`01767000 ( 23.402 mb) 0.13% 0.00% page_execute_readwrite 240 0`009cf000 ( 9.809 mb) 0.05% 0.00% page_execute_writecopy 76 0`001c5000 ( 1.770 mb) 0.01% 0.00% page_readwrite|page_guard 42 0`000be000 ( 760.000 kb) 0.00% 0.00% page_noaccess 5 0`00005000 ( 20.000 kb) 0.00% 0.00% page_execute 2 0`00003000 ( 12.000 kb) 0.00% 0.00% --- largest region usage ----------- base address -------- region size ---------- free 52`892e0000 7fa5`65548000 ( 127.646 tb) <unknown> 4f`4ec81000 0`e9c3f000 ( 3.653 gb) image 7ff9`91344000 0`012e8000 ( 18.906 mb) heap 52`8833b000 0`00fa4000 ( 15.641 mb) stack 4e`37a70000 0`0007b000 ( 492.000 kb) other 4e`37720000 0`00181000 ( 1.504 mb) teb 7ff7`ee828000 0`00002000 ( 8.000 kb) peb 7ff7`eea43000 0`00001000 ( 4.000 kb)
Comments
Post a Comment