Welcome!

Microsoft Cloud Authors: Andreas Grabner, Stackify Blog, Liz McMillan, David H Deans, Automic Blog

Related Topics: Microsoft Cloud

Microsoft Cloud: Article

Identify Performance Bottlenecks in Your BizTalk Environment

Part II - Analyzing BizTalk Adapters

In Part I of this series I gave a general overview of BizTalk - the components that are involved in message processing and talked about how BizTalk specific performance counters can help spotting problematic areas. In this post we go beyond performance counters (even though we still need them) and take a deep-dive into adapters and pipelines.

Step 2: Analyzing BizTalk Adapters
On the incoming or receiving side of BizTalk – Adapters receive artifacts, e.g.: the File Adapter reads files from disk that get put into and processed by the receiving pipeline. On the outgoing or sending side of BizTalk – Adapters send artifacts, e.g.: by calling a Web Service via SOAP.

BizTalk comes with the several out-of-the-box adapters - such as File, HTTP, SOAP, SQL, SNMP, SMTP, FTP, POP3, SharePoint, …. Additional to these BizTalk can be extended with custom Adapters. The default adapters provide different performance counters that indicate how many artifacts or messages have been sent and received by the adapter. Let’s have a closer look at the File Adapter and its performance counters: We can monitor the number of bytes sent and received, the number of total messages sent and received and the number of lock failures that happened. Unfortunately there is not a whole lot of documentation about the impact of the lock failures counter. I assume BizTalk tries to lock each file exclusively and retries it if it is not successful – causing a delay in processing the input folder. The number of messages (in this case we talk about files) and especially the number of bytes per second can give us a good indication whether the adapters are a bottleneck because the file system can become the bottleneck here. The following dashboard shows the counters for the File Adapter (top), SOAP Adapters (middle) and the I/O Handle and CPU time (bottom). The BizTalk scenario I monitor uses the File Adapter on both the receiving and sending side as well as a SOAP Adapter to call out to a Web Services. Once a file is received and transformed a Web Service gets called with the transformed message. The response of this Web Service will be written to an output file. In a “perfect world” I would therefore have one SOAP call and one sent file for every received file:

Monitoring FILE and SOAP Adapter Performance

Monitoring FILE and SOAP Adapter Performance

In the top graph we can see how increasing incoming files caused lock failures (be aware that the scale of Lock Failures is 1/100th of the other measures). Here is where I actually hope to get some insight from you – my fellow readers: it seems that BizTalk produces more lock failures/sec (1498) then actual messages received/sec (66). But - does this mean that files that couldn’t be locked were actually not processed or that BizTalk had to retry a couple of times in order to lock a file before reading it? For me it seems that these counters are not necessarily accurate anyway – why that? I pushed 700 messages through the system but this number is nowhere reflected by these performance counters.
The middle graph shows the number of sent SOAP messages. Every incoming message from the file system should trigger a SOAP call. In my case I have a difference of 3 messages which would indicate that 3 messages were not processed correctly.
The bottom graphs show the I/O handle count of the BizTalk Host Instance as well as the CPU Usage. Handle Count obviously goes up with the number of messages increasing in the receiving location. CPU seems to be aligned with the SOAP calls – which also make sense as making SOAP calls will be more CPU intensive then just reading in files from disk.

The problem that I have here is that my FILE Receiving Adapter shows a high number of lock failures which indicates a problem with my file system. I also question the performance counters as they do not reflect the number of messages I sent through the system.

Step 3: Analyze Pipelines
In the Receive and Send Ports of BizTalk you configure which Pipeline to use for handling the message before it gets put to the Message Box or before it is sent out. Pipelines have a significant impact on the overall BizTalk performance as they perform actions on every single message that gets through BizTalk. Therefore it is important to understand the impact of Pipeplines that are used. BizTalk comes with 4 default pipelines: PassThruReceive, PassThruTransmit, XMLReceive and XMLTransmit. If you have your custom Pipeline I recommend reading the article Optimizing Pipeline Performance.
In my scenario – every message is passing through one instance of each of the 4 default pipeline types. There are no performance counters for pipelines which leaves us a bit blind here from that perspective. You could turn on Tracking for your individual pipelines which will give you some insight into what’s going on within Pipelines. Before turning that on please read the documentation about BizTalk tracking and make yourself familiar with the overhead you inherit with it. Also consider Business Activity Monitoring (BAM) as an alternative.

One way to analyze what is really going on in pipelines is using an Application Performance Management Solution with Transactional Tracing capabilities. I’ve installed dynaTrace in my BizTalk Environment and enabled it while running my 700 messages test. The following screenshot shows me the pipeline activities dynaTrace traced for each individual pipeline:

BizTalk Activity grouped by Pipeline

BizTalk Activity grouped by Pipeline

Now I really see accurate numbers. My 700 messages made it through all of the 4 different pipeline types with XMLTransit being the by far the slowest compared to all the others. A drill into an individual transaction on XMLTransmit shows me that a) I have a huge variance in execution time (several ms to > 1s) and that the most expensive methods are those that call to the native COM component of BizTalk (yeah – big pieces of BizTalk are still “good” old COM):

Individual Pipeline PurePath showing where things are slow in XMLTransit

Individual Pipeline PurePath showing where things are slow in XMLTransit

If you turn on BizTalk Tracking we can even see those tracking messages along the PurePath (can be seen in the Argument column for the TraceMessage calls). The question now is – what is the problem in my scenario? Analyzing the individual PurePath’s showed me that there were some BizTalk methods that contribut more than 90% of the processing time to individual transactions. It also showed that these methods don’t scale that well by checking the execution time range (check the min & max columns). As BizTalk Tracking was turned on I now have proof what the overhead of this feature is (~10%):

What is slow in my pipeline processing?

What is slow in my pipeline processing?

All these method calls end up calling the BizTalk COM Components like e.g.: Message Agent (BTSMessageAgent.dll). The lessons learned from this excercise is that a) BizTalk Tracking causes significant overhead to my message processing and b) XMLTransit is a slow Pipeline spending most of its time in the native COM Components.

Next Steps …
In my next article I'll take a deep dive into the Orchestration Engine to analyze where things can slow down there. We also look at external services that can get called by your business process. In my case I call a SOAP Web Service which plays its role in the overall message processing performance.

I am sure that the majority of you are working in a Microsoft .NET centric environment. On topics like ASP.NET, SharePoint, .NET Services, … feel free to check out my White Papers about Continuous Application Performance for Enterprise .NET Systems.

Related reading:

  1. Identify Performance Bottlenecks in your BizTalk Environment – Part I Microsoft BizTalk enables companies to integrate and automate their business...
  2. Performance Analysis: Identify GC bottlenecks in distributed heterogeneous environments Garbage Collection can have a major impact on application performance....
  3. Performance Analysis: How to identify “bad” methods messing up the GC Whenever the Garbage Collector kicks in to free up memory...
  4. Performance Analysis: How to identify synchronization issues under load? Synchronization is a necessary mechanism to control access to shared...
  5. Can you trust your .NET Heap Performance Counters? Memory Management is a tough topic in managed runtime environments...

More Stories By Andreas Grabner

Andreas Grabner has been helping companies improve their application performance for 15+ years. He is a regular contributor within Web Performance and DevOps communities and a prolific speaker at user groups and conferences around the world. Reach him at @grabnerandi

@ThingsExpo Stories
The current age of digital transformation means that IT organizations must adapt their toolset to cover all digital experiences, beyond just the end users’. Today’s businesses can no longer focus solely on the digital interactions they manage with employees or customers; they must now contend with non-traditional factors. Whether it's the power of brand to make or break a company, the need to monitor across all locations 24/7, or the ability to proactively resolve issues, companies must adapt to...
SYS-CON Events announced today that Datanami has been named “Media Sponsor” of SYS-CON's 21st International Cloud Expo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Datanami is a communication channel dedicated to providing insight, analysis and up-to-the-minute information about emerging trends and solutions in Big Data. The publication sheds light on all cutting-edge technologies including networking, storage and applications, and the...
SYS-CON Events announced today that EnterpriseTech has been named “Media Sponsor” of SYS-CON's 21st International Cloud Expo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. EnterpriseTech is a professional resource for news and intelligence covering the migration of high-end technologies into the enterprise and business-IT industry, with a special focus on high-tech solutions in new product development, workload management, increased effi...
SYS-CON Events announced today that MobiDev, a client-oriented software development company, will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place October 31-November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. MobiDev is a software company that develops and delivers turn-key mobile apps, websites, web services, and complex software systems for startups and enterprises. Since 2009 it has grown from a small group of passionate engineers and business...
SYS-CON Events announced today that GrapeUp, the leading provider of rapid product development at the speed of business, will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place October 31-November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Grape Up is a software company, specialized in cloud native application development and professional services related to Cloud Foundry PaaS. With five expert teams that operate in various sectors of the market acr...
SYS-CON Events announced today that Ayehu will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on October 31 - November 2, 2017 at the Santa Clara Convention Center in Santa Clara California. Ayehu provides IT Process Automation & Orchestration solutions for IT and Security professionals to identify and resolve critical incidents and enable rapid containment, eradication, and recovery from cyber security breaches. Ayehu provides customers greater control over IT infras...
Artificial intelligence, machine learning, neural networks. We’re in the midst of a wave of excitement around AI such as hasn’t been seen for a few decades. But those previous periods of inflated expectations led to troughs of disappointment. Will this time be different? Most likely. Applications of AI such as predictive analytics are already decreasing costs and improving reliability of industrial machinery. Furthermore, the funding and research going into AI now comes from a wide range of com...
In this presentation, Striim CTO and founder Steve Wilkes will discuss practical strategies for counteracting fraud and cyberattacks by leveraging real-time streaming analytics. In his session at @ThingsExpo, Steve Wilkes, Founder and Chief Technology Officer at Striim, will provide a detailed look into leveraging streaming data management to correlate events in real time, and identify potential breaches across IoT and non-IoT systems throughout the enterprise. Strategies for processing massive ...
SYS-CON Events announced today that Conference Guru has been named “Media Sponsor” of SYS-CON's 21st International Cloud Expo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. A valuable conference experience generates new contacts, sales leads, potential strategic partners and potential investors; helps gather competitive intelligence and even provides inspiration for new products and services. Conference Guru works with conference organi...
SYS-CON Events announced today that Cloud Academy named "Bronze Sponsor" of 21st International Cloud Expo which will take place October 31 - November 2, 2017 at the Santa Clara Convention Center in Santa Clara, CA. Cloud Academy is the industry’s most innovative, vendor-neutral cloud technology training platform. Cloud Academy provides continuous learning solutions for individuals and enterprise teams for Amazon Web Services, Microsoft Azure, Google Cloud Platform, and the most popular cloud com...
SYS-CON Events announced today that CA Technologies has been named "Platinum Sponsor" of SYS-CON's 21st International Cloud Expo®, which will take place October 31-November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. CA Technologies helps customers succeed in a future where every business - from apparel to energy - is being rewritten by software. From planning to development to management to security, CA creates software that fuels transformation for companies in the applic...
SYS-CON Events announced today that TMC has been named “Media Sponsor” of SYS-CON's 21st International Cloud Expo and Big Data at Cloud Expo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Global buyers rely on TMC’s content-driven marketplaces to make purchase decisions and navigate markets. Learn how we can help you reach your marketing goals.
Internet of @ThingsExpo, taking place October 31 - November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA, is co-located with 21st Cloud Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The Internet of Things (IoT) is the most profound change in personal and enterprise IT since the creation of the Worldwide Web more than 20 years ago. All major researchers estimate there will be tens of billions devic...
"MobiDev is a Ukraine-based software development company. We do mobile development, and we're specialists in that. But we do full stack software development for entrepreneurs, for emerging companies, and for enterprise ventures," explained Alan Winters, U.S. Head of Business Development at MobiDev, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
SYS-CON Events announced today that Telecom Reseller has been named “Media Sponsor” of SYS-CON's 21st International Cloud Expo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Telecom Reseller reports on Unified Communications, UCaaS, BPaaS for enterprise and SMBs. They report extensively on both customer premises based solutions such as IP-PBX as well as cloud based and hosted platforms.
We build IoT infrastructure products - when you have to integrate different devices, different systems and cloud you have to build an application to do that but we eliminate the need to build an application. Our products can integrate any device, any system, any cloud regardless of protocol," explained Peter Jung, Chief Product Officer at Pulzze Systems, in this SYS-CON.tv interview at @ThingsExpo, held November 1-3, 2016, at the Santa Clara Convention Center in Santa Clara, CA
SYS-CON Events announced today that IBM has been named “Diamond Sponsor” of SYS-CON's 21st Cloud Expo, which will take place on October 31 through November 2nd 2017 at the Santa Clara Convention Center in Santa Clara, California.
Multiple data types are pouring into IoT deployments. Data is coming in small packages as well as enormous files and data streams of many sizes. Widespread use of mobile devices adds to the total. In this power panel at @ThingsExpo, moderated by Conference Chair Roger Strukhoff, panelists looked at the tools and environments that are being put to use in IoT deployments, as well as the team skills a modern enterprise IT shop needs to keep things running, get a handle on all this data, and deliver...
The current age of digital transformation means that IT organizations must adapt their toolset to cover all digital experiences, beyond just the end users’. Today’s businesses can no longer focus solely on the digital interactions they manage with employees or customers; they must now contend with non-traditional factors. Whether it's the power of brand to make or break a company, the need to monitor across all locations 24/7, or the ability to proactively resolve issues, companies must adapt to...
SYS-CON Events announced today that Enzu will exhibit at SYS-CON's 21st Int\ernational Cloud Expo®, which will take place October 31-November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Enzu’s mission is to be the leading provider of enterprise cloud solutions worldwide. Enzu enables online businesses to use its IT infrastructure to their competitive advantage. By offering a suite of proven hosting and management services, Enzu wants companies to focus on the core of their ...