Tune Your ASP.NET Application Using Visual Studio 2010 Profiler Abhijit Jana │ Consultant, Microsoft http:// abhijitjana.net | @abhijitjana virtual techdays INDIA │ 28-30 September 2011
Introducing Profiling Introducing Visual Studio 2010 Profiler Choose right Profiling Methods Deep dive into Visual studio profiler Use different techniques of profiling with asp.net apps Profile ASP.NET applications with IIS Profiling JavaScript ASP.NET load testing and Profiling Q/A S E S S I O N A G E N D A virtual techdays INDIA │ 28-30 September 2011
Performance of an application is a key element that should be analyzed and optimized before it go for live. The most common use of profiling information is to help application performance optimization . This helps to find out memory usages , usage of particular instructions , check for CPU Utilization or frequency and duration of specific function calls . Analyze your application performance, review and optimize your code then rerun the profiler. Compare the result with your baseline result. Let your code fly Introducing Profiling Why do we need this ? Why it is important ? virtual techdays INDIA │ 28-30 September 2011
Application Profiling Life Cycle Just look into the different steps of Application Profiling Run Profiler Performance Report Application Analyze Reports Code Optimization Compare Performance Report virtual techdays INDIA │ 28-30 September 2011
Microsoft Visual Studio 2010 comes with built-in profiling tools that offer developers to analyze their application. Very Powerful tooling support to analyze. Visual Studio Profiling Tools support below methods of collecting performance data Sampling Instrumentation Memory Allocation Concurrency Supports JavaScript Profiling and Tier Interaction (TIP) It’s also helps to compare different performance reports Introducing Visual Studio 2010 Profiler Applicable with only Visual Studio 2010 Ultimate and Premium Edition virtual techdays INDIA │ 28-30 September 2011
Choose right Profiling Methods First know which method is suitable for your application. Sampling : This is useful for initial analysis of your application. Use sampling for analyzing CPU utilization issues . Instrumentation : Inspect the time for all functions used in the application during the current profile session. Check for all call out and call in functions For analyzing input/output performance issues . Memory Allocation : This uses sampling profiling method to collects .NET Framework memory allocation data Concurrency : Visualize the behavior of Multithread application virtual techdays INDIA │ 28-30 September 2011
DEMO: Deep dive into Visual studio profiler Abhijit Jana │ Consultant, Microsoft virtual techdays INDIA │ 28-30 September 2011
Inside Sampling Know something more about Sampling Profiling Visual Studio Profiler collects the function call stack by sending some interrupts the computer processor at set of intervals. The profiler analysis determines whether the processor is executing code in the target process. If the processor is executing the target code, the profiler increments the sample counts for each function on the call stack Measurements Inclusive samples Exclusive samples Inclusive percent Exclusive percent http :// msdn.microsoft.com/en-us/library/ms242753.aspx Profiler virtual techdays INDIA │ 28-30 September 2011
Inside Instrumentation Know more about Instrumentation Visual Studio Profiling Tools injects code at the start and end of target functions in the profiled binary This also inject codes before and after each call by instrumented functions to other functions. Main Measurement Elapsed Inclusive Elapsed Exclusive Application Inclusive Application Exclusive http:// msdn.microsoft.com/en-us/library/ms182369.aspx virtual techdays INDIA │ 28-30 September 2011
DEMO: Using Instrumentation With ASP.NET Application Abhijit Jana │ Consultant, Microsoft virtual techdays INDIA │ 28-30 September 2011
DEMO: Compering Profiler Result Abhijit Jana │ Consultant, Microsoft virtual techdays INDIA │ 28-30 September 2011
DEMO: Profiling ASP.NET Application With IIS Abhijit Jana │ Consultant, Microsoft virtual techdays INDIA │ 28-30 September 2011
DEMO: JavaScript Profiling Abhijit Jana │ Consultant, Microsoft virtual techdays INDIA │ 28-30 September 2011
DEMO: ASP.NET Load Testing and Profiling Abhijit Jana │ Consultant, Microsoft virtual techdays INDIA │ 28-30 September 2011
Beginners Guide to Performance Profiling Analyzing Application Performance by Using Profiling Tools How to Profile IIS Express with Visual Studio 2010 SP1 Useful Resources virtual techdays INDIA │ 28-30 September 2011
Questions & Answer virtual techdays INDIA │ 28-30 September 2011
abhijan@microsoft.com │ http://abhijitjana.net │ @AbhijitJana Thank You virtual techdays INDIA │ 28-30 September 2011

Tune Your ASP.NET Application Using Visual Studio 2010 Profiler

  • 1.
    Tune Your ASP.NETApplication Using Visual Studio 2010 Profiler Abhijit Jana │ Consultant, Microsoft http:// abhijitjana.net | @abhijitjana virtual techdays INDIA │ 28-30 September 2011
  • 2.
    Introducing Profiling Introducing Visual Studio 2010 Profiler Choose right Profiling Methods Deep dive into Visual studio profiler Use different techniques of profiling with asp.net apps Profile ASP.NET applications with IIS Profiling JavaScript ASP.NET load testing and Profiling Q/A S E S S I O N A G E N D A virtual techdays INDIA │ 28-30 September 2011
  • 3.
    Performance of an application is a key element that should be analyzed and optimized before it go for live. The most common use of profiling information is to help application performance optimization . This helps to find out memory usages , usage of particular instructions , check for CPU Utilization or frequency and duration of specific function calls . Analyze your application performance, review and optimize your code then rerun the profiler. Compare the result with your baseline result. Let your code fly Introducing Profiling Why do we need this ? Why it is important ? virtual techdays INDIA │ 28-30 September 2011
  • 4.
    Application Profiling LifeCycle Just look into the different steps of Application Profiling Run Profiler Performance Report Application Analyze Reports Code Optimization Compare Performance Report virtual techdays INDIA │ 28-30 September 2011
  • 5.
    Microsoft Visual Studio2010 comes with built-in profiling tools that offer developers to analyze their application. Very Powerful tooling support to analyze. Visual Studio Profiling Tools support below methods of collecting performance data Sampling Instrumentation Memory Allocation Concurrency Supports JavaScript Profiling and Tier Interaction (TIP) It’s also helps to compare different performance reports Introducing Visual Studio 2010 Profiler Applicable with only Visual Studio 2010 Ultimate and Premium Edition virtual techdays INDIA │ 28-30 September 2011
  • 6.
    Choose right ProfilingMethods First know which method is suitable for your application. Sampling : This is useful for initial analysis of your application. Use sampling for analyzing CPU utilization issues . Instrumentation : Inspect the time for all functions used in the application during the current profile session. Check for all call out and call in functions For analyzing input/output performance issues . Memory Allocation : This uses sampling profiling method to collects .NET Framework memory allocation data Concurrency : Visualize the behavior of Multithread application virtual techdays INDIA │ 28-30 September 2011
  • 7.
    DEMO: Deepdive into Visual studio profiler Abhijit Jana │ Consultant, Microsoft virtual techdays INDIA │ 28-30 September 2011
  • 8.
    Inside Sampling Knowsomething more about Sampling Profiling Visual Studio Profiler collects the function call stack by sending some interrupts the computer processor at set of intervals. The profiler analysis determines whether the processor is executing code in the target process. If the processor is executing the target code, the profiler increments the sample counts for each function on the call stack Measurements Inclusive samples Exclusive samples Inclusive percent Exclusive percent http :// msdn.microsoft.com/en-us/library/ms242753.aspx Profiler virtual techdays INDIA │ 28-30 September 2011
  • 9.
    Inside Instrumentation Knowmore about Instrumentation Visual Studio Profiling Tools injects code at the start and end of target functions in the profiled binary This also inject codes before and after each call by instrumented functions to other functions. Main Measurement Elapsed Inclusive Elapsed Exclusive Application Inclusive Application Exclusive http:// msdn.microsoft.com/en-us/library/ms182369.aspx virtual techdays INDIA │ 28-30 September 2011
  • 10.
    DEMO: Using InstrumentationWith ASP.NET Application Abhijit Jana │ Consultant, Microsoft virtual techdays INDIA │ 28-30 September 2011
  • 11.
    DEMO: Compering ProfilerResult Abhijit Jana │ Consultant, Microsoft virtual techdays INDIA │ 28-30 September 2011
  • 12.
    DEMO: ProfilingASP.NET Application With IIS Abhijit Jana │ Consultant, Microsoft virtual techdays INDIA │ 28-30 September 2011
  • 13.
    DEMO: JavaScriptProfiling Abhijit Jana │ Consultant, Microsoft virtual techdays INDIA │ 28-30 September 2011
  • 14.
    DEMO: ASP.NETLoad Testing and Profiling Abhijit Jana │ Consultant, Microsoft virtual techdays INDIA │ 28-30 September 2011
  • 15.
    Beginners Guide toPerformance Profiling Analyzing Application Performance by Using Profiling Tools How to Profile IIS Express with Visual Studio 2010 SP1 Useful Resources virtual techdays INDIA │ 28-30 September 2011
  • 16.
    Questions & Answervirtual techdays INDIA │ 28-30 September 2011
  • 17.
    abhijan@microsoft.com │ http://abhijitjana.net │ @AbhijitJana Thank You virtual techdays INDIA │ 28-30 September 2011