Re: ASP.NET memory management
- From: stcheng@xxxxxxxxxxxxxxxxxxxx (Steven Cheng[MSFT])
- Date: Fri, 19 Aug 2005 02:11:08 GMT
Thanks for Jason's inputs.
Hi Rob,
As Jason has mentioned, generally we are recommended not to store large
objects in SessionState, for example, some large DataSet retrieved from
database. If necessary to do so, do remember to clear them as soon as
possible. Also, other collection like ApplicationState is also not
recommend to use since object stored there won't be automatically cleared.
The ASP.NET's Cache is recommended since we can set TimeSpan expireation
for items cached there. Also, sometimes incorrectly use some COM interop
or GDI+ componets will also involve memroy issue, is there any such
components in your app?
For monitoring log or setting, in IIS, there is no much configuration, if
you're using 2k3 server with iis6, there is a memory recycle limit setting
for each App Pool which control the memory limit when the process's
consumed memory exceed it ,the worker process will be recycled. For
runtime monitoring, currently the existing tools is the perf monitor of the
server OS which displaying various performance counters some of them target
the asp.net worker process's memory consume.
In addition, here are some general reference on asp.net performance tuning
and memory debugging:
#Chapter 6 ¡ª Improving ASP.NET Performance
http://msdn.microsoft.com/library/en-us/dnpag/html/scalenetchapt06.asp?frame
=true
#Production Debugging for .NET Framework Applications
http://msdn.microsoft.com/library/en-us/dnbda/html/dbgch02.asp?frame=true
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "jasonkester" <jasonkester@xxxxxxxxx>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Subject: Re: ASP.NET memory management
| Date: 18 Aug 2005 11:21:50 -0700
| Organization: http://groups.google.com
| Lines: 15
| Message-ID: <1124389310.426778.95570@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
| References: <edSGK7#oFHA.2904@xxxxxxxxxxxxxxxxxxxx>
| NNTP-Posting-Host: 208.54.15.129
| Mime-Version: 1.0
| Content-Type: text/plain; charset="iso-8859-1"
| X-Trace: posting.google.com 1124389315 26476 127.0.0.1 (18 Aug 2005
18:21:55 GMT)
| X-Complaints-To: groups-abuse@xxxxxxxxxx
| NNTP-Posting-Date: Thu, 18 Aug 2005 18:21:55 +0000 (UTC)
| In-Reply-To: <edSGK7#oFHA.2904@xxxxxxxxxxxxxxxxxxxx>
| User-Agent: G2/0.2
| Complaints-To: groups-abuse@xxxxxxxxxx
| Injection-Info: g43g2000cwa.googlegroups.com; posting-host=208.54.15.129;
| posting-account=I3_EoA0AAABYP9XqLPq1RSd8LbZvjAnA
| Path:
TK2MSFTNGXA01.phx.gbl!TK2MSFTFEED02.phx.gbl!tornado.fastwebnet.it!tiscali!ne
wsfeed1.ip.tiscali.net!news.glorb.com!postnews.google.com!g43g2000cwa.google
groups.com!not-for-mail
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:118953
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| As you're no doubt starting to realize, automatic garbage collection
| doesn't stop you from writing leaky code. Be warned that large objects
| shouldn't really be living on the Session except as a last resort.
| Generally, you should limit the Session to things like UserIDs and such
| unless you have an object that is prohibitively expensive to construct
| and is needed on every page.
|
| If you could provide a bit more detail on what you're trying to
| accomplish, we might be able to suggest some alternatives that could
| lighten the load on the Session.
|
| Jason Kester
| Expat Software Consulting Services
| http://www.expatsoftware.com/
|
|
.
- Follow-Ups:
- Re: ASP.NET memory management
- From: Rob Nicholson
- Re: ASP.NET memory management
- From: Rob Nicholson
- Re: ASP.NET memory management
- References:
- Re: ASP.NET memory management
- From: Rob Nicholson
- Re: ASP.NET memory management
- From: jasonkester
- Re: ASP.NET memory management
- Prev by Date: User Control & member vars
- Next by Date: Re: IIS 6 security - anyone can explain this for me ?
- Previous by thread: Re: ASP.NET memory management
- Next by thread: Re: ASP.NET memory management
- Index(es):
Relevant Pages
|