Dela via


How to: Disable Concurrent Garbage Collection

The common language runtime (CLR) can either run garbage collection concurrently on a separate thread or on the same thread as the application. Use the <gcConcurrent> element to specify how the runtime should run garbage collection. The following shows to disable concurrent garbage collection.

Example

<configuration>
   <runtime>
       <gcConcurrent enabled="false"/>
   </runtime>
</configuration>

By default, the runtime runs garbage collection concurrently, which reduces performance. If your application is single-threaded and involves heavy user interaction, leave concurrent garbage collection enabled so the application does not pause to perform garbage collection. If your application is an ASP.NET server application, you do not need to alter the default value of the <gcConcurrent> element.

Note

Concurrent garbage collection is not supported in applications running the WOW64 x86 emulator on 64-bit systems that implement the Intel Itanium architecture (formerly called IA-64). For more information about using WOW64 on 64-bit Windows systems, see Running 32-bit Applications.

See Also

Reference

<gcConcurrent> Element

Other Resources

Configuring Applications