Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Why Dumping a .NET Process Increases Memory Usage

39 views
Skip to first unread message

Tal

unread,
Feb 7, 2010, 2:15:01 AM2/7/10
to
We have a .NET service using ~30MB of memory at startup. (VM ~= Mem usage)
I wanted to dump the process and find out what is holding those 30MB.

The CDB/Windbg debugger generating the mini-dump increased mem usage by 100MB.
From the dump I could see those 100MB were image memory (DLLs)


-------------------- Usage SUMMARY --------------------------
TotSize ( KB) Pct(Tots) Pct(Busy) Usage
2d07000 ( 46108) : 02.20% 28.45% : RegionUsageIsVAD
761ac000 ( 1935024) : 92.27% 00.00% : RegionUsageFree
64b0000 ( 103104) : 04.92% 63.62% : RegionUsageImage
900000 ( 9216) : 00.44% 05.69% : RegionUsageStack
9000 ( 36) : 00.00% 00.02% : RegionUsageTeb
380000 ( 3584) : 00.17% 02.21% : RegionUsageHeap
0 ( 0) : 00.00% 00.00% : RegionUsagePageHeap
1000 ( 4) : 00.00% 00.00% : RegionUsagePeb
1000 ( 4) : 00.00% 00.00% : RegionUsageProcessParametrs
2000 ( 8) : 00.00% 00.00% : RegionUsageEnvironmentBlock
Tot: 7fff0000 (2097088 KB) Busy: 09e44000 (162064 KB)
The mem usage is left high, long after the debugger detached. I want to know
what is casing this image load / memory raise?

Thanks.

--
Tal.

Ivan Brugiolo [MSFT]

unread,
Feb 7, 2010, 4:09:46 PM2/7/10
to
Typically, unused pages are not part of the working set, just of the address
space.
When you are creating a full dump, all the pages in the address space
are read-in, ad written to disk.
As long as the size of the dump is basically equivalent to the size of the
address space
of the process, what you describe is expected.

--

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


"Tal" <T...@newsgroups.nospam> wrote in message
news:28BA3AF0-CF72-4E40...@microsoft.com...

Tal

unread,
Feb 8, 2010, 4:06:01 AM2/8/10
to
OK, but why are those unused pages kept forever in the working set?
(I've checked hours after taking the dump, and the working set was still
high 100MB)

--
Tal.


"Ivan Brugiolo [MSFT]" wrote:

> .
>

Pavel Lebedinsky [MSFT]

unread,
Feb 10, 2010, 12:30:23 AM2/10/10
to
> OK, but why are those unused pages kept forever in the working set?
> (I've checked hours after taking the dump, and the working set was still
> high 100MB)


Probably because the system still has plenty of free memory. If you run
a memory intensive app these pages should get trimmed.

--
Pavel Lebedinsky/Windows Fundamentals Test

Tal

unread,
Feb 10, 2010, 2:49:02 AM2/10/10
to
Thanks Ivan & Pavel.
Now it all fits.

--
Tal.


"Pavel Lebedinsky [MSFT]" wrote:

> .
>

0 new messages