Weblogic Authors: Yeshim Deniz, Elizabeth White, Michael Meiner, Michael Bushong, Avi Rosenthal

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

IoT & Smart Cities Stories
René Bostic is the Technical VP of the IBM Cloud Unit in North America. Enjoying her career with IBM during the modern millennial technological era, she is an expert in cloud computing, DevOps and emerging cloud technologies such as Blockchain. Her strengths and core competencies include a proven record of accomplishments in consensus building at all levels to assess, plan, and implement enterprise and cloud computing solutions. René is a member of the Society of Women Engineers (SWE) and a m...
Early Bird Registration Discount Expires on August 31, 2018 Conference Registration Link ▸ HERE. Pick from all 200 sessions in all 10 tracks, plus 22 Keynotes & General Sessions! Lunch is served two days. EXPIRES AUGUST 31, 2018. Ticket prices: ($1,295-Aug 31) ($1,495-Oct 31) ($1,995-Nov 12) ($2,500-Walk-in)
Andrew Keys is Co-Founder of ConsenSys Enterprise. He comes to ConsenSys Enterprise with capital markets, technology and entrepreneurial experience. Previously, he worked for UBS investment bank in equities analysis. Later, he was responsible for the creation and distribution of life settlement products to hedge funds and investment banks. After, he co-founded a revenue cycle management company where he learned about Bitcoin and eventually Ethereal. Andrew's role at ConsenSys Enterprise is a mul...
Nicolas Fierro is CEO of MIMIR Blockchain Solutions. He is a programmer, technologist, and operations dev who has worked with Ethereum and blockchain since 2014. His knowledge in blockchain dates to when he performed dev ops services to the Ethereum Foundation as one the privileged few developers to work with the original core team in Switzerland.
Digital Transformation and Disruption, Amazon Style - What You Can Learn. Chris Kocher is a co-founder of Grey Heron, a management and strategic marketing consulting firm. He has 25+ years in both strategic and hands-on operating experience helping executives and investors build revenues and shareholder value. He has consulted with over 130 companies on innovating with new business models, product strategies and monetization. Chris has held management positions at HP and Symantec in addition to ...
The challenges of aggregating data from consumer-oriented devices, such as wearable technologies and smart thermostats, are fairly well-understood. However, there are a new set of challenges for IoT devices that generate megabytes or gigabytes of data per second. Certainly, the infrastructure will have to change, as those volumes of data will likely overwhelm the available bandwidth for aggregating the data into a central repository. Ochandarena discusses a whole new way to think about your next...
CloudEXPO | DevOpsSUMMIT | DXWorldEXPO are the world's most influential, independent events where Cloud Computing was coined and where technology buyers and vendors meet to experience and discuss the big picture of Digital Transformation and all of the strategies, tactics, and tools they need to realize their goals. Sponsors of DXWorldEXPO | CloudEXPO benefit from unmatched branding, profile building and lead generation opportunities.
Dynatrace is an application performance management software company with products for the information technology departments and digital business owners of medium and large businesses. Building the Future of Monitoring with Artificial Intelligence. Today we can collect lots and lots of performance data. We build beautiful dashboards and even have fancy query languages to access and transform the data. Still performance data is a secret language only a couple of people understand. The more busine...
All in Mobile is a place where we continually maximize their impact by fostering understanding, empathy, insights, creativity and joy. They believe that a truly useful and desirable mobile app doesn't need the brightest idea or the most advanced technology. A great product begins with understanding people. It's easy to think that customers will love your app, but can you justify it? They make sure your final app is something that users truly want and need. The only way to do this is by ...
DXWorldEXPO LLC announced today that Big Data Federation to Exhibit at the 22nd International CloudEXPO, colocated with DevOpsSUMMIT and DXWorldEXPO, November 12-13, 2018 in New York City. Big Data Federation, Inc. develops and applies artificial intelligence to predict financial and economic events that matter. The company uncovers patterns and precise drivers of performance and outcomes with the aid of machine-learning algorithms, big data, and fundamental analysis. Their products are deployed...