<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">BizTalk Server Performance</title><subtitle type="html" /><id>http://blogs.msdn.com/b/biztalkperformance/atom.aspx</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/biztalkperformance/" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/b/biztalkperformance/atom.aspx" /><generator uri="http://telligent.com" version="5.6.50428.7875">Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><updated>2005-04-07T19:05:00Z</updated><entry><title>MaxDequeueThread and MaxReceiveInterval in the adm_Service table</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/biztalkperformance/archive/2008/02/08/maxdequeuethread-and-maxreceiveinterval-in-the-adm-service-table.aspx" /><id>http://blogs.msdn.com/b/biztalkperformance/archive/2008/02/08/maxdequeuethread-and-maxreceiveinterval-in-the-adm-service-table.aspx</id><published>2008-02-08T22:36:00Z</published><updated>2008-02-08T22:36:00Z</updated><content type="html">&lt;P&gt;One of the questions we were recently asked for was about the MaxDequeueThread and MaxReceiveInterval settings. Unfortunately, there is no useful description on them in the BizTalk Server R2 RTM documentation, and the question was 1) how to adjust them, 2) what they are for, and 3) when they could be used .&lt;BR&gt;Both of the switches are used to mainly control throttle of pumping messages from the MessageBox to the Message Agent for outbound processing in the following image: 
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/biztalkperformance/WindowsLiveWriter/MaxDequeueThreadandMaxReceiveIntervalint_A31D/clip_image001_2.gif" mce_href="http://blogs.msdn.com/blogfiles/biztalkperformance/WindowsLiveWriter/MaxDequeueThreadandMaxReceiveIntervalint_A31D/clip_image001_2.gif"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=84 alt=clip_image001 src="http://blogs.msdn.com/blogfiles/biztalkperformance/WindowsLiveWriter/MaxDequeueThreadandMaxReceiveIntervalint_A31D/clip_image001_thumb.gif" width=453 border=0 mce_src="http://blogs.msdn.com/blogfiles/biztalkperformance/WindowsLiveWriter/MaxDequeueThreadandMaxReceiveIntervalint_A31D/clip_image001_thumb.gif"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;1)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; How to adjust them &lt;BR&gt;You can customize the settings through the adm_Service table in the BizTalk management database. The table contains one record for each service type like Xlang, MSMQT, and “Messaging InProcess”.&amp;nbsp; So you should be careful when you change this setting because this is a service-type-wide change. 
&lt;P&gt;2)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; What they are for&lt;BR&gt;1.The MaxDequeueThread setting is used to limit the number of threads in the NT thread pool for the dequeuing operation.&amp;nbsp; The dequeuing operation calls a stored procedure, bts_DeQueueMesssages in the current implementation, to retrieve messages in a batch from the message box and pushes them into the in-flight message queue, which is an in-memory list.&amp;nbsp; The number of threads that a host instance uses won’t exceed the MaxDequeueThread setting. The default is 5, and the minimum value will be technically 1. &lt;BR&gt;2.The MaxReceiveInterval setting is used &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.To specify the time interval in millisecond for which the throttle controller checks the system status to decide whether a throttle controlling is needed. &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; b.To specify the time interval in millisecond for which the throttle controller delays to dispatch messages to the services under certain throttling conditions where the batch containing the messages was already created before the throttling condition starts.&amp;nbsp; Throttle controller incrementally delays the message dispatch for this setting at a time up to for a time interval, which is dynamically adjusted depending on its stress condition. &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.To specify the maximum time interval in millisecond for creating a thread for the dequeuing operation. In fact, if the MessageBox has remaining messages unprocessed, it starts new dequeuing operation thread right away without waiting. So, In high volume systems, this interval won’t be used at all.&amp;nbsp; Once this value is used, the time interval will be dynamically changed between MaxReceiveInterval/10 and MaxReceiveInterval. The default value is 500 and the minimum value is 0.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;BR&gt;3) When they could be used&lt;BR&gt;They could be used for the low latency scenario, but if your SQL server can’t take the extra load from more frequent polling the server would cause then it would be negative impact.&amp;nbsp; We don’t recommend modifying these setting as far as possible.&amp;nbsp; But, if you have to, remember it would reduce latency only with the right deployment, solution, and hardware, and you have to test your solutions to make sure your assumptions. &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7545208" width="1" height="1"&gt;</content><author><name>BizTalkPerf</name><uri>http://blogs.msdn.com/BizTalkPerf/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>How to manually recreate missing BizTalk performance counters</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/biztalkperformance/archive/2007/09/30/how-to-manually-recreate-missing-biztalk-performance-counters.aspx" /><id>http://blogs.msdn.com/b/biztalkperformance/archive/2007/09/30/how-to-manually-recreate-missing-biztalk-performance-counters.aspx</id><published>2007-10-01T08:00:36Z</published><updated>2007-10-01T08:00:36Z</updated><content type="html">&lt;p&gt;To identify performance issues in a BizTalk solution, you should rely on the performance counters that BizTalk Server uses. All the BizTalk performance counters should be&amp;nbsp; added to the registry when you run the configuration wizard. If the registry keys were overwritten somehow, those performance counters were gone.&amp;nbsp; You could use the configuration wizard to recreate those missing BizTalk performance counters, but it requires reconfiguring the features that use the performance counters. To do so you should unconfigure them first, which is something you might not want to do.&amp;nbsp; Even though it is undocumented, you can manually populate those resister keys for the missing performance counters.  &lt;p&gt;There are two types of the performance libraries that BizTalk Server uses:  &lt;p&gt;1. BTSPerfMonExt.dll for the performance objects that the unmanaged code of BizTalk Server uses.  &lt;p&gt;&lt;a href="http://blufiles.storage.msn.com/y1pDq94wEBRuSFYGYEJ_W2OCGKtsNXBd_Vy2_9t0ckQOtt0Q2gDLE8wBJy2ALKbrcl-WkHF64M5YCQ"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="120" alt="perflib" src="http://blufiles.storage.msn.com/y1pDq94wEBRuSEMFkNhhKir7lFE6vcFK3nfI9TrpExvF0ZX0iX57WUGu0_jAQPD-NxYImPxr5Az4S4" width="240" border="0"&gt;&lt;/a&gt;  &lt;p&gt;2. netfxperf.dll for the performance objects that the managed code of BizTalk Server uses.  &lt;ul&gt; &lt;li&gt;Note: netfxperf.dll is a .NET framework component. It is shared for all .NET performance counters. For more information about netfxperf.dll see &lt;a href="http://www.ddj.com/windows/184405834" target="_blank"&gt;.NET Performance Counters&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;a href="http://blufiles.storage.msn.com/y1pDq94wEBRuSFL-WTRnFyIOVQ7t56nlPrARPmxol0zAo-T9T9y2KFInZ5wMQstPy0a-rIxcOOay8c"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="172" alt="netperflib" src="http://blufiles.storage.msn.com/y1pDq94wEBRuSGv_G8DbOOZmwrd-5GnNgRAfK4II-gBzNxlnoXs-xCu-2xnycpITSxxuu0DCLBDL_8" width="240" border="0"&gt;&lt;/a&gt;  &lt;p&gt;The following tables shows which performance library is used for each BizTalk performance object:  &lt;table cellspacing="0" cellpadding="2" width="600" border="1"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td valign="top" width="169"&gt;&lt;font size="1"&gt;Object&lt;/font&gt;  &lt;td valign="top" width="169"&gt;&lt;font size="1"&gt;Performance Counter Library&lt;/font&gt;  &lt;td valign="top" width="260"&gt;&lt;font size="1"&gt;Installer&lt;/font&gt;  &lt;tr&gt; &lt;td valign="top" width="169"&gt;&lt;font size="1"&gt;BizTalk:Message Box:*&lt;/font&gt;  &lt;td valign="top" width="169"&gt;&lt;font size="1"&gt;netfxperf.dll&lt;/font&gt;  &lt;td valign="top" width="260"&gt;&lt;font size="1"&gt;Microsoft.BizTalk.MsgBoxPerfCounters.dll&lt;/font&gt;  &lt;tr&gt; &lt;td valign="top" width="169"&gt; &lt;p&gt;&lt;font size="1"&gt;BizTalk:Message Agent&lt;br&gt;BizTalk:File Receive Adapter&lt;br&gt;BizTalk:File Send Adapter&lt;br&gt;BizTalk:HTTP Receive Adapter&lt;br&gt;BizTalk:HTTP Send Adapter&lt;br&gt;BizTalk:POP3 Receive Adapter&lt;br&gt;BizTalk:FTP Receive Adapter&lt;br&gt;BizTalk:FTP Send Adapter&lt;br&gt;BizTalk:MSMQ Receive Adapter&lt;br&gt;BizTalk:MSMQ Send Adapter&lt;br&gt;BizTalk:SOAP Receive Adapter&lt;br&gt;BizTalk:SOAP Send Adapter&lt;br&gt;BizTalk:SMTP Send Adapter&lt;br&gt;BizTalk:SQL Receive Adapter&lt;br&gt;BizTalk:SQL Send Adapter&lt;br&gt;BizTalk:Messaging&lt;br&gt;BizTalk:Messaging Latency&lt;/font&gt; &lt;/p&gt; &lt;td valign="top" width="169"&gt;&lt;font size="1"&gt;BTSPerfMonExt.dll&lt;/font&gt;  &lt;td valign="top" width="260"&gt;&lt;font size="1"&gt;BTSPerfMonExt.ini&lt;br&gt;BTSPerfMonExt.h&lt;/font&gt;  &lt;tr&gt; &lt;td valign="top" width="169"&gt;&lt;font size="1"&gt;BizTalk: BAS TPM Management Web Service&lt;br&gt;&lt;/font&gt; &lt;td valign="top" width="169"&gt;&lt;font size="1"&gt;netfxperf.dll&lt;/font&gt;  &lt;td valign="top" width="260"&gt;&lt;font size="1"&gt;Microsoft.BizTalk.KwTpm.TPMgmtWSPerf.dll&lt;/font&gt;  &lt;tr&gt; &lt;td valign="top" width="169"&gt;&lt;font size="1"&gt;BizTalk: BAS TPM Publishing Web Service&lt;/font&gt;  &lt;td valign="top" width="169"&gt;&lt;font size="1"&gt;netfxperf.dll&lt;/font&gt;  &lt;td valign="top" width="260"&gt;&lt;font size="1"&gt;Microsoft.BizTalk.KwTpm.TPPubWSPerf.dll&lt;/font&gt;  &lt;tr&gt; &lt;td valign="top" width="169"&gt;&lt;font size="1"&gt;BizTalk:Windows SharePoint Services Adapter&lt;/font&gt;  &lt;td valign="top" width="169"&gt;&lt;font size="1"&gt;netfxperf.dll&lt;/font&gt;  &lt;td valign="top" width="260"&gt;&lt;font size="1"&gt;Microsoft.BizTalk.KwTpm.WssAdapter.Runtime.dll&lt;/font&gt;  &lt;tr&gt; &lt;td valign="top" width="169"&gt;&lt;font size="1"&gt;BizTalk:TDDS&lt;/font&gt;  &lt;td valign="top" width="169"&gt;&lt;font size="1"&gt;netfxperf.dll&lt;/font&gt;  &lt;td valign="top" width="260"&gt;&lt;font size="1"&gt;Microsoft.BizTalk.Bam.EventBus.dll&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&amp;nbsp; &lt;p&gt;To recreate the performance counters using netfxperf.dll, you can use InstallUtil.exe in the .NET Framework. If the assembly is installed in the GAC, you can run InstallUtil.exe as follows:  &lt;p&gt;&lt;strong&gt;Installutil /i /assemblyname "&lt;em&gt;&amp;lt;InstallerFileName&amp;gt;&lt;/em&gt;, Version=&lt;em&gt;&amp;lt;VersionNumOfTheInstaller&amp;gt;&lt;/em&gt;, Culture=neutral, &lt;br&gt;PublicKeyToken=&lt;em&gt;&amp;lt;PublicKeyOfTheInstaller&amp;gt;&lt;/em&gt;"&lt;/strong&gt;  &lt;p&gt;For example,  &lt;p&gt;InstallUtil /i /assemblyname "Microsoft.BizTalk.MsgBoxPerfCounters, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"  &lt;p&gt;If it is not, you can run InstallUtil.exe as follows:  &lt;p&gt;&lt;strong&gt;InstallUtil /i &lt;em&gt;&amp;lt;Installer&amp;gt;&lt;/em&gt;&lt;/strong&gt;  &lt;p&gt;For example,  &lt;p&gt;InstallUtil /i Microsoft.BizTalk.KwTpm.TPMgmtWS.dll  &lt;p&gt;&amp;nbsp; &lt;p&gt;To recreate the performance counters using BTSPerfMonExt.dll,&amp;nbsp; you can use lodctr.exe and unlodctr.exe as follows:  &lt;ul&gt; &lt;li&gt;Note: lodctr.exe is a tool for registering new performance counters, and unlodctr.exe is for removing performance counters. For more information about these tools, see &lt;a href="http://support.microsoft.com/kb/300956" target="_blank"&gt;How to manually rebuild Performance Counter Library values&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;1. Copy the BTSPerfMonExt.ini and BTSPerfMonExt.h files to the %windir%\system32 folder.&lt;br&gt;2. At a command prompt, go to the the %windir%\system32 folder, and then type the following command to uninstall the damaged performance counters.  &lt;p&gt;&lt;strong&gt;unlodctr "BTSSvc.3.0"&lt;/strong&gt;  &lt;p&gt;3. Then, type the following command to reinstall the BizTalk performance counters:  &lt;p&gt;&lt;strong&gt;lodctr BTSPerfMonExt.ini&lt;/strong&gt;  &lt;p&gt;Thanks, &lt;br&gt;Young&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5218421" width="1" height="1"&gt;</content><author><name>BizTalkPerf</name><uri>http://blogs.msdn.com/BizTalkPerf/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Threads, DB sessions, and throttling</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/biztalkperformance/archive/2007/09/28/threads-db-sessions-and-throttling.aspx" /><link rel="enclosure" type="application/x-zip-compressed" length="39573" href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-05-19-00-11/MQLoadTest.zip" /><id>http://blogs.msdn.com/b/biztalkperformance/archive/2007/09/28/threads-db-sessions-and-throttling.aspx</id><published>2007-09-28T19:52:00Z</published><updated>2007-09-28T19:52:00Z</updated><content type="html">&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;[Note: This text-wrapping due to the size of the images and the site layout may make this post hard to read.&amp;nbsp; If so, you&amp;nbsp;should have a better experience&amp;nbsp;with the copy pasted to &lt;A href="http://biztalkperformance.members.winisp.net/BlogPages/MaxWorkerThreads.htm"&gt;http://biztalkperformance.members.winisp.net/BlogPages/MaxWorkerThreads.htm&lt;/A&gt;&amp;nbsp;].&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;I recently worked on a puzzling problem where spikes in load to BizTalk in a large environment would cause some unpleasant SQL Server problems.&amp;nbsp; This turned out to be directly related to the .NET thread-pool size in the BizTalk hosts, which is configurable &lt;SPAN style="COLOR: black; mso-themecolor: text1"&gt;via the registry key ‘MaxWorkerThreads’, and&lt;/SPAN&gt; can be set as described in &lt;/FONT&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/aa561380.aspx"&gt;&lt;FONT face=Calibri color=#800080 size=3&gt;http://msdn2.microsoft.com/en-us/library/aa561380.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt; .&amp;nbsp; I’ll attempt to outline the issue here from the perspective of understanding and addressing the root cause, rather than a blow-by-blow chronology of troubleshooting the issue.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;FONT size=+0&gt;&lt;FONT face=Calibri&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B&gt;&lt;FONT size=3&gt;The internals&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;The orchestration engine in BizTalk does most of its work on worker threads from the .NET thread-pool.&amp;nbsp; This is easily verified by doing some sample based profiling of the running XLANG host using the excellent Visual Studio performance tools.&amp;nbsp; Below you can see the bulk of the time spent in a call stack that goes from the thread pool’s “_ThreadPoolWaitCallback” method&amp;nbsp; into the XLANG scheduler’s “RunSomeSegments” method.&amp;nbsp; If you drill further into this call stack you’ll see much time is spent in “BTSDBAccessor.dll”.&amp;nbsp; What this tells us is that XLANG does most of its work, including accessing the BizTalk databases to send and receive messages, on .NET thread-pool worker threads.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;IMG style="WIDTH: 771px; HEIGHT: 271px" height=271 src="http://biztalkperformance.members.winisp.net/images/callstack.png" width=771 mce_src="http://biztalkperformance.members.winisp.net/images/callstack.png"&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;&lt;o:p&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;Due to this, the actual number of running orchestrations at any one time is directly limited by the size of the .NET thread pool.&amp;nbsp; You can verify this with the performance counter “\XLANG/s Orchestration(&lt;I&gt;hostname&lt;/I&gt;)\Running Orchestrations” and see if it ever exceeds your “thead-pool size * number of CPUs”.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;Now it should be no surprise to anyone who has worked with BizTalk that one of your key performance limiters is the backend SQL Server database – specifically the MessageBox.&amp;nbsp; Typically your running orchestrations will be spending a lot of time reading and writing to the MessageBox.&amp;nbsp; So what happens if your existing pool of database sessions are all busy serving other instances and your current instance needs to interact with the message box? Well, generally it will open another database session.&amp;nbsp; Thus, under load, your .NET thread-pool size directly relates to your running orchestrations, which directly relates to how many database sessions the host could potentially open.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;What about throttling based on DB Sessions you ask!? Well the way this works is that if you are using more database sessions than the number at which throttling is configured to kick in, then it will gradually introduce delays prior to database requests.&amp;nbsp; This gives the existing connections in use a chance to become free, but doesn’t effectively block processing if above the throttling limit (this is a throttle after all, and not a hard limit).&amp;nbsp; What this means is that (a) If the database requests are taking a long time (which is common under load) you will still open up more sessions, and (b) Under a quick spike in load you may open up a bunch of sessions for your running instances before throttling takes effect.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;&lt;B&gt;The testing&lt;/B&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: black; mso-themecolor: text1"&gt;&lt;FONT size=3&gt;To demonstrate the effects a large number of suddenly busy database connections to the MessageBox can have, let’s do some testing.&amp;nbsp; For the testing I created a scenario that uses MQSeries exclusively as the message transport (a common enterprise queuing platform).&amp;nbsp; It includes some correlation with a delay (to ensure the subscriptions built up a little) and a couple of dynamic send ports.&amp;nbsp; I also made the dynamic send ports run in parallel within an atomic scope, and constructed a new message before another final send.&amp;nbsp; This is a simple scenario without any compensation, business rules, etc…, but includes a few of the complexities that exist in real business processes and should be plenty to keep the MessageBox busy.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The solution is downloadable from this blog if you need further details.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;&lt;SPAN style="COLOR: black; mso-themecolor: text1"&gt;For generating the load I again used some of the great new features put into Visual Studio&lt;B&gt; - &lt;/B&gt;thi&lt;/SPAN&gt;s time the Load Testing component included in the Team Suite or Test editions.&amp;nbsp; I created a simple unit test to send a message with a unique OrderId to my MQSeries queue which is the receive location for my XLANG activation port.&amp;nbsp; I then wrapped this inside a Load Test which allowed me to specify the number of concurrent users and a warm up time, as well as what performance counters I wanted to gather on what machines during the run.&amp;nbsp; Note that a “user” in Visual Studio Load Testing effectively equals a thread which will loop through your unit test.&amp;nbsp; In order to produce spikes in load I had each thread “sleep” for a fair amount of time in the unit test while simulating low load, then for one minute out of every ten I’d reduce this sleep considerably.&amp;nbsp; This was a crude – but effective – method for simulating periodic “bursts” of traffic.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;Attached to this blog is a link to my solution containing the BizTalk project, the Test project, and a helper class library for working with the MQSeries queues. (Note: You’ll need the MQSeries client bits installed on the Visual Studio box to run the load generation – or just change the projects to use a different transport for your test environment).&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;My environment was highly scaled out.&amp;nbsp; My MessageBox was running on an 8-way SQL Server (with BAM/DTA/SSO on a separate SQL Server).&amp;nbsp; I also had 10 dual-proc machines; 2 running the receive hosts, 2 running the send hosts, 4 running the XLANG hosts, one dedicated to running MQSeries, and one dedicated to Visual Studio (generating the load, monitoring the counters, etc…).&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;&lt;B&gt;The results&lt;/B&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;For the first test the idea was to push SQL beyond its limits with the volume of database sessions created by BizTalk.&amp;nbsp; For this I set the MaxWorkerThreads for all the hosts to 200.&amp;nbsp; If you &lt;SPAN style="COLOR: black"&gt;multiply this&lt;/SPAN&gt; number of threads and by the number of active host instances across the deployment – this has the potential for a lot of connections!&amp;nbsp; Running the scenario a few key counters can been seen below. (Note: If wondering what tool this graph is from, this is a screen shot of a section of the Visual Studio Load Test results UI).&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B&gt;&lt;FONT size=3&gt;200 ‘MaxWorkerThreads’, default (0) ‘DB Connections Per CPU’ throttling&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;IMG style="WIDTH: 659px; HEIGHT: 597px" height=597 src="http://biztalkperformance.members.winisp.net/images/a200Threads0DB.PNG" width=659 mce_src="http://biztalkperformance.members.winisp.net/images/a200Threads0DB.PNG"&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;It can be seen from the counters that I dropped ~59,000 test messages, averaged 31.4% SQL CPU on my MessageBox server, and peaked at 1,093 SQL connections!&amp;nbsp; That’s a lot of connections.&amp;nbsp; Of all the test messages dropped ~20,000 were received by the receive locations during the run, and only ~5,000 XLANGs instances completed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;The big problem here though is SQL.&amp;nbsp; Why does it keep dropping to 0% CPU?&amp;nbsp; Looking in the SQL event log gives the reason:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;Event Type:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Information&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;Event Source:&amp;nbsp;&amp;nbsp;&amp;nbsp; MSSQLSERVER&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;Event Category:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (2)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;Event ID:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 17888&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;Date:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9/21/2007&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;Time:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11:12:08 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;User:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N/A&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;Computer:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BPI8X32PERF01&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;Description:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;&lt;SPAN style="COLOR: #1f497d"&gt;All schedulers on Node 0 appear deadlocked due to a large number of worker threads waiting on LCK_M_S. Process Utilization 0%&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d; mso-themecolor: dark2"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: black; mso-themecolor: text1"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: black; mso-themecolor: text1"&gt;&lt;FONT size=3&gt;(Note: For details on what the SQL Server Scheduler is and the various causes of the above event, see the article at &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/technet/prodtechnol/sql/2005/diagandcorrecterrs.mspx"&gt;&lt;FONT color=#800080 size=3&gt;http://www.microsoft.com/technet/prodtechnol/sql/2005/diagandcorrecterrs.mspx&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3&gt; ).&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d; mso-themecolor: dark2; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;The above message appears several times.&amp;nbsp; So SQL Server is effectively completely locked up to the point where it can’t do anything for extended periods.&amp;nbsp;&amp;nbsp; This causes various problems on the BizTalk hosts where you may see events such as the below:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Event Type:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Event Source:&amp;nbsp;&amp;nbsp;&amp;nbsp; BizTalk Server 2006&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Event Category:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BizTalk Server 2006 &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Event ID:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6912&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Date:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9/26/2007&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Time:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11:13:21 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;User:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N/A&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Computer:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BPI2X64PERF04&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Description:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;The following stored procedure call failed: " { call [dbo].[bts_UpdateMsgbox_XlangHost]( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}". SQL Server returned error string: "Transaction (Process ID 378) was deadlocked on lock | thread resources with another process and has been chosen as the deadlock victim. Rerun the transaction.".&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;.. or ..&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Event Type:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Event Source:&amp;nbsp;&amp;nbsp;&amp;nbsp; XLANG/s&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Event Category:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; None&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Event ID:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10034&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Date:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9/26/2007&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Time:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11:13:22 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;User:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N/A&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Computer:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BPI2X64PERF04&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Description:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'BtsLoadScenario.SingleOrch(8d7a5913-ce72-0c75-7e41-a8729c4c50c7)'.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;The service instance will remain suspended until administratively resumed or terminated. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;InstanceId: ca11bfcf-b5d7-4115-b12d-d21b082b3094&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Shape name: ConstructMessage_1&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;ShapeId: dfbab00f-9e42-4905-bd22-cb046262a86c&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Exception thrown from: segment 1, progress 22&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Inner exception: Exception from HRESULT: 0xC0C01B13&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Exception type: COMException&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Source: Microsoft.BizTalk.Interop.Agent&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Target Site: Microsoft.BizTalk.Agent.Interop.IBTMessage ReadReferencedMessageByID(System.Guid ByRef)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;The following is a stack trace that identifies the location where the exception occured&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp; at Microsoft.BizTalk.Agent.Interop.IBTInstanceState.ReadReferencedMessageByID(Guid&amp;amp; msgID)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp; at Microsoft.BizTalk.XLANGs.BTXEngine.BTXMessageState._retrieveBTMessage(IStateManager ctx)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp; at Microsoft.BizTalk.XLANGs.BTXEngine.BTXMessageState._retrieveBTMessage()&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp; at Microsoft.BizTalk.XLANGs.BTXEngine.BTXMessageState.GetPart(Int32 partIndex)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp; at Microsoft.XLANGs.Core.XMessage.GetUnderlyingPart(Int32 partIndex)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp; at Microsoft.XLANGs.Core.Part._slowProtectedRegisterWithValueTable()&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp; at Microsoft.XLANGs.Core.Part.ProtectedRegisterWithValueTable()&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp; at Microsoft.XLANGs.Core.Part.CopyFrom(Part part)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp; at Microsoft.XLANGs.Core.XMessage.CopyFrom(XMessage srcMsg)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp; at BtsLoadScenario.SingleOrch.segment1(StopConditions stopOn)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp; at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception&amp;amp; exp)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;.. or ..&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Event Type:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Event Source:&amp;nbsp;&amp;nbsp;&amp;nbsp; XLANG/s&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Event Category:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; None&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Event ID:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10041&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Date:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9/26/2007&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Time:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11:16:39 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;User:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N/A&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Computer:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BPI2X64PERF04&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Description:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Suspending due to exception occurring during dehydration of instance d1c19376-7008-4b37-ad95-ce2a6af85964.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Exception type: DehydrationFailedException&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Additional error information:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exception occurred when persisting state to the database.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Exception type: PersistenceException&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Source: Microsoft.XLANGs.BizTalk.Engine&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Target Site: Void Commit()&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;The following is a stack trace that identifies the location where the exception occured&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp; at Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.Commit()&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp; at Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.Dehydrate(Boolean fCommit)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp; at Microsoft.XLANGs.Core.Service.Persist(Boolean dehydrate, Context ctx, Boolean idleRequired, Boolean finalPersist, Boolean bypassCommit, Boolean terminate)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp; at Microsoft.BizTalk.XLANGs.BTXEngine.BTXService.PerformDehydration(Boolean wait)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;&amp;nbsp;&amp;nbsp; at Microsoft.XLANGs.Core.Service.Dehydrate()&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;.. and ultimately perhaps ..&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Event Type:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Event Source:&amp;nbsp;&amp;nbsp;&amp;nbsp; Service Control Manager&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Event Category:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; None&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Event ID:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7031&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Date:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9/26/2007&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Time:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11:17:33 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;User:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N/A&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Computer:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BPI2X64PERF04&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;Description:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #943634"&gt;&lt;FONT size=3&gt;The BizTalk Service BizTalk Group : XlangHost service terminated unexpectedly.&amp;nbsp; It has done this 1 time(s).&amp;nbsp; The following corrective action will be taken in 60000 milliseconds: Restart the service.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;Obviously SQL Server is not in a good way with so much work for the MessageBox over so many connections.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B&gt;&lt;FONT size=3&gt;200 ‘MaxWorkerThreads’, 20 ‘DB Connections Per CPU’ throttling&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;After the above test I reset the environment and tested the “DB Connections Per CPU” throttling setting.&amp;nbsp; I set this to 20, and as it’s a per CPU setting, this equates to 40 for the host instances on the test machines.&amp;nbsp; The results of this test are below:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;IMG style="WIDTH: 644px; HEIGHT: 597px" height=597 src="http://biztalkperformance.members.winisp.net/images/b200Threads20DB.PNG" width=644 mce_src="http://biztalkperformance.members.winisp.net/images/b200Threads20DB.PNG"&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;Here 58,400 test messages were sent to the receive queue. SQL CPU averaged a little better at 40.1% (though still dropped to 0% a few times), and SQL still peaked at 1,037 connections!&amp;nbsp; A lot more of the messages were received at around 37,900, however the system still only got through 10,200 XLANG instances (double the previous test – but not great).&amp;nbsp; Still worrying is the fact that SQL still often locked itself to the point of 0% CPU utilization, and I still suffered some of the same event log errors highlighted in the previous run.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;The below chart showing different counters for this same run highlights a potential problem with this solution.&amp;nbsp; If you’re throttling on “DB Connections”, then any time you get more active XLANG instances than this you may start to throttle (if they’re all trying to access the database at the same time – such as a burst of traffic).&amp;nbsp; The counters below show that the sessions are much higher than the threshold, and thus “Message publishing throttling state” is pretty much stuck on ‘8’ (“Throttling due to high session count”).&amp;nbsp; Due to this the publishing delay rises and rises until it maxes out at 5 minutes (the default 300,000ms).&amp;nbsp; It resets around the 26 min mark when the host restarts.&amp;nbsp; While marginally better than the first run, this is still a far from ideal result.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;IMG style="WIDTH: 645px; HEIGHT: 563px" height=563 src="http://biztalkperformance.members.winisp.net/images/bThrottling.PNG" width=645 mce_src="http://biztalkperformance.members.winisp.net/images/bThrottling.PNG"&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B&gt;&lt;FONT size=3&gt;100 ‘MaxWorkerThread’s, default (0) ‘DB Connections Per CPU’ throttling&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;The next test is to drop the number of worker threads per host (the MaxWorkerThreads value in the registry for the host service).&amp;nbsp; The results of this run are shown below:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;IMG style="WIDTH: 646px; HEIGHT: 597px" height=597 src="http://biztalkperformance.members.winisp.net/images/c100Threads0DB.PNG" width=646 mce_src="http://biztalkperformance.members.winisp.net/images/c100Threads0DB.PNG"&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;Now this is more like it!&amp;nbsp; ~57,700 test messages were dropped and this time the CPU utilization on SQL was a respectable 76.6%.&amp;nbsp; The max SQL connections value is down to 694.&amp;nbsp; Most importantly all dropped docs were received by BizTalk by the end of the run, and a whopping 39,400 XLANGs instances have completed!&amp;nbsp; The throttling picture looks much healthier, with the publishing delay never getting above a few seconds for very brief periods due to rate imbalance (and a little for DB growth at the end).&amp;nbsp; Delivery throttling for inbound/outbound rate imbalance and in-memory messages is respectable, and to be expected with such bursts of load.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;IMG style="WIDTH: 644px; HEIGHT: 563px" height=563 src="http://biztalkperformance.members.winisp.net/images/cThrottling.PNG" width=644 mce_src="http://biztalkperformance.members.winisp.net/images/cThrottling.PNG"&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;Most importantly however in this last test – there was no SQL lock-ups and no errors on any of the BizTalk hosts!&amp;nbsp; This environment is pretty solid even under extreme loads.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B&gt;&lt;FONT size=3&gt;Default (25) ‘MaxWorkerThreads’, default (0) ‘DB Connections Per CPU’ throttling&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;As a final test everything was run with just the default settings.&amp;nbsp; Without specifying the registry keys the .NET thread-pool will have a maximum of 25 threads. &amp;nbsp;The results for this run are below:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;IMG style="WIDTH: 645px; HEIGHT: 598px" height=598 src="http://biztalkperformance.members.winisp.net/images/dDefaults.PNG" width=645 mce_src="http://biztalkperformance.members.winisp.net/images/dDefaults.PNG"&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;The numbers for this are very similar to the previous test.&amp;nbsp; ~58,600 test messages were dropped.&amp;nbsp; SQL CPU utilization is a little higher at an average of 81.7%.&amp;nbsp; Due to the lower number of threads the number of SQL connections has peaked at a much lower 480.&amp;nbsp; Again, all dropped docs were received, and 36,700 XLANGs instances have completed.&amp;nbsp; This is a touch lower (~7.4%) for completed XLANG instances than the prior test.&amp;nbsp; The throttling graph for this last test was also very similar to the previous test – so I won’t include it here.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;&lt;B&gt;Summary&lt;/B&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;The final conclusion from this testing is that you need to be mindful of the load you are putting on the back-end as you scale out your environment.&amp;nbsp; There may be valid reasons why you need more threads in your thread pool, (KB article &lt;/FONT&gt;&lt;A href="http://support.microsoft.com/kb/900455"&gt;&lt;FONT color=#800080 size=3&gt;http://support.microsoft.com/kb/900455&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3&gt; describes for example needing to increase this if using orchestrations that can’t dehydrate), but be aware of the equation “number of hosts * max thread-pool size * number of CPUs = potential DB sessions”. Too many connections all trying to read and write to your MessageBox at the same time can overwhelm SQL Server, locking up the system and reducing your throughput dramatically.&amp;nbsp; &lt;SPAN style="COLOR: #1f497d; mso-themecolor: dark2"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d; mso-themecolor: dark2; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: black; mso-themecolor: text1"&gt;&lt;FONT size=3&gt;Be aware of the type of work your host is doing and the settings that control the threads used.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The MaxWorkerThreads setting outlined here controls the threads available to the XLANG engine, and the SOAP &amp;amp; HTTP send adapters. The messaging engine however uses its own thread pool which may be set as described in the documentation at &lt;/FONT&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/aa577604.aspx"&gt;&lt;FONT color=#800080 size=3&gt;http://msdn2.microsoft.com/en-us/library/aa577604.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3&gt; .&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;SPAN style="COLOR: #1f497d; mso-themecolor: dark2"&gt; &lt;/SPAN&gt;If you do need a large thread-pool, then consider throttling based on the number of DB Sessions in order to reduce the volume of requests on those sessions under high load – this will only add limited stability however, and may not be sufficient protection in environments with large sudden bursts of work.&amp;nbsp; Ideally, start with the defaults and only &lt;SPAN style="COLOR: black; mso-themecolor: text1"&gt;adjust&lt;/SPAN&gt; your thread-pool if testing shows this to be beneficial and stable.&amp;nbsp; In a well designed system, more threads often just means more context switching and locking, not more completed work!&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;We all know that testing is important for a successful implementation, but testing with a realistic environment is key to avoid unpleasant surprises in production.&amp;nbsp; This means testing with realistic hardware (thread-pool size – as with many settings – is per CPU), an appropriately sized test environment (the number of running hosts, not just the work they do, is highly relevant – nothing scales linearly!), a realistic load pattern (throttling state, current sessions, etc… all behavior much differently under bursts than under steady load), and realistic response times (do correlated or response messages really return instantly in production?&amp;nbsp; This directly effects how long your orchestrations run for and the number of active subscriptions at any one time – both key to performance). &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Calibri','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"&gt;I hope this has provided some insight and saved a few headaches.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Calibri','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Calibri','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Calibri','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: minor-fareast; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"&gt;&amp;nbsp;- Bill Ticehurst&lt;/SPAN&gt;&lt;/P&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5190011" width="1" height="1"&gt;</content><author><name>BizTalkPerf</name><uri>http://blogs.msdn.com/BizTalkPerf/ProfileUrlRedirect.ashx</uri></author><category term="BizTalk Performance Throttling Threadpool" scheme="http://blogs.msdn.com/b/biztalkperformance/archive/tags/BizTalk+Performance+Throttling+Threadpool/" /></entry><entry><title>Back in the saddle</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/biztalkperformance/archive/2007/09/27/back-in-the-saddle.aspx" /><id>http://blogs.msdn.com/b/biztalkperformance/archive/2007/09/27/back-in-the-saddle.aspx</id><published>2007-09-28T04:19:00Z</published><updated>2007-09-28T04:19:00Z</updated><content type="html">&lt;P&gt;The BizTalk Server Performance blog has been a little quite of late, but all that is about to change.&amp;nbsp; We have a new release out of the door in BizTalk Server 2006 R2, and the team is fired up to give our customers the best advice to squeeze as much as possible out of their BizTalk solutions!&lt;/P&gt;
&lt;P&gt;Leave us a comment if you have any areas of the product you think the Performance team should be writing about.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;- Bill Ticehurst&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG title="R2 logo" style="WIDTH: 310px; HEIGHT: 53px" height=53 alt="R2 logo" src="http://biztalkperformance.members.winisp.net/images/r2.png" width=310 mce_src="http://biztalkperformance.members.winisp.net/images/r2.png"&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5176486" width="1" height="1"&gt;</content><author><name>BizTalkPerf</name><uri>http://blogs.msdn.com/BizTalkPerf/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Some Links To BizTalk 2006 Performance</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/biztalkperformance/archive/2006/10/20/the-biztalk-performance-blog-revived.aspx" /><id>http://blogs.msdn.com/b/biztalkperformance/archive/2006/10/20/the-biztalk-performance-blog-revived.aspx</id><published>2006-10-20T19:00:00Z</published><updated>2006-10-20T19:00:00Z</updated><content type="html">&lt;FONT face=Calibri&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;With BTS2006 in full force, the BTS team is frequently fielding performance related questions. There is a lot of information already available for customers to reference; the &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/library/en-us/BTS06CoreDocs/html/9a7c3e7e-df6d-4ec2-9879-cb234386cd71.asp" mce_href="http://msdn.microsoft.com/library/en-us/BTS06CoreDocs/html/9a7c3e7e-df6d-4ec2-9879-cb234386cd71.asp"&gt;&lt;FONT size=3&gt;product documentation&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3&gt; is a great place to start. &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;The Performance and Capacity section in the core docs covers a wide range of topics. The &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/library/en-us/BTS06CoreDocs/html/52ae9037-a7af-48e4-b6a3-bff7600802de.asp" mce_href="http://msdn.microsoft.com/library/en-us/BTS06CoreDocs/html/52ae9037-a7af-48e4-b6a3-bff7600802de.asp"&gt;&lt;FONT size=3&gt;64-Bit Support article&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3&gt; delves into components of BizTalk that are supported in 64 bit and also answers some basic FAQ regarding this topic. &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;There is a section that covers planning for &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/library/en-us/BTS06CoreDocs/html/907e850c-26a4-41ec-9ef7-3a8706147578.asp" mce_href="http://msdn.microsoft.com/library/en-us/BTS06CoreDocs/html/907e850c-26a4-41ec-9ef7-3a8706147578.asp"&gt;&lt;FONT size=3&gt;sustained performance&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3&gt;.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It contains articles that provide useful guidance on &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/library/en-us/BTS06CoreDocs/html/422f05e3-5ad4-4f47-9be3-c229a20a6ef3.asp" mce_href="http://msdn.microsoft.com/library/en-us/BTS06CoreDocs/html/422f05e3-5ad4-4f47-9be3-c229a20a6ef3.asp"&gt;&lt;FONT size=3&gt;how to include performance considerations&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3&gt; during the design, implementation and release phases of BTS2K6 design. It also highlights how to set realistic &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/library/en-us/BTS06CoreDocs/html/4b18b976-7714-431f-8976-f40a1016d5f3.asp" mce_href="http://msdn.microsoft.com/library/en-us/BTS06CoreDocs/html/4b18b976-7714-431f-8976-f40a1016d5f3.asp"&gt;&lt;FONT size=3&gt;performance goals&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3&gt; and how to &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/library/en-us/BTS06CoreDocs/html/d83f734f-1a44-4da0-a755-45ba204cadaf.asp" mce_href="http://msdn.microsoft.com/library/en-us/BTS06CoreDocs/html/d83f734f-1a44-4da0-a755-45ba204cadaf.asp"&gt;&lt;FONT size=3&gt;measure them&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3&gt;. The documentation also contains guidance on &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/library/en-us/BTS06CoreDocs/html/e2acbaa4-29d3-4c89-ac1f-c0641cfa0442.asp" mce_href="http://msdn.microsoft.com/library/en-us/BTS06CoreDocs/html/e2acbaa4-29d3-4c89-ac1f-c0641cfa0442.asp"&gt;&lt;FONT size=3&gt;scaling solutions&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3&gt; as well as tips and tricks to &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/library/en-us/BTS06CoreDocs/html/6d5ba14e-03af-4b7d-893b-7b46dd4e4a16.asp" mce_href="http://msdn.microsoft.com/library/en-us/BTS06CoreDocs/html/6d5ba14e-03af-4b7d-893b-7b46dd4e4a16.asp"&gt;&lt;FONT size=3&gt;improve performance&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3&gt;.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;In addition to this, there is a paper available on how to manage a successful performance lab &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyID=60e8c48e-2139-40d0-98fa-78233b3b64cf&amp;amp;displaylang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=60e8c48e-2139-40d0-98fa-78233b3b64cf&amp;amp;displaylang=en"&gt;&lt;FONT size=3&gt;here&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3&gt;. &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;Once a solution is deployed, there are also articles in msdn that cover the &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/library/en-us/BTS06CoreDocs/html/bdc64017-c74e-4cf0-8769-d27e60161439.asp" mce_href="http://msdn.microsoft.com/library/en-us/BTS06CoreDocs/html/bdc64017-c74e-4cf0-8769-d27e60161439.asp"&gt;&lt;FONT size=3&gt;performance counters&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3&gt; available in BizTalk to &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/library/en-us/BTS06CoreDocs/html/d8b93243-e383-4c21-9c08-073a0d4f79be.asp" mce_href="http://msdn.microsoft.com/library/en-us/BTS06CoreDocs/html/d8b93243-e383-4c21-9c08-073a0d4f79be.asp"&gt;&lt;FONT size=3&gt;detect bottlenecks&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;And if you just want to look at hard numbers, a &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyID=fdae55db-184b-4d93-ad79-a113b5268ee2&amp;amp;DisplayLang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=fdae55db-184b-4d93-ad79-a113b5268ee2&amp;amp;DisplayLang=en"&gt;&lt;FONT size=3&gt;comparative adapter study&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3&gt; compares the performance of BizTalk Server 2004 against BizTalk Server 2006 adapters.&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=849805" width="1" height="1"&gt;</content><author><name>BizTalkPerf</name><uri>http://blogs.msdn.com/BizTalkPerf/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>BizTalk Server 2006 Documentation Now Available</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/biztalkperformance/archive/2006/03/09/546710.aspx" /><id>http://blogs.msdn.com/b/biztalkperformance/archive/2006/03/09/546710.aspx</id><published>2006-03-09T04:00:00Z</published><updated>2006-03-09T04:00:00Z</updated><content type="html">&lt;P&gt;Curious about BizTalk Server 2006 features and functionality?&amp;nbsp; A preview of the final product documentation in .chm format&amp;nbsp;is available here: &lt;A HREF="/luke/archive/2006/02/03/524534.aspx"&gt;http://blogs.msdn.com/luke/archive/2006/02/03/524534.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Check out the performance content under the topic "&lt;EM&gt;Planning for Sustained Performance&lt;/EM&gt;".&amp;nbsp; Under this topic, we provide maximum sustainable throughput numbers with and without tracking, plus tips and tricks, scaling guidence, project planning, throttling, and more!&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=546710" width="1" height="1"&gt;</content><author><name>BizTalkPerf</name><uri>http://blogs.msdn.com/BizTalkPerf/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>New BizTalk Load Generation Tool Now Available</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/biztalkperformance/archive/2005/08/27/457006.aspx" /><id>http://blogs.msdn.com/b/biztalkperformance/archive/2005/08/27/457006.aspx</id><published>2005-08-27T05:40:00Z</published><updated>2005-08-27T05:40:00Z</updated><content type="html">&lt;H4&gt;Overview&lt;/H4&gt;
&lt;DIV class=DetailsContent id=overview&gt;This tool is intended for developers and IT professionals to simulate load on a BizTalk Server. Using this tool, you can simulate load to instrument performance and stress against a BizTalk deployment. In addition, this tool may also be extended by developers to simulate load for custom transports. &lt;B&gt;This tool should be used in a test environment only, and should not be used in a production environment. This tool is provided "as-is" and is not supported.&lt;/B&gt;&lt;/DIV&gt;
&lt;DIV class=DetailsContent&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=DetailsContent&gt;&lt;STRONG&gt;Download LoadGen Here: &lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyId=C2EE632B-41C2-42B4-B865-34077F483C9E&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyId=C2EE632B-41C2-42B4-B865-34077F483C9E&amp;amp;displaylang=en&lt;/A&gt; &lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV class=DetailsContent&gt;&amp;nbsp;&lt;/DIV&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=457006" width="1" height="1"&gt;</content><author><name>BizTalkPerf</name><uri>http://blogs.msdn.com/BizTalkPerf/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Get Connected to Free Product Support and Tremendous Online Collaboration</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/biztalkperformance/archive/2005/07/14/438866.aspx" /><id>http://blogs.msdn.com/b/biztalkperformance/archive/2005/07/14/438866.aspx</id><published>2005-07-14T20:51:00Z</published><updated>2005-07-14T20:51:00Z</updated><content type="html">&lt;DIV&gt;
&lt;P class=MsoNormal style="TEXT-ALIGN: justify"&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;Have you ever wanted to speak to Microsoft developers of a specific feature of&amp;nbsp;BizTalk Server? I am sure your answer was “&lt;I&gt;&lt;SPAN style="FONT-STYLE: italic"&gt;Yes let me at them&lt;/SPAN&gt;&lt;/I&gt;”, so the Business Process Integration Division is extending an invitation to all customers to join our key feature developers, program managers, and testers in the following newsgroups:&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face="Times New Roman" size=3&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;UL type=disc&gt;
&lt;LI class=MsoNormal style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1"&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;microsoft.public.biztalk.accelerator.forsuppliers&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;UL type=disc&gt;
&lt;LI class=MsoNormal style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1"&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;microsoft.public.biztalk.newuser&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;UL type=disc&gt;
&lt;LI class=MsoNormal style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1"&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;microsoft.public.biztalk.accelerator.rosettanet&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;UL type=disc&gt;
&lt;LI class=MsoNormal style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1"&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;microsoft.public.biztalk.admin&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;UL type=disc&gt;
&lt;LI class=MsoNormal style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1"&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;microsoft.public.biztalk.appintegration&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;UL type=disc&gt;
&lt;LI class=MsoNormal style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1"&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;microsoft.public.biztalk.framework&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;UL type=disc&gt;
&lt;LI class=MsoNormal style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1"&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;microsoft.public.biztalk.general&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;UL type=disc&gt;
&lt;LI class=MsoNormal style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1"&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;microsoft.public.biztalk.library&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;UL type=disc&gt;
&lt;LI class=MsoNormal style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1"&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;microsoft.public.biztalk.nonxml&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;UL type=disc&gt;
&lt;LI class=MsoNormal style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1"&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;microsoft.public.biztalk.orchestration&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;UL type=disc&gt;
&lt;LI class=MsoNormal style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1"&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;microsoft.public.biztalk.sdk&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;UL type=disc&gt;
&lt;LI class=MsoNormal style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1"&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;microsoft.public.biztalk.server&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;UL type=disc&gt;
&lt;LI class=MsoNormal style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1"&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;microsoft.public.biztalk.setup&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;UL type=disc&gt;
&lt;LI class=MsoNormal style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1"&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;microsoft.public.biztalk.tools&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;UL type=disc&gt;
&lt;LI class=MsoNormal style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1"&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;microsoft.public.biztalk.xlangs&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;UL type=disc&gt;
&lt;LI class=MsoNormal style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1"&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;microsoft.public.biztalk.xsharp&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;We’ve been working very hard over the past year to connect with folks just like you and want to include you in our community of Most Valuable Professionals (MVP), developers, information technology professionals, chief information officers, chief executive officers, or any other role within large, medium, and small companies that hang out in our online newsgroup communities. We want to have you join in this vibrant online community to ask those questions you always wanted to ask but did not know where to go. Well, now you know where to go, we want you to come on in and join us!&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="TEXT-ALIGN: justify"&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="TEXT-ALIGN: justify"&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;If you are new to BizTalk Server, try out the NewUser newsgroup, Microsoft.public.biztalk.newuser. &lt;/SPAN&gt;&lt;/FONT&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="TEXT-ALIGN: justify"&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="TEXT-ALIGN: justify"&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;We’re offering two levels of interaction with Microsoft Corporation employees as follows:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="TEXT-ALIGN: justify"&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;OL style="MARGIN-TOP: 0in" type=1&gt;
&lt;LI class=MsoNormal style="TEXT-ALIGN: justify; mso-list: l2 level1 lfo2"&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;Managed Newsgroup Support&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt; 
&lt;LI class=MsoNormal style="TEXT-ALIGN: justify; mso-list: l2 level1 lfo2"&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;Unmanaged Newsgroup Support&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt; &lt;/LI&gt;&lt;/OL&gt;
&lt;H2 style="MARGIN-BOTTOM: 3pt; MARGIN-LEFT: 0in; MARGIN-RIGHT: 0in; mso-margin-top-alt: 12.0pt"&gt;&lt;EM&gt;&lt;B&gt;&lt;I&gt;&lt;FONT face=Arial size=5&gt;&lt;SPAN style="FONT-SIZE: 18pt; FONT-FAMILY: Arial"&gt;Managed Newsgroup Support&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;/B&gt;&lt;/EM&gt;&lt;FONT face=Arial&gt;&lt;SPAN style="FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/H2&gt;
&lt;P class=MsoNormal style="TEXT-ALIGN: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;MSDN managed newsgroups are available in English to MSDN Universal, Enterprise, Professional and Operating Systems subscribers to receive free technical support on select Microsoft technologies as well as to share ideas with other subscribers. MSDN managed newsgroups provide:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;UL type=disc&gt;
&lt;LI class=MsoNormal style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo3"&gt;&lt;B&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;Unlimited on-line technical support&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt; - keep your PSS incidents &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;
&lt;LI class=MsoNormal style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo3"&gt;&lt;B&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;A commitment to respond to your post&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt; within two business days &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;
&lt;LI class=MsoNormal style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo3"&gt;&lt;B&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;Over 200 newsgroups&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt; to choose from &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;
&lt;LI class=MsoNormal style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo3"&gt;&lt;B&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;Spam protection&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt; for your e-mail address when posting items&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt; &lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;Go to the following URL to sign up: &lt;A title=http://msdn.microsoft.com/newsgroups/managed href="http://msdn.microsoft.com/newsgroups/managed"&gt;http://msdn.microsoft.com/newsgroups/managed&lt;/A&gt; .&amp;nbsp; These newsgroups are monitored by Microsoft support engineers and product group team member as described above.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;H2 style="MARGIN-BOTTOM: 3pt; MARGIN-LEFT: 0in; MARGIN-RIGHT: 0in; mso-margin-top-alt: 12.0pt"&gt;&lt;EM&gt;&lt;B&gt;&lt;I&gt;&lt;FONT face=Arial size=5&gt;&lt;SPAN style="FONT-SIZE: 18pt; FONT-FAMILY: Arial"&gt;Unmanaged Newsgroup Support&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;/B&gt;&lt;/EM&gt;&lt;FONT face=Arial&gt;&lt;SPAN style="FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/H2&gt;
&lt;P class=MsoNormal style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;MSDN unmanaged newsgroups are available to all individuals. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="TEXT-ALIGN: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;Go to the following URL to participate: &lt;A title=http://msdn.microsoft.com/newsgroups href="http://msdn.microsoft.com/newsgroups"&gt;http://msdn.microsoft.com/newsgroups&lt;/A&gt;. These newsgroups are monitored by Microsoft product group members, other customers like you, most valuable professionals, and various other individuals.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face="Times New Roman" size=3&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;Questions, suggestions, and direct feedback can be sent to me.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face="Times New Roman" size=3&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face="Times New Roman" size=3&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;James Fort&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face="Times New Roman" size=3&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;BPI Community Lead&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face="Times New Roman" size=3&gt;&lt;SPAN style="FONT-SIZE: 12pt"&gt;&lt;A title=mailto:jfort@microsoft.com href="mailto:jfort@microsoft.com"&gt;mailto:jfort@microsoft.com&lt;/A&gt;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=438866" width="1" height="1"&gt;</content><author><name>BizTalkPerf</name><uri>http://blogs.msdn.com/BizTalkPerf/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Memory Growth in BizTalk Messaging</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/biztalkperformance/archive/2005/04/16/408866.aspx" /><id>http://blogs.msdn.com/b/biztalkperformance/archive/2005/04/16/408866.aspx</id><published>2005-04-16T16:03:00Z</published><updated>2005-04-16T16:03:00Z</updated><content type="html">&lt;P&gt;By Kartik Paramasivam and Raied Malhas&lt;/P&gt;
&lt;P&gt;In this document we&amp;nbsp;list&amp;nbsp;various reasons that might lead BizTalk to get into an Out Of Memory situation and then suggest mitigations/solutions for such conditions.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;1.&amp;nbsp; Introduction to BizTalk Hosts:&lt;/STRONG&gt; &lt;BR&gt;Before discussing Out of Memory conditions, let us talk about hosts and how adapters are mapped to hosts.&lt;/P&gt;
&lt;P&gt;Adapters (receive and send) and orchestrations run under the BizTalk NT Service.&amp;nbsp;&amp;nbsp; An instance of the BizTalk NT Service is called a host instance. There can also be receive adapters (HTTP/SOAP) which can run under in any other process (e.g. IIS) instead of the BizTalk NT Service. Such adapters are called isolated adapters. &lt;BR&gt;Hosts in BizTalk have 1 or more host instances (process). The default BizTalk installation has 2 hosts. &lt;BR&gt;1)&amp;nbsp;Default host&lt;BR&gt;2)&amp;nbsp;Isolated Host. &lt;/P&gt;
&lt;P&gt;Note: You can only have 1 host instance per host on a given server.&lt;/P&gt;
&lt;P&gt;The following is the mapping between end points (receive or send port) and hosts:&lt;BR&gt;Send Port -&amp;gt; Send Handler -&amp;gt; Send Host&lt;BR&gt;Receive location -&amp;gt; Receive Handler-&amp;gt; Receive Host&lt;/P&gt;
&lt;P&gt;Typically you should create separate receive hosts for receive adapters and send hosts for all send adapters.&amp;nbsp; Doing this gives each adapter a separate process to live in. This guarantees that one adapter will not adversely affect another. Also if your BizTalk host/process goes Out of Memory, you will know which components are running in that process.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;2. The Obvious Suspects for Out of Memory conditions:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;When the process goes Out Of Memory (OOM), you need to 1st find out what components are running in that process.&amp;nbsp; If possible,&amp;nbsp; follow the recommendations listed above for separating out receive/send adapters and orchestrations into different hosts.&amp;nbsp; Once you have done that then you can check if one of the following 3 conditions exists in the process that is going OOM.&lt;/P&gt;
&lt;P&gt;1)&amp;nbsp;You are executing transforms/maps on relatively large messages in receive/send port or XLANG. The point here is that XSL transforms load the whole message in memory to transform them.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Solution 1: Decrease the number of messages that your process operates on concurrently (section on Send Host below might give you some idea).&lt;BR&gt;Solution 2: Decrease the size of your XML message that you are trying to transform.&lt;/P&gt;
&lt;P&gt;2)&amp;nbsp;You are executing XML receive/send pipeline on a document that contains one or more items such as the following:&lt;BR&gt;-&amp;nbsp;Large attribute values&lt;BR&gt;-&amp;nbsp;Large element values&lt;BR&gt;-&amp;nbsp;Large attribute or element tags.&lt;/P&gt;
&lt;P&gt;If one of the above applies to your XML document then that item is fully loaded in memory. &lt;/P&gt;
&lt;P&gt;Solution 1: Try to limit the size of the above entities.&lt;BR&gt;Solution 2: If you can’t limit the size, then make sure your process doesn’t concurrently operate on multiple documents. (See sections below on limiting concurrency)&lt;/P&gt;
&lt;P&gt;3)&amp;nbsp;You have a custom pipeline component or adapter, which loads the whole document in memory.&amp;nbsp; Most of the components shipped with BizTalk (except transforms) support streaming as opposed to loading the whole document in memory, and hence have a low memory foot print. However, we have observed that custom pipeline components written by customers may or may not support streaming.&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;3. Out of Memory in Send Host:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The Send Host of BizTalk Adapters can run Out of Memory when it is processing a large number of messages (i.e. when the system is under high stress loads). This can cause the Send Host memory utilization to rise rapidly causing the system to get into an Out Of Memory condition. Usually, the larger the messages being processed the faster the memory utilization of BizTalk’s SendHost process will be.&lt;/P&gt;
&lt;P&gt;Calculating the Maximum number of messages that will be loaded in-memory by BizTalk’s Send Host process:&lt;BR&gt;Under high stress loads, the BizTalk send host process&amp;nbsp; will load as many instances of messages into memory as it can until the number of messages exceeds the “HighWatermark”.&amp;nbsp; By default in BizTalk Server 2004, SP1, this value is 200 for messaging.&amp;nbsp; Below you’ll learn how to configure this value, more details on Watermark settings are available in the “BizTalk Server Performance Characteristics” document at: &lt;A href="http://www.gotdotnet.com/team/wsservers/"&gt;http://www.gotdotnet.com/team/wsservers/&lt;/A&gt;). So, if you have a Dual processor server that is processing a large number of messages, the BizTalk host will load a maximum of:&lt;BR&gt;[HighWatermark Value] * NumberOfProcessors&lt;BR&gt;= 200 * 2 &lt;BR&gt;= 400 messages in-memory&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;For a Hyper-threaded server:&lt;BR&gt;If you have a hyper-threaded server, then the number of processors perceived by the BizTalk send host doubles the actual number of processors. So if you had a dual processor BizTalk server and if we assume that the default value for the maximum number of message instances processed at once is 200 (so, ”HighWatermark” value is equal to 200), then the BizTalk process hosting the Send Host will load a maximum of:&lt;BR&gt;[HighWatermark Value]*[NumberOfProcessors for a Hyper-threaded machine]&lt;BR&gt;= 200 * [NumberOfProcessors * 2]&lt;BR&gt;= 200 * [2 * 2]&lt;BR&gt;= 200 * 4&lt;BR&gt;= 800 messages in-memory&lt;/P&gt;
&lt;P&gt;So, in a case where you have a dual processor hyper-threaded BizTalk server with 2GigaBytes of RAM that’s under high stress, there is a possibility that SendHost will get into an Out of Memory state. The process in this case will be loading 800 messages (as calculated above) in memory. The following graph shows an example of such a case where the memory usage of the send host process grew very rapidly to 1.5 Giga Bytes in less than 15 minutes: 
&lt;P class=MsoNormal style="MARGIN-LEFT: 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;IMG height=396 src="http://biztalkperformance.members.winisp.net/images/OOMimage001.jpg" width=570 border=0&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;Graph1: An example of a test that hit an Out of Memory condition in a SendHost containing FILE Adapter 
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Note: The memory footprints of BizTalk hosts can be monitored using Performance Monitor to view “Private Bytes” counter for the required host (receive, send, etc…) instance under the “Process” object.&lt;/P&gt;
&lt;P&gt;Note: On a 32 bit box, the process can only grow to around 1.5 GB Max (2 GB in some rare cases) even if you have more physical memory to spare (i.e. 8 GB RAM for e.g.) &lt;/P&gt;
&lt;P&gt;&lt;BR&gt;How to avoid Out of Memory in the SendHost:&lt;BR&gt;Fortunately, the Out of Memory condition can be avoided by configuring the setting that controls the maximum number of messages that can be loaded into memory concurrently. &lt;/P&gt;
&lt;P&gt;To configure the maximum number of message instances, in BizTalk’s Management Database (default name is: “BizTalkMgmtDB”), open the “adm_ServiceClass” table. You’ll see for “Messaging InProcess” row, by default, the value for LowWatermark is set to 100 and for HighWatermark to 200. The HighWatermark value is what dictates the maximum number of message instances that can be loaded in-memory of the Send Host process. Change the Low and High Watermark values to lower numbers, an example of lowered values are:&lt;BR&gt;LowWatermark = 25&lt;BR&gt;HighWatermark = 50&lt;/P&gt;
&lt;P&gt;If those values (25-50) still show OOM conditions, you should decrease those values more until you stop hitting the Out of Memory condition.&lt;/P&gt;
&lt;P&gt;The following graph shows an example of the same test case that the graph above shows. In the graph below, the Low and HighWatermark values were changed to 25-50, respectively. Please note how the memory remained constant without growing to get into an Out of Memory:&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN class=msoIns&gt;&lt;INS cite=mailto:Raied%20Malhas dateTime=2005-04-15T17:07&gt;&lt;IMG height=397 src="http://biztalkperformance.members.winisp.net/images/OOMimage002.jpg" width=576 border=0&gt;&lt;/INS&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;Graph2: An example of a test that avoided hitting an Out of Memory in a SendHost containing FILE Adapter&lt;/P&gt;
&lt;P&gt;Note: Decreasing the Watermark values can decrease Performance. So, only decrease those values if you run into an Out of Memory condition.&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;STRONG&gt;4. Out of Memory in Receive Hosts:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;It is fairly rare to see a host containing a receive adapter to go out of memory. If that happens it is typically due to one of the cases listed in section 2.&lt;/P&gt;
&lt;P&gt;If none of the suggested recommendations in Section 2 can be performed, then reducing the number of messages processed concurrently can help protect the receive host from getting into an out of memory condition.&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Note: Remember however that by doing so, we decrease the concurrency and hence the throughput/performance will decrease.&lt;/P&gt;
&lt;P&gt;1)&amp;nbsp;Reduce the messaging engine thread pool size:&amp;nbsp; A user can control the number of threads used by the messaging engine to publish messages into the message box.&amp;nbsp; By reducing the number of threads used by the messaging engine we reduce the rate at which the receive adapter will receive messages into the message box.&amp;nbsp; Remember this setting only needs to be done for the host corresponding to the receive handler for the adapter.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;By default the messaging engine creates 10 threads/cpu for &lt;BR&gt;publishing messages. &lt;/P&gt;
&lt;P&gt;To specify the messaging thread pool size&lt;BR&gt;1.&amp;nbsp;Click Start, and then click Run.&lt;BR&gt;2.&amp;nbsp;In the Run dialog box, in the Open box, type regedit, and then click OK.&lt;BR&gt;3.&amp;nbsp;In Registry Editor, expand HKEY_LOCAL_MACHINE, expand SYSTEM, expand CurrentControlSet, expand Services, right-click BTSSvc* (you would first need to determine which of the BTSSvc* regkeys correspond to the host corresponding to the receive handler), point to New, click DWORD Value, type MessagingThreadPoolSize, and then press ENTER.&lt;BR&gt;4.&amp;nbsp;In Registry Editor, double-click MessagingThreadPoolSize.&lt;BR&gt;In the Edit DWORD Value dialog box, in the Value data box, type a number between 1 and 30, and then click OK.&lt;/P&gt;
&lt;P&gt;5. Note for Custom Adapters:&lt;/P&gt;
&lt;P&gt;If you have verified all of the above conditions and if you think your custom receive/send adapter is causing the OOM conditions, then you need to look at the source code of your adapter and verify the following:&lt;/P&gt;
&lt;P&gt;The following only applies to Adapters written in Managed code:&lt;BR&gt;The adapters get an object of type IBTTransportBatch using the GetBatch() API on the TransportProxy object. Once the adapter is done using the IBTTransportBatch object the adapter needs to do a Marshal.ReleaseComObject( batch) in a loop to release the object.&lt;/P&gt;
&lt;P&gt;Basically the .net GarbageCollector does not kick in in time to release the unmanaged memory.&amp;nbsp; Hence failure to call ReleaseComObject() will result in what looks like a memory leak.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=408866" width="1" height="1"&gt;</content><author><name>BizTalkPerf</name><uri>http://blogs.msdn.com/BizTalkPerf/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Understanding BizTalk Server 2004 SP1 Throughput and Capacity</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/biztalkperformance/archive/2005/04/07/406343.aspx" /><id>http://blogs.msdn.com/b/biztalkperformance/archive/2005/04/07/406343.aspx</id><published>2005-04-07T20:05:00Z</published><updated>2005-04-07T20:05:00Z</updated><content type="html">&lt;DIV class=Section1&gt;
&lt;P class=MsoNormal&gt;By Wayne Clark&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;What is Sustainable?&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;Of primary concern when planning, designing, and testing business solutions built on BizTalk Server 2004 SP1 is that the solutions must be able to handle the expected load and meet required service levels over an indefinite period of time.&amp;nbsp; Given the number of solution architectures, configurations, and topologies possible on BizTalk Server 2004 SP1, there are many things to consider when evaluating a proposed or existing deployment.&amp;nbsp; The purpose of this, our inaugural BizTalk Performance blog posting, is to provide guidance on:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal&gt;Understanding BizTalk Server SP1 throughput and backlog capacity behavior and how to observe the behavior of your system. &lt;/DIV&gt;
&lt;LI class=MsoNormal&gt;Critical success factors when planning for capacity. &lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal&gt;Let me start off by defining some terms and concepts:&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;Maximum Sustainable throughput&lt;I&gt; &lt;/I&gt;&lt;/B&gt;is the highest load of message traffic that a system can handle indefinitely &lt;I&gt;in production&lt;/I&gt;.&amp;nbsp; Typically this is measured and represented as messages processed per unit time.&amp;nbsp; Solution design choices such as the choice of adapters, pipeline components, orchestrations, and maps will all have a direct effect on system performance.&amp;nbsp; In addition, BizTalk offers scale-up and scale-out options that provide flexibility when sizing a system.&amp;nbsp; Often overlooked, however, are things like standard operations, monitoring, and maintenance activities that have an indirect effect on sustainable throughput.&amp;nbsp; For example, Performing queries against the messagebox database (e.g., from HAT) will require cycles from SQL and effect overall throughput depending on the type and frequency of the query.&amp;nbsp; Backup, archiving, and purging activities on the database also have an indirect effect on throughput, and so on.&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;Engine Capacity&lt;/B&gt;, also known as &lt;I&gt;backlog capacity&lt;/I&gt;, is the number of messages that have been received into the messagebox, but have not yet been processed and removed from the messagebox.&amp;nbsp; This is easily measured as the number of rows in the messagebox database table named &lt;I&gt;spool&lt;/I&gt;.&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;BizTalk Server 2004 SP1 Backlog Behavior&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;BizTalk 2004 SP1 implements a variety of store-and-forward capabilities for messaging and long and short running orchestrations.&amp;nbsp; The messagebox database, implemented on SQL server, provides the storage for in-flight messages and orchestrations.&amp;nbsp; As messages are received by BizTalk 2004 SP1, they are en-queued, or &lt;I&gt;published&lt;/I&gt; into the messagebox database so they can be picked up by &lt;I&gt;subscribers&lt;/I&gt; to be processed.&amp;nbsp; Subscribers include send ports and orchestrations.&amp;nbsp; Some of the arriving messages activate new subscriber instances.&amp;nbsp; Other messages arrive and are routed, via a correlation subscription, to a waiting instance of an already running subscriber such as a correlated orchestration.&amp;nbsp; &lt;/P&gt;
&lt;P class=MsoNormal&gt;In order for correlated orchestrations to continue processing, arriving correlated messages must not be blocked.&amp;nbsp; To facilitate this, BizTalk does its best to make sure messages (both activating and correlated) continue to be received, even under high load, so that subscribers waiting for correlated messages can finish and make room for more processes to run.&amp;nbsp; This means it is possible to receive messages faster than they can be processed and removed from the messagebox, thus building up a backlog of in-process messages.&amp;nbsp; Being a store-and-forward technology, it is only natural for BizTalk to provide this type of buffering.&lt;/P&gt;
&lt;P class=MsoNormal&gt;Every message that is received by, or created within, BizTalk 2004 SP1 is immutable.&amp;nbsp; That is, once it has been received or created, its content cannot be changed.&amp;nbsp; In addition, received messages may have multiple subscribers.&amp;nbsp; Each subscriber of a particular message, references the same, single copy of that message.&amp;nbsp; While this approach minimizes storage, a ref-count must be kept for each message and garbage-collection must be performed periodically to get rid of those messages that have a ref count of 0.&amp;nbsp; There are a set of SQL Agent jobs in BizTalk 2004 SP1 that perform garbage collection for messages:&lt;/P&gt;
&lt;UL&gt;
&lt;LI class=MsoNormal&gt;&lt;B&gt;MessageBox_Message_Cleanup_BizTalkMsgBoxDb &lt;/B&gt;– Removes all messages that are no longer being referenced by any subscribers. 
&lt;LI class=MsoNormal&gt;&lt;B&gt;MessageBox_Parts_Cleanup_BizTalkMsgBoxDb – &lt;/B&gt;Removes all message parts that are no longer being referenced by any messages.&amp;nbsp; All messages are made up of one or more message parts, which contain the actual message data. 
&lt;LI class=MsoNormal&gt;&lt;B&gt;PurgeSubscriptionsJob_BizTalkMsgBoxDb – &lt;/B&gt;Removes unused subscription predicates left over from things like correlation subscriptions. 
&lt;LI class=MsoNormal&gt;&lt;B&gt;MessageBox_DeadProcesses_Cleanup_BizTalkMsgBoxDb – &lt;/B&gt;Called when BizTalk detects that a BTS server has crashed and releases the work that that server was working on so another machine can pick that work up. 
&lt;LI class=MsoNormal&gt;&lt;B&gt;TrackedMessages_Copy_BizTalkMsgBoxDb – &lt;/B&gt;Copies tracked message bodies from the engine spool tables into the tracking spool tables in the messagebox database. 
&lt;LI class=MsoNormal&gt;&lt;B&gt;TrackingSpool_Cleanup_BizTalkMsgBoxDb &amp;shy;– &lt;/B&gt;Flips which table TrackedMessages_Copy_BizTalkMsgBoxDb job writes to. &lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal&gt;The first two from the above list are the ones responsible for keeping the messagebox cleared of garbage messages on a regular basis.&amp;nbsp; To do their work, they sort through the messages and message parts looking for messages with a ref count of 0 and for parts that are not referenced by any messages, respectively, and removing them.&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;So, what does all this have to do with throughput and capacity?&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;When a system is at steady state, that is, processing and collecting garbage as fast as messages are received, this is clearly indefinitely sustainable.&amp;nbsp; However, if for some length of time the system is receiving faster than it can process and remove, messages start to build up in the messagebox.&amp;nbsp; As the amount of this backlog builds up, the amount of work that the cleanup jobs have to do increases and they typically start taking longer and longer to complete.&amp;nbsp; In addition, the cleanup jobs are configured to be low priority in the event of a deadlock.&amp;nbsp; As a result, when running under high load, the cleanup jobs may start to fail as the result of being the victim of deadlocks.&amp;nbsp; This allows the messages being en-queued to have precedence and not be blocked.&lt;/P&gt;
&lt;P class=MsoNormal&gt;As an example, let’s take a look at a system that we have driven at various throughput levels and investigate the observed behavior.&amp;nbsp; The system is configured as follows:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal&gt;&lt;B&gt;Two BizTalk Servers – &lt;/B&gt;These servers are HP DL380 G3, equipped with dual 3GHz processors with 2GB of RAM.&amp;nbsp; BizTalk 2004 SP1 is running on these two servers.&amp;nbsp; Local Disks. &lt;/DIV&gt;
&lt;LI class=MsoNormal&gt;&lt;B&gt;One SQL Server Messagebox – &lt;/B&gt;This server is an HP DL580 G2, equipped with quadruple 1.6GHz processors with 4GB of RAM.&amp;nbsp; This server is connected to a fast SAN disk subsystem via fiber.&amp;nbsp; The server is dedicated to the messagebox database and the data and transaction log files for the messagebox database are on separate SAN LUNs. 
&lt;LI class=MsoNormal&gt;&lt;B&gt;One SQL Server All Other Databases – &lt;/B&gt;This server is an HP DL580 G2, equipped with quadruple 1.6Ghz processors with 2GB of RAM.&amp;nbsp; This server is also connected to the SAN.&amp;nbsp; This server houses all BizTalk databases other than the messagebox, including the management, SSO, DTA, and BAM databases. 
&lt;LI class=MsoNormal&gt;&lt;B&gt;Load Driver Server – &lt;/B&gt;This server is an HP DL380 G3, equipped with dual 3GHz processors with 2GB of RAM.&amp;nbsp; This server was used to generate the load for testing the system using an internally developed load generation.&amp;nbsp; This tool was used to send copies of a designated file to shares on the BizTalk servers to be picked up by the file adapter. &lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;The Test Scenario&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;The test scenario is very simple. The load generation tool distributes copies of the input file instance evenly across shares on both BizTalk servers.&amp;nbsp; Using the file adapter (we’ll explore other adapters in subsequent blog entries), files are picked up from the local share and en-queued into the messagebox.&amp;nbsp; A simple orchestration containing one receive and one send shape, subscribes to each received message.&amp;nbsp; Messages sent back into the messagebox by the orchestration are picked up by a file send port and sent to a common share, defined on the SAN.&amp;nbsp; Files arriving on the output SAN share are immediately deleted in order to avoid file buildup on that share during long test runs.&lt;/P&gt;
&lt;P class=MsoNormal&gt;There are 4 hosts defined for the scenario, one to host the receive location, one to host orchestrations, one to host the send port, and one to host tracking.&amp;nbsp; For the purposes of observing engine backlog behavior, tracking is completely turned off during the test runs.&amp;nbsp; Turning tracking off involves more than just stopping (or not creating) and tracking host instance.&amp;nbsp; To turn tracking completely off, use the WMI property MSBTS_GroupSetting.GlobalTrackingOption.&amp;nbsp; For more information on turning tracking on and off using this property, please see: &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sdk/htm/ebiz_sdk_wmi_msbts_groupsetting_fqxz.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sdk/ht m/ebiz_sdk_wmi_msbts_groupsetting_fqxz.asp&lt;/A&gt;. &amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;Both BizTalk servers are identical in that they each have instances of the receive host, orchestration host, and send host.&amp;nbsp; No instances of the tracking host were created since tracking was turned off to isolate core messagebox behavior for these tests.&lt;/P&gt;
&lt;P class=MsoNormal&gt;A simple schema was used and the instance files used for the test were all 8KB in size.&amp;nbsp; No mapping or pipeline components were used inbound or outbound in order to keep the test scenario simple to implement and keep the behavior observations focused on the messagebox.&lt;/P&gt;
&lt;P class=MsoNormal&gt;As a first step, the system is driven at a level near, but below, it’s maximum sustainable throughput so that observations of a healthy system can be made.&amp;nbsp; The growth rate of the messagebox backlog is a key indicator of sustainability.&amp;nbsp; Clearly, the messagebox cannot continue to grow indefinitely without eventually running into problems.&amp;nbsp; So, the depth of the messagebox database backlog, monitored over time, is used to evaluate sustainability.&amp;nbsp; The messagebox table named &lt;I&gt;spool&lt;/I&gt; contains a record for each message in the system (active or waiting to be garbage collected).&amp;nbsp; Monitoring the number of rows in this table, and the number of messages received per second, while increasing system load provides an easy way to find the maximum sustainable throughput.&amp;nbsp; Simply increase the input load until either (a) the spool table starts to grow indefinitely or (b) the number of messages received per second plateaus, whichever comes first, and that is your maximum sustainable throughput.&amp;nbsp; Note that if you are not able to drive a high enough load to cause the spool table to grow indefinitely, it simply means that the slowest part of your system is on the receive side, rather than the processing/send side.&amp;nbsp; The following graph shows key indicators after using this approach to find the maximum sustainable throughput of our test system (described above).&amp;nbsp; &lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;IMG height=315 src="http://biztalkperformance.members.winisp.net/images/image001.jpg" width=575 border=0&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;The blue line shows the total messages received per second by the system (i.e., for both BizTalk servers), the pink line shows the running average of the messages received per second, and the yellow line shows the spool table depth (x 0.01) for the test duration time provided on the X axis.&amp;nbsp; What this graph shows is that, for the hour of the test, the spool was stable and not growing and making the sustainable throughput equal to the number of messages received per second, in this case 150 msgs/sec.&lt;/P&gt;
&lt;P class=MsoNormal&gt;Part of any analysis of a BizTalk deployment performance should include checking some key indicators to understand resource bottlenecks.&amp;nbsp; The key measures and their values used for this deployment running under maximum sustainable throughput (i.e., the test in the graph above) were as follows:&lt;/P&gt;
&lt;P class=MsoNormal&gt;CPU Utilization:&lt;/P&gt;
&lt;P class=MsoNormal&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BTS Servers (each): &amp;nbsp;&amp;nbsp;&amp;nbsp; Avg CPU Utilization = 59%&lt;/P&gt;
&lt;P class=MsoNormal&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox DB Server:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Avg CPU Utilization = 54%&lt;/P&gt;
&lt;P class=MsoNormal&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mngmt DB Server:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Avg CPU Utilization = 13%&lt;/P&gt;
&lt;P class=MsoNormal&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;Physical Disk Idle Time:&lt;/P&gt;
&lt;P class=MsoNormal&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox DB Server, Data File Disk:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Avg Disk Idle Time = 69&lt;/P&gt;
&lt;P class=MsoNormal&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox DB Server, Transaction Log File Disk:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Avg Disk Idle Time = 98&lt;/P&gt;
&lt;P class=MsoNormal&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;SQL Locks:&lt;/P&gt;
&lt;P class=MsoNormal&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox DB Server:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Avg Total Lock Timeouts/Sec = 1072&lt;/P&gt;
&lt;P class=MsoNormal&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox DB Server:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Avg Total Lock Wait Time (ms) = 40&lt;/P&gt;
&lt;P class=MsoNormal&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;Cleanup Jobs:&lt;/P&gt;
&lt;P class=MsoNormal&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox_Message_Cleanup_BizTalkMsgBoxDb: Typical Runtime = 30 Sec&lt;/P&gt;
&lt;P class=MsoNormal&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox_Parts_Cleanup_BizTalkMsgBoxDb:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Typical Runtime = 15 Sec&lt;/P&gt;
&lt;P class=MsoNormal&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;Evnet Log:&lt;/P&gt;
&lt;P class=MsoNormal&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; No errors in any of the server application event logs.&lt;/P&gt;
&lt;P class=MsoNormal&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;From these data, we can draw the following conclusions:&amp;nbsp; There are no obvious resource bottlenecks in our system.&amp;nbsp; All of these indicators are well within healthy limits.&amp;nbsp; CPU and Disk Idle Times show that there is plenty of headroom and they are not even close to being pegged.&amp;nbsp; The SQL lock indicators look good.&amp;nbsp; Lock Timeouts/sec doesn’t start to become an issue until around 5000 or so (depending on your SQL Server) and Lock Wait times under .5 – 1 second are also healthy.&amp;nbsp; Finally, the cleanup jobs are completing successfully every time and are taking 30 seconds or less to run.&amp;nbsp; If the cleanup jobs start failing often, or start taking over a minute, this is an indication that the system is being over-driven and will typically be accompanied by an increasing spool depth.&lt;/P&gt;
&lt;P class=MsoNormal&gt;TIP:&amp;nbsp; You can expose the number of rows in the spool table by using the user defined counter capability provided by SQL Server.&amp;nbsp; Create a stored procedure (in your own database) as follows:&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr&gt;
&lt;P class=MsoNormal&gt;&lt;FONT color=#000000&gt;CREATE PROCEDURE [dbo].[SetSpoolCounter] AS&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT color=#000000&gt;SET NOCOUNT ON&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT color=#000000&gt;SET TRANSACTION ISOLATION LEVEL READ COMMITTED&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT color=#000000&gt;SET DEADLOCK_PRIORITY LOW&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT color=#000000&gt;declare @RowCnt int&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT color=#000000&gt;select @RowCnt = count(*) from BizTalkMsgBoxDB..spool with (NOLOCK)&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT color=#000000&gt;execute sp_user_counter1 @RowCnt&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT color=#000000&gt;GO&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P class=MsoNormal&gt;By running this stored procedure periodically (e.g., once per minute) as a SQL Agent job, you can add the depth of the spool table to your counters in Performance Monitor.&amp;nbsp; For more information, search on sp_user_counter1 in the SQL books on line.&lt;/P&gt;
&lt;P class=MsoNormal&gt;For additional useful messagebox queries, check out Lee Graber’s paper on advanced messagebox queries: &lt;A href="http://home.comcast.net/~sdwoodgate/BizTalkServer2004AdvancedMessageBoxQueries.doc"&gt;http://home.comcast.net/~sdwoodgate/BizTalkServer2004AdvancedMessageBoxQueries.doc&lt;/A&gt;?&lt;/P&gt;
&lt;P class=MsoNormal&gt;Now that we have shown how to find the maximum sustainable throughput and seen what the key indicators look like for a sustainable, healthy system, let’s explore some behavior associated with a system that is receiving faster than it is processing and collecting garbage.&lt;/P&gt;
&lt;P class=MsoNormal&gt;To simulate a continuously overdriven system, we configured the load generation tool to send in about 175 msgs/sec, 25 msgs/sec more than our measured maximum sustainable throughput.&amp;nbsp; The test was designed not only to over drive the system, but to get an idea of how long it would take to recover from a spool backlog depth of around 2 million messages.&amp;nbsp; To accomplish this, we drove the system at the increased rate until the spool depth was around 2 million and then stopped submitting messages altogether.&amp;nbsp; The following graph shows the same indicators as in the sustainable graph above.&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;IMG height=314 src="http://biztalkperformance.members.winisp.net/images/image002.jpg" width=575 border=0&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;As can be seen from the graph, the spool depth started building up immediately, peaking at just above 2 million records.&amp;nbsp; At this rate, it took just under 3 hours to get to the targeted 2 million record backlog.&amp;nbsp; After the load was stopped, it took around 4.5 hours for the cleanup jobs to recover from the backlog.&lt;/P&gt;
&lt;P class=MsoNormal&gt;Note that, even though the receive rate started out at 175 msgs/sec, it didn’t take long for it to degrade to an average less than our maximum sustainable throughput.&amp;nbsp; This is primarily due to the throttling that BizTalk provides and to increased lock contention on the message box.&amp;nbsp; During the overdrive period of the test, BizTalk throttled the receiving of messages (by blocking the thread the adapters submit messages on) based on the number of database sessions opened by a host instance and the messagebox database.&amp;nbsp; This throttling is indicated by messages in the application event log that indicate when BizTalk starts and stops throttling.&lt;/P&gt;
&lt;P class=MsoNormal&gt;Taking a look at our other key indicators during this test, we see some interesting trends.&amp;nbsp; Consider the following graph showing the physical disk idle time for the messagebox data file disk, average CPU utilization (%) for the messagebox server, and average lock timeouts per second on the messagebox database ( x 0.01).&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;IMG height=291 src="http://biztalkperformance.members.winisp.net/images/image003.gif" width=576 border=0&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;Comparing this graph to the one above it, we can see that, while the system is being over driven and the spool is building up, the disk gets more and more saturated (i.e., disk idle time is trending down).&amp;nbsp; Also notice that, once the cleanup jobs are given “free reign” after the load is stopped, disk idle time drops to near zero.&amp;nbsp; If it wasn’t for the fact that the cleanup jobs are configured for low deadlock priority, they would take much more of the disk I/O bandwidth even earlier in the cycle.&amp;nbsp; Instead, what we see from the job histories is that they are failing nearly every time they are executed because of lock contention while the load is still underway (as indicated by the avg lock timeouts/sec).&amp;nbsp; Once the lock contention is reduced (at the point the load is stopped), the cleanup jobs are able to succeed and begin removing messages from the spool.&amp;nbsp; It’s interesting to note that the message cleanup job ran only twice after the load was stopped, but ran for hours each time in order to collect all the unreferenced messages.&amp;nbsp; &lt;/P&gt;
&lt;P class=MsoNormal&gt;Not shown in the above graph, the lock wait times were also quite high, averaging 7 seconds during the load period, and then dropping to normal sub-100ms levels during the recovery period.&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;Floodgate Scenarios&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;QUESTION:&lt;/B&gt;&amp;nbsp; “But what if I &lt;I&gt;only&lt;/I&gt; have one or two “floodgate” events per day?&amp;nbsp; Do I really have to build a system that will handle these peaks with no backlog, only for it to sit idle the rest of the time? &lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;ANSWER:&lt;/B&gt; Of course not, as long as the system can recover from the backlog before the next floodgate event, you will be fine.&lt;/P&gt;
&lt;P class=MsoNormal&gt;There are a number of scenarios where there are just a few large peaks (a.k.a., “floodgate events”) of messages that arrive at the system each day.&amp;nbsp; Between these peaks, the throughput can be quite low.&amp;nbsp; Examples of these types of scenarios include equity trading (e.g., market open and market close) and banking systems (e.g., end of day transaction reconciliation).&amp;nbsp; &lt;/P&gt;
&lt;P class=MsoNormal&gt;Other types of events cause backlog behavior simlar to floodgate events.&amp;nbsp; For example, if a partner send address goes off line so that messages destined for that address must be re-tried and/or suspended, this can result in backlog building up.&amp;nbsp; When the partner comes back on line, there may be a large number of suspended messages that need to be resumed, resulting in another type of floodgate event.&lt;/P&gt;
&lt;P class=MsoNormal&gt;To illustrate how this works, consider a third test of our system as follows.&amp;nbsp; We drove the system at around half the maximum sustainable throughput.&amp;nbsp; This was, of course, very stable.&amp;nbsp; Then, to simulate a floodgate event, we dropped 50,000 additional messages all a once (as fast as we could generate them) and monitored the system.&amp;nbsp; The graph below provides our now familiar indicators of messages received per second and spool depth.&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;IMG height=318 src="http://biztalkperformance.members.winisp.net/images/image004.jpg" width=576 border=0&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;Note from the graph that the spool indeed built up a backlog during the floodgate event.&amp;nbsp; However, because the event was relatively short lived and the subsequent receive rate after the event was below the maximum sustainable rate, the cleanup jobs were able to run and recover from the event without requiring a system receive “outage”.&lt;/P&gt;
&lt;P class=MsoNormal&gt;Of course, every system is different, so “your mileage will vary”.&amp;nbsp; The best way to verify that you can recover is to test with a representative load before going into production.&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;Findings and Recommendations&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;Know your load behavior profile:&amp;nbsp; &lt;/B&gt;As our three examples above have shown, it is critical to know the profile of your load in terms of messages processed over time.&amp;nbsp; The better this is understood, the more accurately you can test and adjust your system capacity.&amp;nbsp; If all you know is your peak throughput requirement, then the most conservative approach would be to size your system so that your maximum sustainable throughput is the same or higher than your peak load.&amp;nbsp; However, if you know that you have predictable peaks and valleys in your load, you can better optimize your system to recover between peaks, resulting in a smaller, less expensive overall deployment.&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;Test performance early:&amp;nbsp; &lt;/B&gt;A common situation that we encounter at customers is that they have invested significant effort in designing and testing the functionality of their scenario, but have waited until the last minute to investigate its performance behavior on production hardware.&amp;nbsp; Run performance tests on your system, simulating your load profile, as early as you possibly can in your development cycle.&amp;nbsp; If you have to change anything in your design or architecture to achieve your goals, knowing this early will give you time to adjust and test again.&amp;nbsp; &lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;Emulate your expected load profile when testing performance:&lt;/B&gt;&amp;nbsp; There are two primary components to this: 1) emulate the load profile over time and 2) run the test long enough to evaluate if it is sustainable.&amp;nbsp; If, like many customers, your cycles are daily in nature, you should plan to run performance tests for at least one day to validate sustainability.&amp;nbsp; The longer the tests, the better.&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;Emulate the production configuration&lt;/B&gt;:&amp;nbsp; For example, the number and type of ports, the host and host instance configuration, database configuration, and adapter setup.&amp;nbsp; Don’t assume that changes in the configuration will not be significantly different from a performance standpoint.&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;Use real messages:&lt;/B&gt; Message sizes and message complexity will have an affect on your performance, so be sure an test with the same message schemas and instances that you plan to see in production.&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;Emulate your normal operations during performance tests:&amp;nbsp; &lt;/B&gt;Though the examples above did not include them, standard operations activities such as periodic database queries, backups, and purging will affect your sustainable throughput, so make sure you are performing these tasks during your performance and capacity test runs.&amp;nbsp; This includes both DTA and BAM tracking, if you plan to use them in production.&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;The speed of the I/O subsystem for the messagebox is a key success factor&lt;/B&gt;:&amp;nbsp; Remember that, for this scenario, we are using a fast SAN for the messagebox database files that is dedicated to this build-out.&amp;nbsp; Even in this case, the cleanup jobs were able to drive the idle time to near zero for the SQL data file.&amp;nbsp; The I/O subsystem is the most common bottleneck we have seen in customer engagements.&amp;nbsp; A common strategy to optimize SQL I/O, for example, is to place the database data file(s) and log file(s) on separate physical drives, if possible.&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;Make sure the SQL Agent is running on all messagebox servers:&amp;nbsp; &lt;/B&gt;Clearly, the cleanup jobs will never run if the SQL Agent is not running, so make sure these are running.&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;Spool depth and cleanup job run time are key indicators:&amp;nbsp; &lt;/B&gt;Regardless of other indicators, these two measures will give you a quick and easy way to assess if your system is being over-driving or not.&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;Acknowledgements&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;I would like to thank the following contributors to this blog entry:&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;Mitch Stein&lt;/B&gt;:&amp;nbsp; Thanks for helping set up the test environment and generate the test data!&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;Binbin Hu&lt;/B&gt;&lt;B&gt;, Hans-Peter Mayr, Mallikarjuna rao Nimmagadda, Lee Graber, Kevin Lam, Jonathan Wanagel, and Scott Woodgate&lt;/B&gt;:&amp;nbsp; Thanks for reviewing and providing great feedback that improved the content!&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN&gt;Disclaimer:&amp;nbsp; &lt;/SPAN&gt;&lt;/B&gt;This posting is provided "AS IS" with no warranties, and confers no rights.&lt;/P&gt;&lt;/DIV&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=406343" width="1" height="1"&gt;</content><author><name>BizTalkPerf</name><uri>http://blogs.msdn.com/BizTalkPerf/ProfileUrlRedirect.ashx</uri></author></entry></feed>