server gs vs workstation gs

  • Thread starter Thread starter Zeng
  • Start date Start date
Z

Zeng

I just realized that there are 2 modes for garbage collection modes: server
gs and workstation gs. Would someone know how I can go about changing the
mode for my web application written in C#? I want to make sure it's using
server gs mode. Thank you for any comment or advice.

-zeng
 
The two mode of GC are 'Concurrent' and 'Preemptive' (also called serial).
There are two run-time versions "server" and "workstation".
The server version can only be loaded when hosted (v1.x) and only uses the
"preemptive GC" mode.
The workstation version of the runtime is loaded per default on both single
and multi-proc. machines, the default GC mode being 'preemptive'.
To enable 'Concurent GC' on multi-proc machines for the workstation version,
you need to add:

<RUNTIME>
<GCCONCURRENT enabled="true" />
</RUNTIME>

To your config file.

Willy.
 
I added this node parallel to <system.web> node in my web.config of the
application and it gave me error (parsing error), both <system.web> and
<runtime> are under <configuration> node. What am I missing? Thanks!

<RUNTIME>
<GCSERVER enabled="true" />
</RUNTIME>
 
I'm running window 2000 server, I don't have the command tasklist that was
mentioned in the article, is there anything else I can do to get find out
which .dll an executable is loading? Thanks!
 
Zeng,
Be certain to get the case correct.

Also be certain to read:

http://blogs.msdn.com/clyon/archive/2004/09/10/228104.aspx

Specifically the second paragraph:

<quote>
If the server OS is running on a single-proc machine then the runtime will
have to load the Workstation GC, since Server GC doesn't work on a single
proc, so we're down to just the multi-proc issue.
</quote>

Further I don't believe the setting is needed under ASP.NET, as ASP.NET is a
hosted environment that already automatically loads the server GC if
allowed.

Chris Lyon's Weblog (http://blogs.msdn.com/clyon/) has a number of useful
entries on the GC:

http://blogs.msdn.com/clyon/category/7091.aspx

Hope this helps
Jay
 
This setting is not relevant for asp.net.
The worker process hosting the CLR runs in 'server' mode if on multi-cpu
box.

Willy.

Zeng said:
I added this node parallel to <system.web> node in my web.config of the
application and it gave me error (parsing error), both <system.web> and
<runtime> are under <configuration> node. What am I missing? Thanks!

<RUNTIME>
<GCSERVER enabled="true" />
</RUNTIME>


This setting is not relevant for asp.net.
The worker process hosting the CLR runs in 'server' mode if on multi-cpu
box.

Willy.
 
Back
Top