RE: Slow performance with garbage collection
From: Chris Lyon [MSFT] (clyon_at_online.microsoft.com)
Date: 01/10/05
- Next message: Mad Scientist Jr: "string.replace vs stringbuilder, for inserting values in a string ?"
- Previous message: Mark T..: "How to change the application icon in the add/remove?"
- In reply to: Milan: "Slow performance with garbage collection"
- Next in thread: Milan Shah: "RE: Slow performance with garbage collection"
- Reply: Milan Shah: "RE: Slow performance with garbage collection"
- Reply: Milan: "Re: Slow performance with garbage collection"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 10 Jan 2005 19:55:10 GMT
Hi Milan
The .NET runtime will not choose server GC unless explicitly told you. There are two ways to do this:
1. add <GCSERVER enabled="true" /> to your application's config file (available in .NET 1.1 SP1)
2. create an unmanaged host for your app and select Server GC there.
Further reading:
http://weblogs.asp.net/clyon/archive/2004/09/08/226981.aspx
http://weblogs.asp.net/clyon/archive/2004/09/10/228104.aspx
Hope that helps
-Chris
--------------------
>
>Just wondering if someone can help me with a problem with garbage collection
>that I seem to have:
>
>I have a client/server system where the clients are experiencing quite long
>delays because of bad performance on the server. The server uses Windows
>Server 2003 with the .NET v1.1 Service Pack 1 update. I have used the
>Performance utility on the server during these bad performance periods and
>have noticed that there is a lot of time spent in the garbage collection.
>
>Does anyone know why this might be?
>
>***
>More detail:
>The nature of our system involves a lot of large objects (85KB+) being used
>and the large object heap size reflects this. There also seems to be a lot
>of garbage collection happening in the large object heap which I feel maybe
>our problem. If the average size of one of our objects is larger than the
>Generation 2 threshold (which it could easily be if the threshold is around
>10MB) then as soon as our object is on the heap then it will result in a
>garbage collection. This means that everytime one of our large objects goes
>on the heap, there is a corresponding garbage collection (this is just guess
>work though)...that would make an awful lot of garbage collections going on.
>
>I have read up about the issue with mscorwks.dll being used for garbage
>collection on a multiprocessor server. Typing in "tasklist /m mscorwks.dll"
>brings a list of our applications running under this DLL.
>
>The server I have is dual proccesor, thus I installed the .NET v1.1. SP1 to
>update the config settings so mscorsvr.dll would be used instead and enable
>the multiprocessor garbage collection. This has not made any noticeable
>difference with performance. However, typing in the above command still
>indicated our applications were running under the mscorwks.dll.
>
>I have also tried the gcConcurrent setting as well and this has not made any
>difference either.
>***
>
>It would be much appreciated if anyone can help with this problem?
>
>Thanks
>
>Milan
>
>
>
-- This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.
- Next message: Mad Scientist Jr: "string.replace vs stringbuilder, for inserting values in a string ?"
- Previous message: Mark T..: "How to change the application icon in the add/remove?"
- In reply to: Milan: "Slow performance with garbage collection"
- Next in thread: Milan Shah: "RE: Slow performance with garbage collection"
- Reply: Milan Shah: "RE: Slow performance with garbage collection"
- Reply: Milan: "Re: Slow performance with garbage collection"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|