aspnet_wp uses a lot of ram

T

Trapulo

On my server (dual XEON 1GB ram) aspnet_wp is using a lot of ram: 500MB ram,
585MB virtual.
The server reports only 7.5MB ram free and 30MB system cache.

Is this normal? Why garbage collector dosn't release some memory?
 
K

Karl Seguin

Trapulo:
You should use perform instead of task manager for a real report. Open it
up (start --> run --> perfomon), right click --> "Add Counters", under
performance object pick ".Net CLR Memory", in the left box select "# Bytes
in Heaps" and in the right box select the aspnet_wp or w3wp process
(depending on waht OS you have only one should show up). If you then look
at the "maximum" it should tell you how many bytes you are at.

Chances are you won't see a huge difference. There are many reasons why the
GC isn't releasing the objects - namely because you still have references to
them. Also, the GC will only run when it absolutely has to, so maybe it
doesn't feel like it has to yet...Atlernatively you could have leaks (either
unmanged or manged).

It's hard for us to troubleshoot, but take a look at:
http://blogs.msdn.com/akhune/archive/2004/06/11/153734.aspx
and
http://blogs.msdn.com/yunjin/archive/2004/01/27/63642.aspx

Hope this helps
Karl

P.S. - it's very subjective...500mb isn't "a lot" depending on what your
application is doing...


--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
 
K

Kevin Spencer

Is this normal? Why garbage collector dosn't release some memory?

It is normal for an app that uses that much memory. The Garbage Collector
does release memory.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 
T

Trapulo

Karl Seguin said:
You should use perform instead of task manager for a real report. Open it
up (start --> run --> perfomon), right click --> "Add Counters", under
performance object pick ".Net CLR Memory", in the left box select "# Bytes
in Heaps" and in the right box select the aspnet_wp or w3wp process
(depending on waht OS you have only one should show up).

W2000 Server SP4
If you then look
at the "maximum" it should tell you how many bytes you are at.

Chances are you won't see a huge difference.

Yes: in fact the are the same value or so on.
There are many reasons why the
GC isn't releasing the objects - namely because you still have references to
them

Yes, but in asp.net application? When the page is executed, its context
(=all variables references) is not released?
I've not net applications not asp.net on this server...

.. Also, the GC will only run when it absolutely has to, so maybe it
doesn't feel like it has to yet...Atlernatively you could have leaks (either
unmanged or manged).

Ok, but 7 mb free memory I think is a "low memory status", isnt'it?

I can't find nothing useful fo me :(
Is there any way to check what asp.net application is using the memory?
Hope this helps
Karl

P.S. - it's very subjective...500mb isn't "a lot" depending on what your
application is doing...

I know. But 500 MB with 1GB ram, on a server that is running also exchange
as SQL, I think is not normal...
And my asp.net sites are very low traffic and very "light", so I don't
aspect this :(
The only "heavy" application (used from two low-traffic sites) is DNN 2.

thanks for your quick response
 
K

Karl Seguin

I was just throwing some possibilities...

Many things survive a page ending...some as static variables, sessions,
application, cache...

I would agree that @ 7mb it's very low and that would suggest to me that you
have a leak...the links I provided should help identify them...


--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
 
T

Trapulo

During this night aspnet.wp releases memory, and now it uses about 150MB and
I have about 200MB ram free. I hope it was onlye a peak...

thanks
 
T

Trapulo

I think I solved.

There was a little application that didn't close a sqlconnection. So the
server has opened a lot of connection from the pool (and in fact it was
full), and I think that this connections are responsabile for my memory
consumption.
However it is strange that .NET retains in memory connection unused for a
long time, and GC waits a lot before release them (variables referencing to
them was obviously out of scope) when the serves has very little free
memory.

Thanks anyway
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top