Export (0) Print
Expand All

Configuring Garbage Collection on the Server

Office 2003
 
Microsoft Office Live Communications Server 2005 with SP1

Configuring Garbage Collection on the Server

Managed code applications that use the server API receive significant benefits from using the server-optimized garbage collector (GC) instead of the default workstation GC.

Workstation is the default GC mode and the only one available on single-processor computers. Workstation GC is hosted in console and Windows Forms applications. It performs full (generation 2) collections concurrently with the running program, thereby minimizing latency. This mode is useful for client applications, where perceived performance is usually more important than raw throughput.

The server GC is available only on multiprocessor computers. It creates a separate managed heap and thread for each processor and performs collections in parallel. During collection, all managed threads are paused (threads running native code are paused only when the native call returns). In this way, the server GC mode maximizes throughput (the number of requests per second) and improves performance as the number of processors increases. Performance especially shines on computers with four or more processors. All managed code applications using the Live Communications Server API should use the server GC.

If you are running the Microsoft .NET Framework 1.0 or 1.1 (without SP1), server GC is available only if the runtime is hosted in an unmanaged application. (For example, ASP.NET hosts web applications in server mode.) With version 1.1 with SP1, however, you can run server GC in a non-hosted managed application by adding the following element to the application's configuration file:

<configuration
   <runtime>
      <gcServer enabled="true"/>
   </runtime>
</configuration> 

Note  When you set the <gcServer/> element to "true", the <gcConcurrent/> element (the Workstation GC default) is disabled.

Make sure to name the configuration file using the format MyApp.exe.config and to save it in the same directory as MyApp.exe.

  
  What did you think of this topic?
  © 2008 Microsoft Corporation. All rights reserved.

 

Community Additions

ADD
Show:
© 2014 Microsoft