RE: ASP.NET High memory usage



Hi SevDer,

Welcome to ASPNET newsgroup.
As for the memory consumpting issue you mentioned, I think the Session
State and larget XML processing operations are likely the cause of your
app's memory problem. For sessionState, we do not recommend that we store
large objects into it since the session stored data won't expire
automtatically until user's session timeout. Instead try using the
asp.net's buildin cache as much as possible since we can explicitly specify
expireation timespan for cached item. Also, using a remote stateserver for
session store is a considerable approach, however, always try limited
session stored data as less as possible. For monitoring and tracing asp.net
applicaiton's memory usage, you can use the application sever's performance
counters which can view application's memory usage as well as Cache entres
and session counts...
here are some articles in msdn and kb discussing on asp.net memory profile
or performance tips:

#HOW TO: Analyze ASP.NET Web Application Performance by Using the
Performance Administration Tool
http://support.microsoft.com/default.aspx?scid=kb;en-us;815159

#Monitoring ASP.NET Application Performance
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconmonitoringaspnetap
plicationperformance.asp?frame=true

# Improving ASP.NET Performance
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/
scalenetchapt06.asp

Hope also helps. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)







--------------------
| Reply-To: "SevDer" <sevket01@xxxxxxxxxx>
| From: "SevDer" <sevder@xxxxxxxxxxxxxxxx>
| Subject: ASP.NET High memory usage
| Date: Wed, 7 Sep 2005 11:41:25 -0400
| Lines: 55
| Organization: http://www.sevder.com
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.3790.1830
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830
| X-RFC2646: Format=Flowed; Original
| Message-ID: <#QWgdK8sFHA.3720@xxxxxxxxxxxxxxxxxxxx>
| Newsgroups: microsoft.public.dotnet.framework.performance
| NNTP-Posting-Host: mail.dtfares.com 68.167.20.2
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP14.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.performance:3621
| X-Tomcat-NG: microsoft.public.dotnet.framework.performance
|
| Hi,
|
| We have a web application based on DotNetNuke 2.x.
| 1. We host several portals (sites)
| 2. Some relatively big clients have their own application pool and they
have
| a lot of hits (in average between 7K - 21K per day). (1600 per hour)
| 3. We also grouped low level sites into 2 application pool. (some hundred
| hits per day)
| 4. Due to the nature of the requirements we use several threads that
process
| tiny to huge XML parsing and updating a main object that has list of sub
| objects in an arraylist.
| 5. The main object is kept in session, and we also have some more tiny
| objects values kept in session, but our session usage besides the main
| object is very limited.
|
| Now our problem is our worker processes are consuming a lot of
| memory.(Especially for those high traffic sites)
| Current consumption is like:
| 1. 330Mb
| 2. 255Mb
| 3. 234Mb
| 4. 214Mb
| .....
| In average there is not worker process that uses less than 100Mb RAM.
| (We recycle app. pools every early morning and it makes like 1Gb
difference
| just after recycling)
|
| And the processor usage rarely comes upto 20% on that single CPU machine.
So
| processing is fast but memory consumption is high.
|
| Questions:
| ---------------------------------
| 1. How can we optimize this high memory usage?
| 2. How can we measure the total session memory consumption for a worker
| process and per a single transaction?
| 3. Will it help us to have a session state server & web gardening? Will
we
| loose a lot in performance by using state server (like delays etc)? We do
| not have crazy super machines, the machines we have are Dell PowerEdge
| Servers.
| 4. Will the caching application block help us if we cache commonly used
data
| on a cache server (We cache like list of airports in the world)? If we do
| that, will we loose on performance significantly?
| 5. Basically what can we do?
| Please help & advise.
|
| Best regards,
|
| --
|
| SevDer
| http://www.sevder.com
| A new .NET Source For .NET Developers
|
|
|
|

.



Relevant Pages

  • Re: headers sent issue
    ... huge waste of resources, cpu & memory. ... You are using memory for buffering that hypothetically could be needed ... will keep the use of memory & CPU to a minimum. ... start session ...
    (comp.lang.php)
  • Re: memory leak in asp 2.0
    ... If to be placed into session it should exist in session then it will ... put object which refers to web service into session I will not put into ... so I was able to watch how much memory I need. ... When I load first page the memory ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: OutOfMemory Error in Tomcat
    ... I checked the program that all session are close. ... force processing garbage collection but the memory usage increases ... It looks like something leaves references to session data for closed ... which lets you drill into memory usage of a Java program ...
    (comp.lang.java.programmer)
  • Re: headers sent issue
    ... huge waste of resources, cpu & memory. ... You are using memory for buffering that hypothetically could be needed ... will keep the use of memory & CPU to a minimum. ... start session ...
    (comp.lang.php)
  • Re: ASP.NET memory management
    ... As Jason has mentioned, generally we are recommended not to store large ... recommend to use since object stored there won't be automatically cleared. ... you're using 2k3 server with iis6, there is a memory recycle limit setting ... | shouldn't really be living on the Session except as a last resort. ...
    (microsoft.public.dotnet.framework.aspnet)