190 likes | 351 Views
TL38. WCF Zen of Performance and Scale. Nicholas Allen Sr Program Manager blogs.msdn.com/ drnick. Expectations. 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
E N D
TL38 WCFZen of Performance and Scale Nicholas Allen Sr Program Manager blogs.msdn.com/drnick
Expectations • 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”
Agenda • 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
Understanding System 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
Types of Performance Memory Memory Memory CPU IO Memory Memory IO CPU IO CPU
The Push-Pull Principle • Parties exchange data by push and pull Push Push Buffer Push Pull • A buffer or pump inverts the exchange • These control mechanisms require knobs Pump Pull Push Pull Pull
A Push-Pull Look at WCF • Control ConnectionPoolSettings ListenBacklog MaxPendingAccepts MaxPendingConnections MaxConcurrentCalls MaxConcurrentInstances MaxConcurrentSessions Network Transport Channels Dispatch App • Streamed Data • Buffered Data MaxBufferSize MaxBufferPoolSize XMLDictionaryReaderQuotas MaxReceivedMessageSize ConnectionBufferSize CreateBufferedCopy(maxBufferSize) Network Network Transport Transport Encoder Encoder Channels Channels Serializer Serializer App App
Common Exceptions to the Rules • Some channels push AcknowledgementInterval InactivityTimeout MaxPendingChannels MaxRetryCount MaxTransferWindowSize ChannelPoolSettings MaxAcceptedChannels Channels OneWay Channels Channels Reliable Channels • Many networks both push and pull SendBufferSize MaxOutputDelay TcpWindowSize Sliding Window Transmit Transmit Transmit Ack Transmit
A Closer Look at the Pump Pump Channels Dispatch Channel Pump Message Pump
Danger of Looking too Closely Pump Channels Dispatch
Key Performance Lessons • 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
Performance Tuning a Coffee Shop Pick Up Serve Mix Drink Line Up Throw Cup Place Order
Coffee Store Service Architecture Dublin Hosting Queue Channel Extensions Activity Compensation Durable Duplex Correlation
Evals & Recordings Please fill out your evaluation for this session at: This session will be available as a recording at: www.microsoftpdc.com
Q&A Please use the microphones provided
© 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.