It certainly seems preferable that .NET components, used in ASP applications
via COM Interop, would use the Server GC instead of the Workstation GC.
For background, many articles discuss that the Server Garbage Collector is
appropriate for high-throughput use, and the Workstation Garbage Collector
is meant for single user apps with a UI.
Can anyone tell me which GC is used? If it's the workstation GC, is there a
way to specify that the Server GC be used instead?
Thanks in advance,
John Crim
WebRelevance
john@_remove_this_to_mail_me_webrelevance.com
Vadim Melnik - 30 Jun 2003 09:50 GMT
Hi,
> It certainly seems preferable that .NET components, used in ASP applications
> via COM Interop, would use the Server GC instead of the Workstation GC.
[quoted text clipped - 5 lines]
> Can anyone tell me which GC is used? If it's the workstation GC, is there a
> way to specify that the Server GC be used instead?
As far as I know, IIS automatically loads server CLR (mscorsvr.dll) on
multi-processor machines.
It's possible to select necessary CLR version, by creating custom CLR host
and loading runtime by CorBindToRuntimeEx (second parameter used to specify
server or workstation build).
I also heard about undocumented COMPLUS_BUILDFLAVOR environment variable
("SVR" or "WKS"), use it at own risk.
..
Regards,
Vadim
Willy Denoyette [MVP] - 30 Jun 2003 10:14 GMT
Which version of the runtime (server/workstation) loaded is determined by the hosting process and the number of CPU's available.In
your case the hosting process (inetinfo.exe - ASP) which is not .NET aware, will load the (default) workstation version.
On a single CPU box only the workstation version can be loaded even if the host requests for the server version, it is never
beneficial to run the server version of the CLR on a uniprocessor box.
Willy.
> It certainly seems preferable that .NET components, used in ASP applications
> via COM Interop, would use the Server GC instead of the Workstation GC.
[quoted text clipped - 11 lines]
> WebRelevance
> john@_remove_this_to_mail_me_webrelevance.com