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
"ZeroStack is a startup in Silicon Valley. We're solving a very interesting problem around bringing public cloud convenience with private cloud control for enterprises and mid-size companies," explained Kamesh Pemmaraju, VP of Product Management at ZeroStack, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
In his session at 21st Cloud Expo, Carl J. Levine, Senior Technical Evangelist for NS1, will objectively discuss how DNS is used to solve Digital Transformation challenges in large SaaS applications, CDNs, AdTech platforms, and other demanding use cases. Carl J. Levine is the Senior Technical Evangelist for NS1. A veteran of the Internet Infrastructure space, he has over a decade of experience with startups, networking protocols and Internet infrastructure, combined with the unique ability to it...
"Codigm is based on the cloud and we are here to explore marketing opportunities in America. Our mission is to make an ecosystem of the SW environment that anyone can understand, learn, teach, and develop the SW on the cloud," explained Sung Tae Ryu, CEO of Codigm, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
High-velocity engineering teams are applying not only continuous delivery processes, but also lessons in experimentation from established leaders like Amazon, Netflix, and Facebook. These companies have made experimentation a foundation for their release processes, allowing them to try out major feature releases and redesigns within smaller groups before making them broadly available. In his session at 21st Cloud Expo, Brian Lucas, Senior Staff Engineer at Optimizely, discussed how by using ne...
"CA has been doing a lot of things in the area of DevOps. Now we have a complete set of tool sets in order to enable customers to go all the way from planning to development to testing down to release into the operations," explained Aruna Ravichandran, Vice President of Global Marketing and Strategy at CA Technologies, in this SYS-CON.tv interview at DevOps Summit at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
"There's plenty of bandwidth out there but it's never in the right place. So what Cedexis does is uses data to work out the best pathways to get data from the origin to the person who wants to get it," explained Simon Jones, Evangelist and Head of Marketing at Cedexis, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
"Cloud Academy is an enterprise training platform for the cloud, specifically public clouds. We offer guided learning experiences on AWS, Azure, Google Cloud and all the surrounding methodologies and technologies that you need to know and your teams need to know in order to leverage the full benefits of the cloud," explained Alex Brower, VP of Marketing at Cloud Academy, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clar...
Large industrial manufacturing organizations are adopting the agile principles of cloud software companies. The industrial manufacturing development process has not scaled over time. Now that design CAD teams are geographically distributed, centralizing their work is key. With large multi-gigabyte projects, outdated tools have stifled industrial team agility, time-to-market milestones, and impacted P&L stakeholders.
Gemini is Yahoo’s native and search advertising platform. To ensure the quality of a complex distributed system that spans multiple products and components and across various desktop websites and mobile app and web experiences – both Yahoo owned and operated and third-party syndication (supply), with complex interaction with more than a billion users and numerous advertisers globally (demand) – it becomes imperative to automate a set of end-to-end tests 24x7 to detect bugs and regression. In th...
Enterprises are moving to the cloud faster than most of us in security expected. CIOs are going from 0 to 100 in cloud adoption and leaving security teams in the dust. Once cloud is part of an enterprise stack, it’s unclear who has responsibility for the protection of applications, services, and data. When cloud breaches occur, whether active compromise or a publicly accessible database, the blame must fall on both service providers and users. In his session at 21st Cloud Expo, Ben Johnson, C...
Data scientists must access high-performance computing resources across a wide-area network. To achieve cloud-based HPC visualization, researchers must transfer datasets and visualization results efficiently. HPC clusters now compute GPU-accelerated visualization in the cloud cluster. To efficiently display results remotely, a high-performance, low-latency protocol transfers the display from the cluster to a remote desktop. Further, tools to easily mount remote datasets and efficiently transfer...
"Infoblox does DNS, DHCP and IP address management for not only enterprise networks but cloud networks as well. Customers are looking for a single platform that can extend not only in their private enterprise environment but private cloud, public cloud, tracking all the IP space and everything that is going on in that environment," explained Steve Salo, Principal Systems Engineer at Infoblox, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Conventio...
"Akvelon is a software development company and we also provide consultancy services to folks who are looking to scale or accelerate their engineering roadmaps," explained Jeremiah Mothersell, Marketing Manager at Akvelon, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
"MobiDev is a software development company and we do complex, custom software development for everybody from entrepreneurs to large enterprises," explained Alan Winters, U.S. Head of Business Development at MobiDev, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Agile has finally jumped the technology shark, expanding outside the software world. Enterprises are now increasingly adopting Agile practices across their organizations in order to successfully navigate the disruptive waters that threaten to drown them. In our quest for establishing change as a core competency in our organizations, this business-centric notion of Agile is an essential component of Agile Digital Transformation. In the years since the publication of the Agile Manifesto, the conn...