Welcome!

Microsoft Cloud Authors: David H Deans, Yeshim Deniz, Janakiram MSV, Andreas Grabner, Stackify 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
When shopping for a new data processing platform for IoT solutions, many development teams want to be able to test-drive options before making a choice. Yet when evaluating an IoT solution, it’s simply not feasible to do so at scale with physical devices. Building a sensor simulator is the next best choice; however, generating a realistic simulation at very high TPS with ease of configurability is a formidable challenge. When dealing with multiple application or transport protocols, you would be...
SYS-CON Events announced today that Datera, that offers a radically new data management architecture, has been named "Exhibitor" 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. Datera is transforming the traditional datacenter model through modern cloud simplicity. The technology industry is at another major inflection point. The rise of mobile, the Internet of Things, data storage and Big...
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...
In the enterprise today, connected IoT devices are everywhere – both inside and outside corporate environments. The need to identify, manage, control and secure a quickly growing web of connections and outside devices is making the already challenging task of security even more important, and onerous. In his session at @ThingsExpo, Rich Boyer, CISO and Chief Architect for Security at NTT i3, discussed new ways of thinking and the approaches needed to address the emerging challenges of security i...
In his opening keynote at 20th Cloud Expo, Michael Maximilien, Research Scientist, Architect, and Engineer at IBM, discussed the full potential of the cloud and social data requires artificial intelligence. By mixing Cloud Foundry and the rich set of Watson services, IBM's Bluemix is the best cloud operating system for enterprises today, providing rapid development and deployment of applications that can take advantage of the rich catalog of Watson services to help drive insights from the vast t...
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...
There is only one world-class Cloud event on earth, and that is Cloud Expo – which returns to Silicon Valley for the 21st Cloud Expo at the Santa Clara Convention Center, October 31 - November 2, 2017. Every Global 2000 enterprise in the world is now integrating cloud computing in some form into its IT development and operations. Midsize and small businesses are also migrating to the cloud in increasing numbers. Companies are each developing their unique mix of cloud technologies and service...
WebRTC is great technology to build your own communication tools. It will be even more exciting experience it with advanced devices, such as a 360 Camera, 360 microphone, and a depth sensor camera. In his session at @ThingsExpo, Masashi Ganeko, a manager at INFOCOM Corporation, will introduce two experimental projects from his team and what they learned from them. "Shotoku Tamago" uses the robot audition software HARK to track speakers in 360 video of a remote party. "Virtual Teleport" uses a...
Recently, IoT seems emerging as a solution vehicle for data analytics on real-world scenarios from setting a room temperature setting to predicting a component failure of an aircraft. Compared with developing an application or deploying a cloud service, is an IoT solution unique? If so, how? How does a typical IoT solution architecture consist? And what are the essential components and how are they relevant to each other? How does the security play out? What are the best practices in formulating...
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...
In his session at @ThingsExpo, Arvind Radhakrishnen discussed how IoT offers new business models in banking and financial services organizations with the capability to revolutionize products, payments, channels, business processes and asset management built on strong architectural foundation. The following topics were covered: How IoT stands to impact various business parameters including customer experience, cost and risk management within BFS organizations.
An increasing number of companies are creating products that combine data with analytical capabilities. Running interactive queries on Big Data requires complex architectures to store and query data effectively, typically involving data streams, an choosing efficient file format/database and multiple independent systems that are tied together through custom-engineered pipelines. In his session at @BigDataExpo at @ThingsExpo, Tomer Levi, a senior software engineer at Intel’s Advanced Analytics ...
SYS-CON Events announced today that Elastifile will exhibit at 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. Elastifile Cloud File System (ECFS) is software-defined data infrastructure designed for seamless and efficient management of dynamic workloads across heterogeneous environments. Elastifile provides the architecture needed to optimize your hybrid cloud environment, by facilitating efficient...
SYS-CON Events announced today that Golden Gate University will exhibit at 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. Since 1901, non-profit Golden Gate University (GGU) has been helping adults achieve their professional goals by providing high quality, practice-based undergraduate and graduate educational programs in law, taxation, business and related professions. Many of its courses are taug...
"We provide IoT solutions. We provide the most compatible solutions for many applications. Our solutions are industry agnostic and also protocol agnostic," explained Richard Han, Head of Sales and Marketing and Engineering at Systena America, in this SYS-CON.tv interview at @ThingsExpo, held June 6-8, 2017, at the Javits Center in New York City, NY.
SYS-CON Events announced today that DXWorldExpo has been named “Global 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. Digital Transformation is the key issue driving the global enterprise IT business. Digital Transformation is most prominent among Global 2000 enterprises and government institutions.
21st International Cloud Expo, taking place October 31 - November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA, will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud strategy. Me...
Recently, WebRTC has a lot of eyes from market. The use cases of WebRTC are expanding - video chat, online education, online health care etc. Not only for human-to-human communication, but also IoT use cases such as machine to human use cases can be seen recently. One of the typical use-case is remote camera monitoring. With WebRTC, people can have interoperability and flexibility for deploying monitoring service. However, the benefit of WebRTC for IoT is not only its convenience and interopera...
SYS-CON Events announced today that Secure Channels, a cybersecurity firm, will exhibit at 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. Secure Channels, Inc. offers several products and solutions to its many clients, helping them protect critical data from being compromised and access to computer networks from the unauthorized. The company develops comprehensive data encryption security strategie...
From 2013, NTT Communications has been providing cPaaS service, SkyWay. Its customer’s expectations for leveraging WebRTC technology are not only typical real-time communication use cases such as Web conference, remote education, but also IoT use cases such as remote camera monitoring, smart-glass, and robotic. Because of this, NTT Communications has numerous IoT business use-cases that its customers are developing on top of PaaS. WebRTC will lead IoT businesses to be more innovative and address...