473,382 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

ASP.NET WP memory consumption problem & debugging on AppDomain bas

Hi,

I have following type of scenario (also explained here
http://blogs.aspadvice.com/joteke/ar...1/10/2196.aspx )

We have problematic web server (wink2 Standard, 1.5GB of physical memory,
SQL 2000 in same box, framework 1.0 and 1.1 installed, apps use mainly 1.0)
whose aspnet_wp.exe's memory consumption increases slowly but surely, leading
to process restart eventually and then again recollecting memory etc etc

Size of aspnet_wp raises to somewhere 700-750MB, SQL stays somewhere 500MB,
CPU util rarely over 15%

Server has 32 web sites and I'd want to know which one of them is taking
most of resources (remember, every web site is one AppDomain inside process
memory)

There's no significant difference when checking basic ASP.NET Perf counters
of these sites, which would tell right away which site consumes the
resources. All sites have quite steady traffic, and one of them is such that
very big files (even over 200MB) can be up/downloaded but they don't still
indicate anything we could use as argument for sure.

However counters for aspnet_wp looked like following at one point:

Object: .NET CLR Loading
================

aspnet_wp
Assembly Search Length 0.000
Bytes in Loader Heap 46673920.000
Current appdomains 33.000
Current Assemblies 7120.000
Current Classes Loaded 25832.000
Rate of appdomains 0.000
Rate of Assemblies 0.000
Rate of Classes Loaded 0.000

Object: .NET CLR Memory

aspnet_wp
========
# Bytes in all Heaps 238191776.000
# GC Handles 115407.000
# Gen 0 Collections 20428.000
# Gen 1 Collections 7607.000
# Gen 2 Collections 897.000
# of Pinned Objects 0.000
# Total committed Bytes 275623600.000
# Total reserved Bytes 469761712.000
Finalization Survivors 4.000
Gen 0 heap size 28400000.000
Gen 1 heap size 1674480.000
Gen 2 heap size 95579928.000
Large Object Heap size 112537368.000
Promoted Finalization-Memory from Gen 0 56.000
Promoted Finalization-Memory from Gen 1 0.000
Promoted Memory from Gen 0 1404796.000
Promoted Memory from Gen 1 0.000

Object: Process
=========
aspnet_wp
Private Bytes 633970688.000
Virtual Bytes 1851805696
Working Set 648499200.000

What bothers me is the size of large object heap and Gen 2 Heap as well as
why the process size is so major when bytes in all heaps is somewhere 213MB?
Also could the count of assemblies and classes just be the reason?

When I run vadump on server as is demonstrated
(http://www.theserverside.net/blogs/s...ngMemoryLeaks), it
complains about too big size of the working set (truncating buffers which go
above 65535), so it shows me only 0's as result. I have to admit that I suck
with this sort of performance solving/digging type of stuff, so any pointers
would be greatly appreciated.

Is there something clear I haven't seen (my memory leaks)? Problems in code
are just as possible as anything else, but trying to dig 30 apps isn't very
tempting task.

Here's what I get with vadump
====================

C:\Documents and Settings\Teemu>vadump -sop 4912
Too many working set buffer entries (158507) - truncating to 65535
Catagory Total Private Shareable
Pages KBytes KBytes KBytes
Page Table Pages 0 0 0 0
Other System 0 0 0 0
Code/StaticData 0 0 0 0
Heap 0 0 0 0
Stack 0 0 0 0
Teb 0 0 0 0
Mapped Data 0 0 0 0
Other Data 65535 262140 262140 0

Total Modules 0 0 0 0
Total Dynamic Data 65535 262140 262140 0
Total System 0 0 0 0
Grand Total Working Set 65535 262140 262140 0

Module Working Set Contributions in pages
Total Private Shareable Module

Heap Working Set Contributions
0 pages from Process Heap (class 0x00000000)
0x00130000 - 0x00230000 0 pages
0x17630000 - 0x17730000 0 pages
0x1A190000 - 0x1A390000 0 pages
0x24300000 - 0x24700000 0 pages
0x39930000 - 0x3A130000 0 pages
0x45F80000 - 0x46F80000 0 pages
0x6E2A0000 - 0x702A0000 0 pages
0 pages from UNKNOWN Heap 0 (class 0x00008000)
0x00230000 - 0x00240000 0 pages
....

....

I just put perf counters on for those sites we still suspect that might have
something to do with the problem (two most frequently used ones) plus then
all these aspnet_wp level counters, and I run them for a day or two to get
more accurate data on server's behaviour.

Any pointers or hints how I could take the memory footprint on appdomain
basis plus anything else you might have, would be greatly appreciated.

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
Nov 19 '05 #1
1 2238
Based on better investigation, I think I've solved this one. With the facts
I now have, seems to relate to this issue:

FIX: Downloading Large Files Causes a Large Memory Loss and Causes the
Aspnet_wp.exe Process to Recycle
http://support.microsoft.com/kb/821387

Thanks,

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
"Teemu Keiski" <jo****@aspalliance.com> wrote in message
news:0D**********************************@microsof t.com...
Hi,

I have following type of scenario (also explained here
http://blogs.aspadvice.com/joteke/ar...1/10/2196.aspx )

We have problematic web server (wink2 Standard, 1.5GB of physical memory,
SQL 2000 in same box, framework 1.0 and 1.1 installed, apps use mainly 1.0) whose aspnet_wp.exe's memory consumption increases slowly but surely, leading to process restart eventually and then again recollecting memory etc etc

Size of aspnet_wp raises to somewhere 700-750MB, SQL stays somewhere 500MB, CPU util rarely over 15%

Server has 32 web sites and I'd want to know which one of them is taking
most of resources (remember, every web site is one AppDomain inside process memory)

There's no significant difference when checking basic ASP.NET Perf counters of these sites, which would tell right away which site consumes the
resources. All sites have quite steady traffic, and one of them is such that very big files (even over 200MB) can be up/downloaded but they don't still
indicate anything we could use as argument for sure.

However counters for aspnet_wp looked like following at one point:

Object: .NET CLR Loading
================

aspnet_wp
Assembly Search Length 0.000
Bytes in Loader Heap 46673920.000
Current appdomains 33.000
Current Assemblies 7120.000
Current Classes Loaded 25832.000
Rate of appdomains 0.000
Rate of Assemblies 0.000
Rate of Classes Loaded 0.000

Object: .NET CLR Memory

aspnet_wp
========
# Bytes in all Heaps 238191776.000
# GC Handles 115407.000
# Gen 0 Collections 20428.000
# Gen 1 Collections 7607.000
# Gen 2 Collections 897.000
# of Pinned Objects 0.000
# Total committed Bytes 275623600.000
# Total reserved Bytes 469761712.000
Finalization Survivors 4.000
Gen 0 heap size 28400000.000
Gen 1 heap size 1674480.000
Gen 2 heap size 95579928.000
Large Object Heap size 112537368.000
Promoted Finalization-Memory from Gen 0 56.000
Promoted Finalization-Memory from Gen 1 0.000
Promoted Memory from Gen 0 1404796.000
Promoted Memory from Gen 1 0.000

Object: Process
=========
aspnet_wp
Private Bytes 633970688.000
Virtual Bytes 1851805696
Working Set 648499200.000

What bothers me is the size of large object heap and Gen 2 Heap as well as
why the process size is so major when bytes in all heaps is somewhere 213MB? Also could the count of assemblies and classes just be the reason?

When I run vadump on server as is demonstrated
(http://www.theserverside.net/blogs/s...ngMemoryLeaks), it complains about too big size of the working set (truncating buffers which go above 65535), so it shows me only 0's as result. I have to admit that I suck with this sort of performance solving/digging type of stuff, so any pointers would be greatly appreciated.

Is there something clear I haven't seen (my memory leaks)? Problems in code are just as possible as anything else, but trying to dig 30 apps isn't very tempting task.

Here's what I get with vadump
====================

C:\Documents and Settings\Teemu>vadump -sop 4912
Too many working set buffer entries (158507) - truncating to 65535
Catagory Total Private Shareable
Pages KBytes KBytes KBytes
Page Table Pages 0 0 0 0
Other System 0 0 0 0
Code/StaticData 0 0 0 0
Heap 0 0 0 0
Stack 0 0 0 0
Teb 0 0 0 0
Mapped Data 0 0 0 0
Other Data 65535 262140 262140 0

Total Modules 0 0 0 0
Total Dynamic Data 65535 262140 262140 0
Total System 0 0 0 0
Grand Total Working Set 65535 262140 262140 0

Module Working Set Contributions in pages
Total Private Shareable Module

Heap Working Set Contributions
0 pages from Process Heap (class 0x00000000)
0x00130000 - 0x00230000 0 pages
0x17630000 - 0x17730000 0 pages
0x1A190000 - 0x1A390000 0 pages
0x24300000 - 0x24700000 0 pages
0x39930000 - 0x3A130000 0 pages
0x45F80000 - 0x46F80000 0 pages
0x6E2A0000 - 0x702A0000 0 pages
0 pages from UNKNOWN Heap 0 (class 0x00008000)
0x00230000 - 0x00240000 0 pages
...

...

I just put perf counters on for those sites we still suspect that might have something to do with the problem (two most frequently used ones) plus then
all these aspnet_wp level counters, and I run them for a day or two to get
more accurate data on server's behaviour.

Any pointers or hints how I could take the memory footprint on appdomain
basis plus anything else you might have, would be greatly appreciated.

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: tstephan | last post by:
I am debugging a small app that normally runs in a few MB. When debugging the code below, my app bloats to 1GB (and more if I let it). Assembly ara = AppDomain.CurrentDomain.GetAss­emblies();...
16
by: Justin Lazanowski | last post by:
Cross posting this question on the recommendation of an I have a .NET application that I am developing in C# I am loading information in from a dataset, and then pushing the dataset to a grid,...
7
by: Claire | last post by:
Im sat here watching task manager and the memory consumption of my application rising second by second. What tools are there out there for me to use to find where it's all going please? (I wish...
1
by: Perry | last post by:
Hi, I have a problem with the memory consumption of the AppDomain.Load and unload. For example, when i run this code, the memory usage is increasing. MessageBox.Show(string.Format("Before:...
6
by: Andy | last post by:
Along with many others I've noticed the large amount of memory that can be taken up by the aspnet_wp.exe. I've found that I can better control and limit this memory consumption by including a...
16
by: JCauble | last post by:
We have a large Asp.net application that is currently crashing our production servers. What we are seeing is the aspnet_wp eat up a bunch of memory and then stop unexpectedly. Does not recycle. ...
2
by: Ran Davidovitz | last post by:
Hi. We have a computer that has only one virtual directory (webservice) - when working with the webservice the memory consumption of the aspnet_wp is going to an avg of 320 mg. 140 mg of that...
1
by: buu | last post by:
It's strange to me, but, create a dictionary and fill it with 1 mil. of some objects. then, see the memory consumption (arised, of course). then, clean the dictionary.... memory consumption is...
1
by: =?Utf-8?B?QU1lcmNlcg==?= | last post by:
I may have painted myself into a corner with GenerateInMemory=true. My app need a custom user step. Users want to code (sort of - they are not programmers) some refinements to a search...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.