server gs vs workstation gs

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
 
W

Willy Denoyette [MVP]

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.
 
Z

Zeng

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>
 
Z

Zeng

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!
 
J

Jay B. Harlow [MVP - Outlook]

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
 
W

Willy Denoyette [MVP]

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.
 

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

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top