That true for V1.X only, V2 uses the same mscorwks.dll for both server and
workstation GC.
If you want to know what GC version your application is using, you can read
the GCSettings.IsServerGC property, or you have to look into your
xxx.exe.config file.
The GC server is optimized for 'throughput' (server applications), there are
as many GC heaps as their are CPU's, and each heap has it's own GC thread.
That means that a GC doesn't run on the user thread, and the user thread can
run in parallel with a (single) GC thread. Typical UI style of applications,
aren't supposed to stress the GC as much as server applications, the UI
thread is mostly idle so it won't hurt to run the GC on this thread for gen0
collections.
If you have a windows application that runs a number of background threads
who's allocation scheme show large allocation rates, you might take
advantage of the server GC, but as always when talking about performance,
you have to measure.
Willy.
message | using tasklist /m mscorwks.dll i can detect the mode my app is running.
|
| The performance issue is open "what's the advantage in using gcServer vs
| gcConcurrent"
|
| "Willy Denoyette [MVP]" wrote:
|
| >
| > | > | If I specify the <gcServer enabled="true" /> in the config file
| > | what's the way to determine the real mode the application was buit -
| > server
| > | or workstation?
| > |
| > | Any way to use PerfCounters to detect that the mode is server, like GC
| > Heap
| > | number?
| > The gcServer attribute determines the type GC to be used. This has
nothing
| > to do with the application build mode. The server GC is only available
on
| > multi CPU boxes and is only meant to be used by server applications
| > (non-UI). The server GC runs the GC on separate threads (one per CPU)
from
| > the user threads.
| > There are no Perfcounters available that tell you what GC type you are
| > running against, all you can do is loas sos.dll in the debugger and
issue
| > the !eeversion command.
|
| ---
| WBR,
| Michael Nemtsev :: blog:
http://spaces.msn.com/laflour
|
| "At times one remains faithful to a cause only because its opponents do
not
| cease to be insipid." (c) Friedrich Nietzsche
|