Knowledge Base

Registry key for tuning COM+ thread and activity

PSS ID Number: 303071

Article Last Modified on 5/10/2005


The information in this article applies to:


This article was previously published under Q303071
Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry

INTRODUCTION

COM+ improves Microsoft Transaction Server (MTS) with a new threading model that provides simplified synchronization. The control for synchronization has been shifted from the single-threaded apartment (STA) in MTS to activity in COM+. In COM+, the apartment can assign a thread to multiple activities.

MORE INFORMATION

Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

In MTS, each package has its own thread pool with a predetermined size limit. However, in COM+, the thread pool is dynamic and has smaller average pool size to avoid excessive thread-switch overhead.

For more information about the differences in threading models between MTS and COM+, click the following article number to view the article in the Microsoft Knowledge Base:

282490 Thread pool differences between COM+ and MTS

However, under certain scenarios, slow middle-tier servers may experience low performance due to the lack of threads and concurrency in COM+ run time. Beginning with Post Microsoft Windows 2000 Service Pack 2 COM+ Rollup Hotfix 10 (which allows COM+ to simulate MTS behavior), the following registry key can be added:

HKEY_LOCAL_MACHINE\Software\Microsoft\COM3\STAThreadPool
Value name: EmulateMTSBehavior
Data type: REG_DWORD
Value data: default is 0

Any value other than zero for the EmulateMTSBehavior value causes the thread pool to emulate MTS behavior, that is, one activity for each thread and 100 maximum threads for each package. If you experience performance problems while CPU utilization is low, you can set this value to increase the chance of assigning a thread to your request.
Note The COM+ default settings are optimized and tested for most situations. You should consult Microsoft support professionals before you modify these settings.

REFERENCES

For more information, click the following article number to view the article in the Microsoft Knowledge Base:

294510 Post Windows 2000 Service Pack 2 COM+ Rollup Hotfix 10 is available

For more information about single-threaded apartments (STAs) and multithreaded apartments (MTAs), visit the following Microsoft Developer Network (MSDN) Web site:

Keywords: kbinfo KB303071
Technology: kbAudDeveloper kbCOMPlus100 kbCOMPlusSearch kbComSearch