Upload
byron-conley
View
220
Download
0
Tags:
Embed Size (px)
Citation preview
WCFZen of Performance and Scale
Nicholas AllenSr Program Managerblogs.msdn.com/drnick
TL38
This talk is Zen for levels 300 and up Background needed to enjoy this session
WCF 3.x development experience Distributed systems design experience
Background not needed Workflow: Kenny Wolf “WF 4.0: A First Look” WCF 4.0: Ed Pinto “WCF 4.0: Building WCF
Services with WF in .NET 4.0” Dublin: Dan Eshner “Hosting and Managing
Workflows and Services” Oslo: Doug Purdy “A Lap Around Oslo”
Expectations
Inside WCF 3.x Performance The Formula 1 story Understanding performance 137 knobs, 1 concept
Future of WCF performance and scale The Starbucks story Understanding where we’re going in WCF 4.0
Agenda
InsideWCF 3.x Performance
Everything is interconnected You go as fast as the slowest step Understand the impact of time averaging
There is no “go fast” button Design controls the performance baseline Knobs are powerful but unpredictable
Only measurements matter Assumptions are not tunable Reality makes a difference
Understanding System Performance
Types of Performance
Reference Set
Startup Time
Thread Count
Latency
Working Set
Net Utilization
Pool Size
Concurrency
CPU UtilizationCoordination
Capacity
Client Balance Server
Thro
ughp
ut
B
alan
ce
C
ost
Memory
Memory
Memory
Memory
Memory
CPU
CPU
CPU
IO
IO
IO
Parties exchange data by push and pull
The Push-Pull Principle
Push PullBuffer
PushPull Pump
Push Push
Pull Pull
A buffer or pump inverts the exchange These control mechanisms require knobs
Control
A Push-Pull Look at WCF
Network DispatchTransport Channels App
ConnectionPoolSettingsListenBacklogMaxPendingAcceptsMaxPendingConnections
MaxConcurrentCallsMaxConcurrentInstancesMaxConcurrentSessions
Network Transport Encoder Channels Serializer
Streamed Data
App
XMLDictionaryReaderQuotasMaxBufferSizeMaxBufferPoolSize
CreateBufferedCopy(maxBufferSize)MaxReceivedMessageSizeConnectionBufferSize
Network SerializerTransport Channels AppEncoder
Buffered Data
Some channels push
Common Exceptions to the Rules
Transmit Transmit AckTransmit
Reliable ChannelsChannels
OneWay ChannelsChannels
AcknowledgementIntervalInactivityTimeoutMaxPendingChannelsMaxRetryCountMaxTransferWindowSize
ChannelPoolSettingsMaxAcceptedChannels
Transmit
SendBufferSizeMaxOutputDelay
TcpWindowSize
Many networks both push and pull
Sliding Window
Accept Channel
Acquire Session Throttle
Run Message
PumpClose
Channel
Release Session Throttle
Channel Pump
A Closer Look at the Pump
DispatchChannels Pump
Receive Message
Acquire Throttles
Select Operatio
nDispatch Request
Release Throttles
Message Pump
Danger of Looking too Closely
DispatchChannels Pump
Authorize Caller
Create Instance Context
Run Message Inspectors
Lock Instance Context
Apply Transaction
Bind to Thread
Create Instance
Initialize Call Context
Authorize Caller
Create Instance Context
Run Message Inspectors
Lock Instance Context
Apply Transaction
Bind to Thread
Create Instance
Initialize Call Context
Performance is essential but not glamorous Understand the system
Understand what success means Design is a limiting factor
Understand the principles “What” is forms of the 3 classes of resources “Where” can be explored using push-pull “How” probably requires looking at the code
Know when you’re done Hypothesis and test is an iterative process Performance curves degrade on the high end
Key Performance Lessons
FutureWCF Performance and Scale
Performance Tuning a Coffee Shop
Barista
Barista
$
Cashier
$
Cashier
$
Cashier
Customer CustomerCustomerCustomerCustomer
Customer Customer
CustomerCustomer
CustomerCustomer
Customer
Customer
Customer
Customer
Customer
Customer
Customer
Customer
Customer Customer
Mix Drink
Line Up
Place Order
Throw Cup
Pick Up Serve
Coffee Store Service Architecture
$
$
$
Customers Cashiers Baristas
Line Queue Cup Queue
LineUp
ThrowCup
MixDrink
PlaceOrder
Applies correlation address
PickUp Queue(correlates to original customer)
ServePickUp
Durable Duplex Correlation
Queue Channel Extensions
DublinHostingActivity
Compensation
Evals & Recordings
Please fill
out your
evaluation for
this session at:
This session will be available as a recording at:
www.microsoftpdc.com
Please use the microphones provided
Q&A
© 2008 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.