This picture has been released into the public domain by its author, ChiemseeMan at the German...

43

Transcript of This picture has been released into the public domain by its author, ChiemseeMan at the German...

Page 1: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.
Page 2: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

BizTalk Server Performance: Configuring BizTalk Server for Performance

Mikael HåkanssonBizTalk Server MVPSolution ArchitectEnfo Zystems

Paolo SalvatoriSenior Program ManagerAppFabric Customer Advisory TeamMicrosoft

Page 3: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

Zündapp ZD20 1976

This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia project

Page 4: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

BizTalk Server Performance: Configuring BizTalk Server for Performance

Mikael HåkanssonBizTalk Server MVPSolution ArchitectEnfo Zystems

Paolo SalvatoriSenior Program ManagerBizTalk Customer Advisory TeamMicrosoft

Page 5: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

-”So what’s in it for me?”

How to minimize the risk of BizTalk becoming a hot spot?

Page 6: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

Session overview

IntroductionFirst Test”Base-line”

Configuration Best Practices

Apply Settings Re-run

Test

Page 7: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

Goal

-”For you as a IT-Pro / Developer to be able to help your customers / employer to better leverage their BizTalk Server investment.”

Page 9: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

The BizTalk Benchmark Wizard

netTcpPassthrough

WCF One-Way Send port

netTcp Passthrough

WCF One-Way Receive Location

BizTalkMsgBoxDb

Received msgs/sec Processed msgs/sec

BizTalk Benchmark Wizard

The ”Back-end service”

Page 10: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

Tested Environments

# of Bts Srv

#CPU/Bts Srv

# SQL Srv

#CPU/SQL Srv Msgs/Sec

1 1 Quad (1) (1) 200

1 1 Quad 1 1 Quad 350

1 1 Quad 1 2 Quad 490

1 2 Quad 1 2 Quad 700

2 1 Quad 1 2 Quad 770

2 2 Quad 1 2 Quad 910

2 2 Quad 1 4 Quad 980

Page 11: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

First test – ”Baseline”

demo

Page 12: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

BizTalk performance

SQL performance

Storage performance

”But I’m a Developer!!! I am not meant to know about this stuff. The X department take care of that.”

Page 13: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

Roles

”the BizTalk guy” ”the SQL guy” ”the Storage guy”

I like to order a SQL cluster with 12

disks...

I like to order 12 LUNS...

I’ll let him share the disk array with the SAP

system..

Page 14: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

Sometimes, separating resources relieves internal contention…

Page 15: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

Eliminating bottlenecks

Data

Log

Page 16: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

PFS Contention

DatafilePFS

Page

Page 17: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

PFS Contention Resolved

Data

Data

Data

Data

Page 18: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

Multiple files and filegroups for the BizTalk MsgBoxDb

Primary (default file group)

Misc Data Misc IndexesPredicate

DataPredicate Indexes

Message Data

Message Indexes

For more information:BizTalk Server MessageBox Database Filegroups SQL Script

Page 19: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

Sometimes, it’s better to keep it together…

Page 20: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

Text In Row table option

Datafile

*****

* LOB data types = Large OBject data types

Page 21: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

Text In Row table option

EXEC sp_tableoption N'Parts' 'text in row','4000‘EXEC sp_tableoption N‘Spool' 'text in row','4000‘EXEC sp_tableoption N'DynamicStateInfo_[HOST]' 'text in row','4000'

*There are one DynamicStateInfo table per host.

Page 22: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

Tune TempDB for Best PerformanceCreating multiple data files of the same size, one for each available CPU core on the SQL machine, for the TempDb, makes it possible to spread I/O contention across multiple files.

The SQL CAT team has also found that in 2005 and 2008, there's usually no gain from having more than 8 tempdb data files, even for systems with larger numbers of processor cores.

Implementing Trace Flag –T1118 helps reduce contention across the SQL Server instances by removing almost all single page allocations

Page 23: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

I/O is important…

Page 24: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

I/O Contention

Data

Data

Data

Data

Page 25: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

The Traditional Hard Disk Drive

Base casting

Spindle

Slider (and head)

Actuator arm

Actuator axis

Actuator

SATA interfaceconnector

Power connector

Flex Circuit(attaches headsto logic board)

Platters

Case mounting holes

Cover mounting holes(cover not shown)

Performance: 200-250 IO Per Second (IOPS)

Page 26: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

The “New” Hard Disk Drive (SSD)

No moving parts! Performance: 4000-4500 Read IO Per Second (IOPS)Less writes! 1500 Write IOPS

Page 27: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

Normal Behavior During Checkpoint

Latency (response time)Reads are in the 5-6ms range and writes 1-2ms with spikes to 20-30ms during checkpoints.

Checkpoint Activity These are short-lived burst of writes with a large amount of outstanding I/O requests. It is normal for latency to increase a bit during this operation.

Hosting BizTalk databases on poor performing disks, a SQL checkpoint can cause a message processing drop.

High throughput storage for SQL Server data and log files is absolutely critical to BizTalk performance.

Page 28: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

SAN Storage

CPU PCI Bus I/O Controller / HBA Cabling Array Cache SpindleWindowsSQL Serv.

DB

Key Takeaway: This is NOT going to be easy…

Page 29: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

SAN Storage - Simplyfied

”Disk Array”

RAID 5 RAID 10

LUN

LUN

”the Storage guy”

I’ll let him share the disk array with the SAP system..

Key Takeaway: There might be a conflict of interest…

Page 30: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

RAID- Simplyfied

RAID 1(Mirroring)

+ Total data redundancy

- Slow- Expensive

RAID 5(Distributed parity)

+ Cost efficient+ Fault-tolerant+ Good performance

- The extra time required to calculate and store parity degrades the write performance

RAID 10 (1+0)(Mirroring + Spriping)

+ Total data redundancy+ Increased write transfer rate

- Expensive

RAID 0(Striping)

+ Very fast

- No redundancy

Page 31: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

I/O Sizing for SQL Server - OLTP

Do: Base sizing on spindle count needed to support the IOPs requirements with healthy latencies

Don’t: Size on capacityConsider short stroking to get more IOPS / spindle

Remember the RAID level impact on writes (2x RAID 10, 4x RAID 5)Cache hit rates or ability of cache to absorb writes may improve these numbers

RAID 5 may benefit from larger I/O sizes

Important: Critical to ensure low I/O latency on transaction log writes

Log response impacts transaction reponse times

High end systems should seek to keep latency <1ms

Important: Test the effects of a CHECKPOINT operation. Often good idea to have enough write-cache to absorb it

Page 33: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

Pipeline componentsStream-based approach to pipeline components

Processing in the stream implementation instead of the Execute method

Yossi Dahan’s WP on MSDN: “Developing a Streaming Pipeline Component”

Take advantage of BizTalk’s pipeline componentsVirtualStream and readOnlySeekableStream

Also in source-code in the BizTalk SDK

XPathMutatorStream

NamespaceTranslatorStream and XmlTranslatorStream

Use PassThruReceive and PassThruTransmit pipelines whenever possiblePromote items to the message context only if you need them for:

Message Routing (Orchestrations, Send Ports)Demotion of message context properties (Send Ports)

Use the IPipelineContext.ResourceTracker to track and dispose non-CLR resourcesInstrument your source code to make your components simple to debugAvoid ordered delivery and transaction support whenever possible

Page 34: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

Orchestrations

Tune the orchestration dehydration settings per the BizTalk Operations / Performance Guides

E.g. VirtualMemoryThrottlingCriteriaEliminate persistence points when possible

Take advantage of Atomic Scopes.Keep orchestration state as small as possible

Create variables and messages late and release earlyUse Scope shapes to your advantageUse static methods on .NET classes

Eliminate unnecessary context properties and distinguished fields

Page 35: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

BizTalk 2010 Host-level Polling Interval !!!

Page 36: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

Opitmizing BizTalk for Low Latency

demo

Page 37: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

To-do list...

Separate the Data- and Log files on different drives. (Applies to MsgBox, DTA & tempDB)

Partition Data files on MsgBox, DTA & tempDB

Separate Indexes and less used tables from tables such as the Spool and Part table.

Exploit Text in row for Parts and Spool table

Allocate enough storage

Enable the –T1118 flag

Page 38: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

Apply configuration and re-run the test

demo

Page 39: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

Zündapp ZD20 1976

This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia project

Page 40: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

References

Mikael Håkansson Personal Blog:http://blogical.se/blogs/mikael/

Paolo Salvatori Personal Blog:http://blogs.msdn.com/b/paolos/

Windows Server AppFabric CAT Blog:http://blogs.msdn.com/b/appfabriccat/

Page 41: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

For more information...Related sessions:Wednesday, November 10  |  4:00 PM - 5:00 PM DAT303-IS - Performance Scalability and Reliability on Mission Critical Applications with Microsoft SQL Server 2008 R2 and Windows Server 2008 R2

Thursday, November 11  |  4:30 PM - 5:30 PMASI204 - Biztalk Server - What is it, What's new, What's next

Performance Analysis of Logs (PAL)toolBizTalk Server 2009 Performance Optimization GuideBizTalk Server 2006 Best Practices AnalyzerThe BizTalk Server 2009 Scale Out Testing StudyBizTalk Benchmark WizardBizTalk Server MessageBox Database Filegroups SQL Script

Page 42: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

Session Evaluations

Tell us what you think, and you could win!

All evaluations submitted are automatically entered into a daily prize draw* 

Sign-in to the Schedule Builder at http://europe.msteched.com/topic/list/   * Details of prize draw rules can be obtained from the Information Desk. 

 

Page 43: This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman Wikipedia.

© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to

be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS

PRESENTATION.