Presentation is loading. Please wait.

Presentation is loading. Please wait.

Improving .NET Scalability And Performance With Visual Studio

Similar presentations


Presentation on theme: "Improving .NET Scalability And Performance With Visual Studio"— Presentation transcript:

1 Improving .NET Scalability And Performance With Visual Studio
4/16/ :24 PM TL24 Improving .NET Scalability And Performance With Visual Studio  Steve Carroll Senior Development Lead Microsoft Corporation  Ed Glas Principal Group Manager Microsoft Corporation © 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.

2 Outline Performance lifecycle
Diagnosing common .NET performance problems

3 One Last Walkthrough Before Launch

4 We Got Lucky!

5 Visual Studio Team System provides performance tools to support you throughout the software lifecycle

6 Performance Lifecycle
Please use this format when talking about CURRENT products, services or features. 4/16/ :24 PM Performance Lifecycle Gathering requirements Maintenance Design Deployment Development Testing © 2007 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.

7 Performance Requirements
Please use this format when talking about CURRENT products, services or features. 4/16/ :24 PM Performance Requirements Gathering requirements © 2007 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.

8 Example Performance Requirement
Scenario Test Environment Requirement Goal Home page Perf Environment #1 2s 1.5s Search results page – 10 results 3s 4s Checkout complete 5s E#1 Machine CPU RAM Disk Network Client Dell WS 650 1P 2.2 Ghz 1GB 7.5k eSata (100 GB) 600kb App Server Dell PE 6650 4P 2.2 Ghz 4GB 2x15k RPM SCSI 1Gb SQL Server HP DT 9250 8P 2.6 Ghz 16GB 3 x 7.2 K SATA (480 GB) 15 x 7.2 k SATA2 (3 TB) Application Data Size 1,000 restaurants, 50,000 menu items, 1,500 orders Work load 1,000 virtual users Throughput 100 home pages/sec 50 searches/sec 2 checkouts/sec

9 Performance Lifecycle
4/16/ :24 PM Performance Lifecycle Gathering requirements Design © 2007 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.

10 Design Phase Exploratory performance tests
Prototype to validate architecture Run end-to-end performance tests Run tests to isolate your server’s performance Design UI Action layer Service API Service API Run tests to isolate performance of your dependencies Web app Web app Database Database

11 we are ready to implement and test
Now that we have the requirements, we are ready to implement and test

12 Case Study: Performance And Stress Testing Team Foundation Server
4/16/ :24 PM demo Case Study: Performance And Stress Testing Team Foundation Server © 2007 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.

13 TFS Perf Trends Report

14 TFS Perf Report 2 WebAccess: Run a query for 100 items 3.5 9.00 -157%
Pri Scenario Goal Actual Delta Goal Delta build Bug 2 WebAccess: Run a query for 100 items 3.5 9.00 -157% -111% 518511 VC: CommandLine - Rollback 1000 edits and folder rename 30 49.61 -65% 9% 416557 WIT: UI - VS startup with connected Team Explorer (warm) 0.53 0.85 -61% 29% 535042 1 Office Integration: Excel - Get 100 work items from picker 1.54 -54% -147% 468117 WIT: Run a In Group query 0.75 1.06 -41% 31% 468113 VC: UI - Open from SCC 120 165.97 -38% -26% 510958

15 TFS Stress Trends Report

16 TFS Transaction Analysis
Application Command count Percentage Test Weight from Dogfood Server Version Control Download 82.98% 83.64% QueryItems 470287 5.22% 5.24% Integration IsMember 173575 1.93% 2.01% ReadIdentity 136990 1.52% 1.67% WorkItem Tracking PageWorkitemsByIds 93075 1.03% 1.56% QueryWorkitems 84577 0.94% 1.10% UpdateLocalVersion 75809 0.84% 1.23%

17 TFS Best Practices Start early Focus on key scenarios
Run tests regularly Measure against requirements Spend tuning time wisely

18 Using UI Tests as Performance Tests and JScript Profiling
4/16/ :24 PM demo Using UI Tests as Performance Tests and JScript Profiling © 2007 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.

19 Types Of Performance Tests
Single User Typical Load Web App Database Unit Test UI Action Layer Service API Web App Database UI Test Manual Test Web Server Web App Database Web Test Peak Load Small DB Expected Data Size Target Layer # Users Peak Data Size Data Scale

20 Deployment And Maintenance

21 Run To Run Comparison Of Load Tests
4/16/ :24 PM demo Run To Run Comparison Of Load Tests © 2007 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.

22 Anticipating Common .NET Performance Problems

23 Performance Code Analysis
public struct BusinessValueType { public int Value; public string Name; }

24

25 Performance Quiz <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString=“…“ ProviderName=“…" SelectCommand="SELECT * FROM ..."> </asp:SqlDataSource> Select Company: <asp:DropDownList ID="ddl1" runat="server” DataTextField="Company Name" DataValueField=“Company ID“ OnSelectedIndexChanged="Selection_Change”> </asp:DropDownList>

26 About Generational GC Theory
Objects that were just allocated will soon die Objects that have been alive for some time will keep on living

27 Gen 0 is full, start garbage collection!
New objects are allocated in Gen 0 Still living objects are promoted Dead objects are found Large object heap Gen 0 Gen 1 Gen 2

28 Three Bad Allocation Patterns
Midlife crisis Managed leaks Large object heap

29 Diagnosing Memory Issues
4/16/ :24 PM demo Diagnosing Memory Issues © 2007 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.

30 Detecting .NET Locking Problems
4/16/ :24 PM Detecting .NET Locking Problems Locks are the up and coming bottleneck Multicore revolution Contention profiling Low overhead Non-intrusive © 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.

31 demo Contention Profiler 4/16/2017 12:24 PM
© 2007 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.

32 What's Cool And New In Visual Studio Team System 10
4/16/ :24 PM What's Cool And New In Visual Studio Team System 10 © 2007 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.

33 VSTS 10 Web And Load Test Features
4/16/ :24 PM VSTS 10 Web And Load Test Features Collect more analysis data Remote profiler integration Sys Info data collection Extensible data collectors to support more platforms Run to run reports in Microsoft Excel Load test log visualization Run functional tests as performance tests New design-time extensibility points Many usability enhancements © 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.

34 VSTS 10 Profiler New Features
4/16/ :24 PM VSTS 10 Profiler New Features Now works under virtualization! New function details page Rules and guidance to help detect common problems JScript profiling Just my code profiling Many usability enhancements © 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.

35 Visual Studio Team System provides performance tools to support you throughout the software lifecycle

36 Resources Know your tools! Know your platform!
Profiler blog: Web/load test blog: Forums: Know your platform! Improving .NET Performance and Scalability

37 Related Sessions Session ID Session Title TL19
Bringing Out The Best In Multicore Systems BB07 SQL Server 2008: Developing Large Scale Web Applications And Services TL38 WCF: Zen Of Performance And Scale PC53 Building High Performance JScript Applications TL60 Improving Code Quality With Code Analysis TL03 Microsoft Visual Studio Team System: Software diagnostics and quality

38 Evals & Recordings www.microsoftpdc.com
Please fill out your evaluation for this session at: This session will be available as a recording at:

39 Please use the microphones provided
4/16/ :24 PM 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.

40 4/16/ :24 PM © 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. © 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.

41 4/16/ :24 PM © 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.


Download ppt "Improving .NET Scalability And Performance With Visual Studio"

Similar presentations


Ads by Google