Registry key for tuning COM+ thread and activity

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.

Note With the EmulateMTSBehavior value, as soon as 100 STA threads x 1 activities exist, COM+ starts binding multiple activities to the STA threads. COM+ does this to stay responsive to activation requests.

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:
Proprietăți

ID articol: 303071 - Ultima examinare: 5 aug. 2008 - Revizie: 1

Feedback