Welcome!

Related Topics: Microsoft Cloud

Article

Identify Performance Bottlenecks in Your BizTalk Environment - Part 1

Part I - An Overview of BizTalk

Microsoft BizTalk enables companies to integrate and automate their business process (BPM). In a BizTalk environment messages are picked up by adapters and put through a robust message infrastructure where an orchestration engine allows you to implement your business processes. Along the way – a message takes – there are several points where performance of the overall message processing can be negatively impacted and therefore impacts your business.

I plan a series of blog entries on how to Identify Bottlenecks in BizTalk. I will give you background information on the BizTalk Environment – links to other interesting posts and MSDN articles and I will show you how you can follow a single message through your BizTalk system and identify where and what the problems are in case you have a problem. Lets get started:

An Overview of BizTalk
Messages processed by BizTalk follow a certain path involving different components. The following image – taken from BizTalk Message Page - does a good job in illustrating the message flow through BizTalk:

 

BizTalk Message Flow
BizTalk Message Flow

The major players in the message flow are:

  1. A message is received through a receive port and handled by a configured adapter, e.g.: File, FTP, HTTP, SOAP, SQL, …
  2. The receive pipeline processes each message and can perform operations like decryption, signing, …
  3. Optionally receive ports transform a message via mapping to a different format
  4. The message is put into the MessageBox which resides on a SQL Server database. Subscribers (Orchestration or Send Ports) are notified
  5. Orchestration picks up a message and executes logic to support your business processes
  6. The message (processed by orchestration or not) can be transformed into a different output format before sent via mapping
  7. The send pipeline can perform certain operations like encryption on the message before generating the final output format
  8. The send port uses the configured adapter to transmit the message to the next system

(Too) Many Ways to Identify Performance Bottlenecks
There are several potential bottleneck areas like the Operating System, the File System, the Database, BizTalk Server, the Adapters, The Pipeline, Message Mapping, Orchestrations, Message Endpoints, … Check out the BizTalk Performance Optimization Guide and read the chapters about Finding and Eliminating Bottlenecks to get a better understanding about the individual components in a BizTalk Environment and what can potentially go wrong.

The Performance Guide gives great suggestions about which tools to use to analyze performance counters, log files, orchestration, I/O. The problem with that is that you need a bunch of tools that analyze different data sources and in the end it is you to put together all the pieces and try to correlate the output of the different tools. So – when message processing slows down you need to analyze the performance counters, analyze the log files, analyze profiler output, … – all in different tools.

Using all these tools is doable – but it is not fun – nor is it efficient. In this blog series I will show you how do analyze all this data with a single performance management solution.

Step 1: Monitoring BizTalk Host Instances via Windows Performance Counters
A good place to start to monitor performance are performance counters. BizTalk provides performance counters to monitor the individual components like message box, orchestration, adapters, …

A very interesting set of counters are the Host Throttling Performance Counters. These counters not only provide information about message throughput but also provide indicators when high-water marks are reached. Check out High Message Delivery Rate, High Database Size, High Thread Count or High Process Memory. These counters should always return 0 (zero). In case a high-water mark is reached the counter flips to 1 alerting you that the Host Instance is experiencing throughput problems.
The two counters Message Delivery Incoming Rate and Message Deliver Outgoing Rate tell you how many messages have been passed to the Orchestration or Messaging System and how many of them have actually been processed. There are two similar counters – Message Publishing Incoming Rate and Message Publishing Outgoing Rate – which indicate how many messages have been put to the MessageBox database and how many have been pulled out. In an ideal world the incoming and outgoing numbers should match. If you see a gap you know that either the Orchestration Engine, the Message Engine or the MessageBox cannot handle the number of incoming messages.

Monitoring these counters
You can use your own windows performance counter monitoring tool, System Center Operations Manager (SCOM) or just go with Windows Performance Monitoring tool that comes with every windows installation.

I use dynaTrace as it allows me to monitor all different types of data sources out of the box (Windows Performance Counters, Unix System Monitor, SNMP, …). With its plugin concept dynaTrace can be extended to any type of data source. Thanks again to the great work of our partner company MCG from Denmark who make BizTalk Monitoring easier. After MCG contributed the Apache Monitoring Plugin they now also created the BizTalk Monitor that you can download from the dynaTrace Community Portal. This monitor is the first key to manage your BizTalk Environment. The Monitor queries all relevant performance counters from a BizTalk Host Instance such as Message deliver rates and delay times. You create one monitor for each Host Instance in your System Profile.

BizTalk Monitor Configuration

BizTalk Monitor Configuration

In my BizTalk environment I have two BizTalk Host Instances. The following screenshot shows a dynaTrace Dashboard charting the result of the two configured BizTalk Monitors. The dashboard shows me that one of my host was obviously rather busy (BizTalkServerApplication) – the other one kind of lazy (dynaTraeApplication1):

Performance Dashboard for 2 BizTalk Host Instances

Performance Dashboard for 2 BizTalk Host Instances

The above dashboard alerts me that I had a High message delivery rate (this is the value that should be 0 all the time). I also see that I actually had a delay of up to 40ms in message delivery at a time where we processed about 20 messages/second. At the same time when the delay happened we see that we had a difference between incoming and outgoing messages (Message Deliver Rate). This means that my Orchestration Engine could not handle the amount of messages processed at this time.

The dashboard visually alerts me with the red X. dynaTrace also allows me to define alerting actions such as sending me an email or publishing this alert to SCOM.

More performance counters
Additionally to these counters you should also collect measures for memory consumption, network throughout, I/O, handle and thread count, CPU, … All these counters give a great initial overview of the system and how well it performs. Here is another screenshot that contains some of these counters:

Memory, Garbage Collection, Threads, Handles, I/O, Exceptions and Web Service Calls

Memory, Garbage Collection, Threads, Handles, I/O, Exceptions and Web Service Calls

Correlating the values we see on this dashboard we see that – at the same time we had the problem with the message delay in our Orchestration Engine we had a spike in the .NET Garbage Collector and a drop in the handle count. With dynaTrace I am also able to see that we had several exceptions – some related to the networking. We will dig deeper into this data in the next blog post. But as you can see – by looking at the available performance counters – both from BizTalk as well as those we get for windows processes and .NET Applications we can identify the problematic areas in our installation. In my case it seems to be the Orchestration Engine that causes message delays when we have more than 20 messages / second.

There is another great Troubleshooting guide for MessageBox Latency Issues on MSDN. Check it out.

Next Steps …
In the next post I will show how to go beyond performance counters (as they only give you hints about where the problem is) and focus on problems in adapters, pipelines, orchestration and message endpoints. We also learn how to analyze send ports and how to trace a single message through the BizTalk environment. Tracing a single message through all the different stages and components is Key to get to the root cause of message processing problems. Stay tuned …

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

Latest Stories
"Peak 10 is a hybrid infrastructure provider across the nation. We are in the thick of things when it comes to hybrid IT," explained , Chief Technology Officer at Peak 10, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
"We are still a relatively small software house and we are focusing on certain industries like FinTech, med tech, energy and utilities. We help our customers with their digital transformation," noted Piotr Stawinski, Founder and CEO of EARP Integration, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
"I think DevOps is now a rambunctious teenager – it’s starting to get a mind of its own, wanting to get its own things but it still needs some adult supervision," explained Thomas Hooker, VP of marketing at CollabNet, in this SYS-CON.tv interview at DevOps Summit at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
"We've been engaging with a lot of customers including Panasonic, we've been involved with Cisco and now we're working with the U.S. government - the Department of Homeland Security," explained Peter Jung, Chief Product Officer at Pulzze Systems, in this SYS-CON.tv interview at @ThingsExpo, held June 6-8, 2017, at the Javits Center in New York City, NY.
Everything run by electricity will eventually be connected to the Internet. Get ahead of the Internet of Things revolution and join Akvelon expert and IoT industry leader, Sergey Grebnov, in his session at @ThingsExpo, for an educational dive into the world of managing your home, workplace and all the devices they contain with the power of machine-based AI and intelligent Bot services for a completely streamlined experience.
Any startup has to have a clear go –to-market strategy from the beginning. Similarly, any data science project has to have a go to production strategy from its first days, so it could go beyond proof-of-concept. Machine learning and artificial intelligence in production would result in hundreds of training pipelines and machine learning models that are continuously revised by teams of data scientists and seamlessly connected with web applications for tenants and users.
"We're here to tell the world about our cloud-scale infrastructure that we have at Juniper combined with the world-class security that we put into the cloud," explained Lisa Guess, VP of Systems Engineering at Juniper Networks, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
"I will be talking about ChatOps and ChatOps as a way to solve some problems in the DevOps space," explained Himanshu Chhetri, CTO of Addteq, in this SYS-CON.tv interview at @DevOpsSummit at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
"We are an IT services solution provider and we sell software to support those solutions. Our focus and key areas are around security, enterprise monitoring, and continuous delivery optimization," noted John Balsavage, President of A&I Solutions, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
Your homes and cars can be automated and self-serviced. Why can't your storage? From simply asking questions to analyze and troubleshoot your infrastructure, to provisioning storage with snapshots, recovery and replication, your wildest sci-fi dream has come true. In his session at @DevOpsSummit at 20th Cloud Expo, Dan Florea, Director of Product Management at Tintri, provided a ChatOps demo where you can talk to your storage and manage it from anywhere, through Slack and similar services with...
The financial services market is one of the most data-driven industries in the world, yet it’s bogged down by legacy CPU technologies that simply can’t keep up with the task of querying and visualizing billions of records. In his session at 20th Cloud Expo, Karthik Lalithraj, a Principal Solutions Architect at Kinetica, discussed how the advent of advanced in-database analytics on the GPU makes it possible to run sophisticated data science workloads on the same database that is housing the rich...
DevOps at Cloud Expo, 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 widespread success of cloud computing is driving the DevOps revolution in enterprise IT. Now as never before, development teams must communicate and collaborate in a dynamic, 24/7/365 environment. There is no time to w...
All organizations that did not originate this moment have a pre-existing culture as well as legacy technology and processes that can be more or less amenable to DevOps implementation. That organizational culture is influenced by the personalities and management styles of Executive Management, the wider culture in which the organization is situated, and the personalities of key team members at all levels of the organization. This culture and entrenched interests usually throw a wrench in the work...
"We want to show that our solution is far less expensive with a much better total cost of ownership so we announced several key features. One is called geo-distributed erasure coding, another is support for KVM and we introduced a new capability called Multi-Part," explained Tim Desai, Senior Product Marketing Manager at Hitachi Data Systems, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
There is a huge demand for responsive, real-time mobile and web experiences, but current architectural patterns do not easily accommodate applications that respond to events in real time. Common solutions using message queues or HTTP long-polling quickly lead to resiliency, scalability and development velocity challenges. In his session at 21st Cloud Expo, Ryland Degnan, a Senior Software Engineer on the Netflix Edge Platform team, will discuss how by leveraging a reactive stream-based protocol,...