SlideShare ist ein Scribd-Unternehmen logo
1 von 33
Downloaden Sie, um offline zu lesen
How to do a Performance Audit of your
.NET Website
Bruce
Chapman
The Performance Audit
Common Scenario
• Live .NET Website
• Not running to full potential
• Key stakeholders want it ‘faster’
Performance Audit
• Look at each individual part
• Know which parts to improve
What we will cover:
• Breaking down overall performance of .NET Website
• Understanding tools and processes to discover problems
• Providing a report and recommendations
Common .NET Website Architecture
Html JS Client Side Files
ASP.NET Page .NET API
SQL Database
Each Tier needs to be checked
for performance issues
Our Example Site
Evoq 8.5 Build (DNN Platform Base)
Site has been modified to add in performance problems.
Home Page Products Page
Analysis Tool - NewRelic
Multiple Purpose Server/Site Monitoring Tool
• Add Agent to .NET Application
• Add Server Agent to Windows/IIS and SQL Server
Works by:
• Monitoring code in the .NET runtime
• Injecting a beacon into sampled page loads
• Monitoring system-level resources via Server Agents
Reports via NewRelic Website
• Embeddable Reports available
• Free and Paid tiers available
Analysis Tool – Microsoft Application Insights
Performance, Exception and Diagnostic Tool
• Add agent to .NET Application
• Create Account via Azure Portal
Works by:
• Tracking Http requests
• Browser tracking via injected code
• Exception log ingestion
• Server Performance Counters
Reports via Azure Portal
• Customized Reports
• Free tiers & pay for extra data points
Step 1 : Understand the Problem
NumberofAffectedPages
Number of Affected Users
Problem Impact
Site
Issue
Page
Issue
Specific
Issue
Understanding the Problem
Monitoring Software
• Overall site performance
• Compare response time / load
NewRelic : Apdex Score
• Samples data to provide score
• Ratio of Satisfied/Dissatisfied
• Page & App performance
Azure Application Insights
• Average Server Response Time
• Average Page Load Time
• Individual Request drill-down
• Performance Buckets
• Request Duration
• Responses by Operation (page/API)
Drill into the Problem – Identify Pages to Analyze
Page Specific Issues different to Site Issues
• High volume high performance can mask low volume low performance
Site Apdex
Home Page Apdex Product Page Apdex
High Volume,
Good Apdex
Low Volume,
Patchy Apdex
Analysis Tool : Page Load Time Chrome extension
• Simple Plug-in for Chrome
• Measures page load speed of sites
• Gives simple breakdown of load times
• Quick and Easy – gives instant feedback
Step 2 : Analyze Specific Page Performance
Quantify the performance of problem page
• Multiple page browse iterations (5-20)
• Copy results into Spreadsheet
• Check for consistency/inconsistency
Check some other pages
• Find the worst page to analyse
• Confirm assumptions of page vs site issue
Server Response vs Page DOM
• Look at the slowest part first
• Look for unusual issues like DNS
• Check for consistency (add to sheet)
Analysis Tool : WebPageTest.org
Free Service for testing
pages
• Choose connection type
• Run multiple tests
• Add in custom headers
Report:
• Scores page
• Shows individual
components
• Reports have permanent
URLs to save for tests
Understanding Web Page Test Results
• First Byte : Time taken for Browser to get first response
• Start Render : When the Browser receives enough data to render
• Document Complete : All resources are loaded
• Fully Loaded : Page is completely rendered
Home page clearly has a problem – further investigation needed
Record Page Speed Values
Keep the values from the page load test
• Comparison of First/Second request shows effectiveness of
caching
Add the statistics to the Performance Audit Report
Understanding Web Page Waterfall View
Waterfall View
• Sequential loading
• Colors show stages
of resource load
Used to Identify:
• Slow resources
• Blocking calls
• Bandwidth &
Memory
requirements
Impact of TTFB on
page load time
Step 3 : Analyze Server Side Performance
Server Side Performance : Making TTFB Faster
• ASP.NET Page Performance
• Database Performance
• API Performance (AJAX/SPA Code)
Key Questions
• ASP.NET Page Generation : Where is time being spent?
• API Calls : How fast are the API calls?
• Database Queries : How many, how long for?
• Server Load : How much CPU / Memory is used?
Analysis Tool – Glimpse
• Open Source .NET Analysis Platform
• Runs as a Diagnostics tool against server side code
• Installed as a Component on the Server
ASP.NET Page Performance
ASP.NET Pages – Request => [code happens] => Response
Key Questions :
• Where is time being spent? How can it run faster?
• How can we measure this in a production runtime environment?
Measurement Tool : Glimpse / Page Life Cycle
ASP.NET Page Tracing
• Glimpse can act as a tracing listener
• Install Glimpse as per instructions
• Add System.Diagnostics.Trace.WriteLine(“”) calls to suspect code
DoMyStuff();
Listener
Wrapper
Add trace to web.config
Reading Trace with Glimpse
Glimpse Trace Output
- Shows Trace Statements inserted
- Differential Time count shows slow
statements
Finding Slow Database Queries with Glimpse
Glimpse shows the DB Queries/Times
The ‘SQL’ tab lists the number of queries
and the execution time.
Sometimes requires several iterations to determine
slow queries – caching and query plans may cause
intermittent slow running.
Analysis Tool – SQL Server Profiler
SQL Server Trace ships with SQL Server
• Requires elevated permissions to connect
• Traces the execution of statements
• Best results by carefully setting filters – works well with strong
naming standards of Stored Procedures
Database Performance - NewRelic
Useful for Identifying Slow Procedures
• Measures time taken and individual avg response time
• Look for slow procedures running frequently : highest impact
• Does not identify slow procedures for individual requests
(unless SP only run on that request)
Record Slow Queries
Query text & Speed recorded in Performance Audit Report
Step 4 : Browser Resource Performance
Waterfall Results identify long-running or slow-loading resources:
Select slow
items for more
information
Finding Oversize and Broken Resources
Images / Videos / Large CSS files
• Slow Loading Time
• File Size
Look for redirects / 404 / 401 response codes
List large Resources
Step 5: Check for Site-wide Issues
• Check for issues which may be slowing down the server
• Not related to a specific page
• Hardware issues, software issues
• Exception Logs
Exception log from
Log4Net output
Analysis Tools - Server Resources
• Check Server Resources during running
Process Explorer (Sysinternals Suite)
• Inspect individual threads
• Identify memory leaks
Windows Task
Manager
Completed Performance Audit Report
Guide for reporting
and list of items to fix
Start Fixing the Site
•Prioritize by
•Performance Gain
•Ease of Fix
•Access to Skills
•Change one thing at a time
•Re-test to determine & document change
•Update Audit Report with new figures
•Repeat endlessly for continuous gains
Next Steps for fixing issues
After Fixing Example Site
1.5 seconds
Fixes Made
- Scale down images to reduce
size
- Fix 404 for broken resource
- Fix slow running SQL
Procedure
- Fix slow running .NET code
Improvement : 7 seconds
New WebPageTest Results
New TTFB : 255 ms
Reduced repeat requests
Reduced page size
Resources
NewRelic
http://www.newrelic.com
Application Insights
https://azure.microsoft.com/en-
us/services/application-insights/
Page Load Timer
https://github.com/alex-vv/chrome-
load-timer
Web Page Test
http://webpagetest.org/
Glimpse
http://getglimpse.com/
Process Explorer
https://technet.microsoft.com/en
-us/processexplorer
To learn more about our .NET CMS:
http://www.dnnsoftware.com

Weitere ähnliche Inhalte

Was ist angesagt?

Build Database Applications for SharePoint
Build Database Applications for SharePointBuild Database Applications for SharePoint
Build Database Applications for SharePoint
Iron Speed
 
Extracting Credentials From Windows
Extracting Credentials From WindowsExtracting Credentials From Windows
Extracting Credentials From Windows
NetSPI
 
SharePoint 2013 Performance Enhancements
SharePoint 2013 Performance EnhancementsSharePoint 2013 Performance Enhancements
SharePoint 2013 Performance Enhancements
Eric Shupps
 

Was ist angesagt? (19)

CNIT 129S: Ch 5: Bypassing Client-Side Controls
CNIT 129S: Ch 5: Bypassing Client-Side ControlsCNIT 129S: Ch 5: Bypassing Client-Side Controls
CNIT 129S: Ch 5: Bypassing Client-Side Controls
 
ECS19 - Thomas Vochten - ESSENTIAL DATABASE ADMINISTRATION SKILLS FOR SHAREPO...
ECS19 - Thomas Vochten - ESSENTIAL DATABASE ADMINISTRATION SKILLS FOR SHAREPO...ECS19 - Thomas Vochten - ESSENTIAL DATABASE ADMINISTRATION SKILLS FOR SHAREPO...
ECS19 - Thomas Vochten - ESSENTIAL DATABASE ADMINISTRATION SKILLS FOR SHAREPO...
 
Spa Secure Coding Guide
Spa Secure Coding GuideSpa Secure Coding Guide
Spa Secure Coding Guide
 
BlackHat USA 2013 Arsenal - Sparty : A FrontPage and SharePoint Security Audi...
BlackHat USA 2013 Arsenal - Sparty : A FrontPage and SharePoint Security Audi...BlackHat USA 2013 Arsenal - Sparty : A FrontPage and SharePoint Security Audi...
BlackHat USA 2013 Arsenal - Sparty : A FrontPage and SharePoint Security Audi...
 
Pushing the Boundaries - A Deep-Dive into Real-World SharePoint Add-In and Ap...
Pushing the Boundaries - A Deep-Dive into Real-World SharePoint Add-In and Ap...Pushing the Boundaries - A Deep-Dive into Real-World SharePoint Add-In and Ap...
Pushing the Boundaries - A Deep-Dive into Real-World SharePoint Add-In and Ap...
 
Web hackingtools 2015
Web hackingtools 2015Web hackingtools 2015
Web hackingtools 2015
 
Build Database Applications for SharePoint
Build Database Applications for SharePointBuild Database Applications for SharePoint
Build Database Applications for SharePoint
 
OWASP Top 10 Proactive Controls 2016 - PHP Québec August 2017
OWASP Top 10 Proactive Controls 2016 - PHP Québec August 2017OWASP Top 10 Proactive Controls 2016 - PHP Québec August 2017
OWASP Top 10 Proactive Controls 2016 - PHP Québec August 2017
 
Extracting Credentials From Windows
Extracting Credentials From WindowsExtracting Credentials From Windows
Extracting Credentials From Windows
 
Securty Testing For RESTful Applications
Securty Testing For RESTful ApplicationsSecurty Testing For RESTful Applications
Securty Testing For RESTful Applications
 
PowerShell for the Anxious ITPro
PowerShell for the Anxious ITProPowerShell for the Anxious ITPro
PowerShell for the Anxious ITPro
 
CNIT 129S: 11: Attacking Application Logic
CNIT 129S: 11: Attacking Application LogicCNIT 129S: 11: Attacking Application Logic
CNIT 129S: 11: Attacking Application Logic
 
CNIT 129S: 12: Attacking Users: Cross-Site Scripting (Part 2 of 3)
CNIT 129S: 12: Attacking Users: Cross-Site Scripting (Part 2 of 3)CNIT 129S: 12: Attacking Users: Cross-Site Scripting (Part 2 of 3)
CNIT 129S: 12: Attacking Users: Cross-Site Scripting (Part 2 of 3)
 
Making sense of Microsoft Identities in a Hybrid world
Making sense of Microsoft Identities in a Hybrid worldMaking sense of Microsoft Identities in a Hybrid world
Making sense of Microsoft Identities in a Hybrid world
 
SharePoint 2013 Performance Enhancements
SharePoint 2013 Performance EnhancementsSharePoint 2013 Performance Enhancements
SharePoint 2013 Performance Enhancements
 
Fuzzing and You: Automating Whitebox Testing
Fuzzing and You: Automating Whitebox TestingFuzzing and You: Automating Whitebox Testing
Fuzzing and You: Automating Whitebox Testing
 
O365Con18 - SharePoint Framework for Administrators - Waldek Mastykarz
O365Con18 - SharePoint Framework for Administrators - Waldek MastykarzO365Con18 - SharePoint Framework for Administrators - Waldek Mastykarz
O365Con18 - SharePoint Framework for Administrators - Waldek Mastykarz
 
[Pinto] Is my SharePoint Development team properly enlighted?
[Pinto] Is my SharePoint Development team properly enlighted?[Pinto] Is my SharePoint Development team properly enlighted?
[Pinto] Is my SharePoint Development team properly enlighted?
 
ECS19 - Vesa Juvonen - SharePoint and Office 365 Development PowerClass
ECS19 - Vesa Juvonen - SharePoint and Office 365 Development PowerClassECS19 - Vesa Juvonen - SharePoint and Office 365 Development PowerClass
ECS19 - Vesa Juvonen - SharePoint and Office 365 Development PowerClass
 

Ähnlich wie How to Do a Performance Audit of Your .NET Website

Website performance optimization QA
Website performance optimization QAWebsite performance optimization QA
Website performance optimization QA
Denis Dudaev
 

Ähnlich wie How to Do a Performance Audit of Your .NET Website (20)

SharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi VončinaSharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi Vončina
 
ATAGTR2017 Unified APM: The new age performance monitoring for production sys...
ATAGTR2017 Unified APM: The new age performance monitoring for production sys...ATAGTR2017 Unified APM: The new age performance monitoring for production sys...
ATAGTR2017 Unified APM: The new age performance monitoring for production sys...
 
Performance Testing
Performance TestingPerformance Testing
Performance Testing
 
Load testing with Visual Studio and Azure - Andrew Siemer
Load testing with Visual Studio and Azure - Andrew SiemerLoad testing with Visual Studio and Azure - Andrew Siemer
Load testing with Visual Studio and Azure - Andrew Siemer
 
Real User Monitoring: Getting Real Data from Real Users in the Real World - S...
Real User Monitoring: Getting Real Data from Real Users in the Real World - S...Real User Monitoring: Getting Real Data from Real Users in the Real World - S...
Real User Monitoring: Getting Real Data from Real Users in the Real World - S...
 
Boost the Performance of SharePoint Today!
Boost the Performance of SharePoint Today!Boost the Performance of SharePoint Today!
Boost the Performance of SharePoint Today!
 
Closing the door on application performance problems
Closing the door on application performance problemsClosing the door on application performance problems
Closing the door on application performance problems
 
SharePoint Saturday The Conference 2011 - SP2010 Performance
SharePoint Saturday The Conference 2011 - SP2010 PerformanceSharePoint Saturday The Conference 2011 - SP2010 Performance
SharePoint Saturday The Conference 2011 - SP2010 Performance
 
Performance Testing Overview
Performance Testing OverviewPerformance Testing Overview
Performance Testing Overview
 
Visibility-from web application interface to the database
Visibility-from web application interface to the databaseVisibility-from web application interface to the database
Visibility-from web application interface to the database
 
Web Performance Optimization (WPO)
Web Performance Optimization (WPO)Web Performance Optimization (WPO)
Web Performance Optimization (WPO)
 
ASP.pptx
ASP.pptxASP.pptx
ASP.pptx
 
Application Performance Management
Application Performance ManagementApplication Performance Management
Application Performance Management
 
Performance Testing w/ WebPage Test Private Instance (DrupalCamp Ohio)
Performance Testing w/ WebPage Test Private Instance (DrupalCamp Ohio)Performance Testing w/ WebPage Test Private Instance (DrupalCamp Ohio)
Performance Testing w/ WebPage Test Private Instance (DrupalCamp Ohio)
 
Azure Application insights - An Introduction
Azure Application insights - An IntroductionAzure Application insights - An Introduction
Azure Application insights - An Introduction
 
Website performance optimization QA
Website performance optimization QAWebsite performance optimization QA
Website performance optimization QA
 
Service quality monitoring system architecture
Service quality monitoring system architectureService quality monitoring system architecture
Service quality monitoring system architecture
 
Analysing and Troubleshooting Performance Issues in SAP BusinessObjects BI Re...
Analysing and Troubleshooting Performance Issues in SAP BusinessObjects BI Re...Analysing and Troubleshooting Performance Issues in SAP BusinessObjects BI Re...
Analysing and Troubleshooting Performance Issues in SAP BusinessObjects BI Re...
 
July webinar l How to Handle the Holiday Retail Rush with Agile Performance T...
July webinar l How to Handle the Holiday Retail Rush with Agile Performance T...July webinar l How to Handle the Holiday Retail Rush with Agile Performance T...
July webinar l How to Handle the Holiday Retail Rush with Agile Performance T...
 
Scalability and performance for e commerce
Scalability and performance for e commerceScalability and performance for e commerce
Scalability and performance for e commerce
 

Mehr von DNN

How to Make the Most of Google Analytics on Your Evoq Site
How to Make the Most of Google Analytics on Your Evoq SiteHow to Make the Most of Google Analytics on Your Evoq Site
How to Make the Most of Google Analytics on Your Evoq Site
DNN
 

Mehr von DNN (20)

How to Optimize the Performance of Your DNN Website
How to Optimize the Performance of Your DNN WebsiteHow to Optimize the Performance of Your DNN Website
How to Optimize the Performance of Your DNN Website
 
Renew with DNN
Renew with DNNRenew with DNN
Renew with DNN
 
Building Sites on DNN's Liquid Content: From Content Modeling to Front-End UX
Building Sites on DNN's Liquid Content: From Content Modeling to Front-End UXBuilding Sites on DNN's Liquid Content: From Content Modeling to Front-End UX
Building Sites on DNN's Liquid Content: From Content Modeling to Front-End UX
 
New Features in the Evoq CMS
New Features in the Evoq CMSNew Features in the Evoq CMS
New Features in the Evoq CMS
 
How to Make the Most of Google Analytics on Your Evoq Site
How to Make the Most of Google Analytics on Your Evoq SiteHow to Make the Most of Google Analytics on Your Evoq Site
How to Make the Most of Google Analytics on Your Evoq Site
 
How the Right CMS Makes Content Future-Friendly
How the Right CMS Makes Content Future-FriendlyHow the Right CMS Makes Content Future-Friendly
How the Right CMS Makes Content Future-Friendly
 
Why Marketing and IT Will Love the New DNN
Why Marketing and IT Will Love the New DNNWhy Marketing and IT Will Love the New DNN
Why Marketing and IT Will Love the New DNN
 
How to Select the Right CMS
How to Select the Right CMSHow to Select the Right CMS
How to Select the Right CMS
 
10 Essential Features of an Intranet CMS
10 Essential Features of an Intranet CMS10 Essential Features of an Intranet CMS
10 Essential Features of an Intranet CMS
 
How to Improve Your SEO with a Web CMS
How to Improve Your SEO with a Web CMSHow to Improve Your SEO with a Web CMS
How to Improve Your SEO with a Web CMS
 
How to Build Modern Web Applications Using Microservices
How to Build Modern Web Applications Using MicroservicesHow to Build Modern Web Applications Using Microservices
How to Build Modern Web Applications Using Microservices
 
Improve Your Website by Removing These 30 Things
Improve Your Website by Removing These 30 ThingsImprove Your Website by Removing These 30 Things
Improve Your Website by Removing These 30 Things
 
How Structured Content Increases the ROI of Your Content
How Structured Content Increases the ROI of Your ContentHow Structured Content Increases the ROI of Your Content
How Structured Content Increases the ROI of Your Content
 
Lessons from Leading Intranet Homepages
Lessons from Leading Intranet HomepagesLessons from Leading Intranet Homepages
Lessons from Leading Intranet Homepages
 
How to Make Your Content Future-Ready
How to Make Your Content Future-ReadyHow to Make Your Content Future-Ready
How to Make Your Content Future-Ready
 
Achieve Intranet Success by Avoiding These Common Mistakes
Achieve Intranet Success by Avoiding These Common MistakesAchieve Intranet Success by Avoiding These Common Mistakes
Achieve Intranet Success by Avoiding These Common Mistakes
 
Developing an Intranet Strategy
Developing an Intranet StrategyDeveloping an Intranet Strategy
Developing an Intranet Strategy
 
How Evoq Helps You Build Modern Web Applications
How Evoq Helps You Build Modern Web ApplicationsHow Evoq Helps You Build Modern Web Applications
How Evoq Helps You Build Modern Web Applications
 
DNN Launch Webinar: DNN Platform 8.0 and Evoq 8.3
DNN Launch Webinar: DNN Platform 8.0 and Evoq 8.3DNN Launch Webinar: DNN Platform 8.0 and Evoq 8.3
DNN Launch Webinar: DNN Platform 8.0 and Evoq 8.3
 
5 Evoq Features You Didn't Know Existed
5 Evoq Features You Didn't Know Existed5 Evoq Features You Didn't Know Existed
5 Evoq Features You Didn't Know Existed
 

Kürzlich hochgeladen

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Kürzlich hochgeladen (20)

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 

How to Do a Performance Audit of Your .NET Website

  • 1. How to do a Performance Audit of your .NET Website Bruce Chapman
  • 2. The Performance Audit Common Scenario • Live .NET Website • Not running to full potential • Key stakeholders want it ‘faster’ Performance Audit • Look at each individual part • Know which parts to improve What we will cover: • Breaking down overall performance of .NET Website • Understanding tools and processes to discover problems • Providing a report and recommendations
  • 3. Common .NET Website Architecture Html JS Client Side Files ASP.NET Page .NET API SQL Database Each Tier needs to be checked for performance issues
  • 4. Our Example Site Evoq 8.5 Build (DNN Platform Base) Site has been modified to add in performance problems. Home Page Products Page
  • 5. Analysis Tool - NewRelic Multiple Purpose Server/Site Monitoring Tool • Add Agent to .NET Application • Add Server Agent to Windows/IIS and SQL Server Works by: • Monitoring code in the .NET runtime • Injecting a beacon into sampled page loads • Monitoring system-level resources via Server Agents Reports via NewRelic Website • Embeddable Reports available • Free and Paid tiers available
  • 6. Analysis Tool – Microsoft Application Insights Performance, Exception and Diagnostic Tool • Add agent to .NET Application • Create Account via Azure Portal Works by: • Tracking Http requests • Browser tracking via injected code • Exception log ingestion • Server Performance Counters Reports via Azure Portal • Customized Reports • Free tiers & pay for extra data points
  • 7. Step 1 : Understand the Problem NumberofAffectedPages Number of Affected Users Problem Impact Site Issue Page Issue Specific Issue
  • 8. Understanding the Problem Monitoring Software • Overall site performance • Compare response time / load NewRelic : Apdex Score • Samples data to provide score • Ratio of Satisfied/Dissatisfied • Page & App performance Azure Application Insights • Average Server Response Time • Average Page Load Time • Individual Request drill-down • Performance Buckets • Request Duration • Responses by Operation (page/API)
  • 9. Drill into the Problem – Identify Pages to Analyze Page Specific Issues different to Site Issues • High volume high performance can mask low volume low performance Site Apdex Home Page Apdex Product Page Apdex High Volume, Good Apdex Low Volume, Patchy Apdex
  • 10. Analysis Tool : Page Load Time Chrome extension • Simple Plug-in for Chrome • Measures page load speed of sites • Gives simple breakdown of load times • Quick and Easy – gives instant feedback
  • 11. Step 2 : Analyze Specific Page Performance Quantify the performance of problem page • Multiple page browse iterations (5-20) • Copy results into Spreadsheet • Check for consistency/inconsistency Check some other pages • Find the worst page to analyse • Confirm assumptions of page vs site issue Server Response vs Page DOM • Look at the slowest part first • Look for unusual issues like DNS • Check for consistency (add to sheet)
  • 12. Analysis Tool : WebPageTest.org Free Service for testing pages • Choose connection type • Run multiple tests • Add in custom headers Report: • Scores page • Shows individual components • Reports have permanent URLs to save for tests
  • 13. Understanding Web Page Test Results • First Byte : Time taken for Browser to get first response • Start Render : When the Browser receives enough data to render • Document Complete : All resources are loaded • Fully Loaded : Page is completely rendered Home page clearly has a problem – further investigation needed
  • 14. Record Page Speed Values Keep the values from the page load test • Comparison of First/Second request shows effectiveness of caching Add the statistics to the Performance Audit Report
  • 15. Understanding Web Page Waterfall View Waterfall View • Sequential loading • Colors show stages of resource load Used to Identify: • Slow resources • Blocking calls • Bandwidth & Memory requirements Impact of TTFB on page load time
  • 16. Step 3 : Analyze Server Side Performance Server Side Performance : Making TTFB Faster • ASP.NET Page Performance • Database Performance • API Performance (AJAX/SPA Code) Key Questions • ASP.NET Page Generation : Where is time being spent? • API Calls : How fast are the API calls? • Database Queries : How many, how long for? • Server Load : How much CPU / Memory is used?
  • 17. Analysis Tool – Glimpse • Open Source .NET Analysis Platform • Runs as a Diagnostics tool against server side code • Installed as a Component on the Server
  • 18. ASP.NET Page Performance ASP.NET Pages – Request => [code happens] => Response Key Questions : • Where is time being spent? How can it run faster? • How can we measure this in a production runtime environment? Measurement Tool : Glimpse / Page Life Cycle
  • 19. ASP.NET Page Tracing • Glimpse can act as a tracing listener • Install Glimpse as per instructions • Add System.Diagnostics.Trace.WriteLine(“”) calls to suspect code DoMyStuff(); Listener Wrapper Add trace to web.config
  • 20. Reading Trace with Glimpse Glimpse Trace Output - Shows Trace Statements inserted - Differential Time count shows slow statements
  • 21. Finding Slow Database Queries with Glimpse Glimpse shows the DB Queries/Times The ‘SQL’ tab lists the number of queries and the execution time. Sometimes requires several iterations to determine slow queries – caching and query plans may cause intermittent slow running.
  • 22. Analysis Tool – SQL Server Profiler SQL Server Trace ships with SQL Server • Requires elevated permissions to connect • Traces the execution of statements • Best results by carefully setting filters – works well with strong naming standards of Stored Procedures
  • 23. Database Performance - NewRelic Useful for Identifying Slow Procedures • Measures time taken and individual avg response time • Look for slow procedures running frequently : highest impact • Does not identify slow procedures for individual requests (unless SP only run on that request)
  • 24. Record Slow Queries Query text & Speed recorded in Performance Audit Report
  • 25. Step 4 : Browser Resource Performance Waterfall Results identify long-running or slow-loading resources: Select slow items for more information
  • 26. Finding Oversize and Broken Resources Images / Videos / Large CSS files • Slow Loading Time • File Size Look for redirects / 404 / 401 response codes List large Resources
  • 27. Step 5: Check for Site-wide Issues • Check for issues which may be slowing down the server • Not related to a specific page • Hardware issues, software issues • Exception Logs Exception log from Log4Net output
  • 28. Analysis Tools - Server Resources • Check Server Resources during running Process Explorer (Sysinternals Suite) • Inspect individual threads • Identify memory leaks Windows Task Manager
  • 29. Completed Performance Audit Report Guide for reporting and list of items to fix
  • 30. Start Fixing the Site •Prioritize by •Performance Gain •Ease of Fix •Access to Skills •Change one thing at a time •Re-test to determine & document change •Update Audit Report with new figures •Repeat endlessly for continuous gains Next Steps for fixing issues
  • 31. After Fixing Example Site 1.5 seconds Fixes Made - Scale down images to reduce size - Fix 404 for broken resource - Fix slow running SQL Procedure - Fix slow running .NET code Improvement : 7 seconds
  • 32. New WebPageTest Results New TTFB : 255 ms Reduced repeat requests Reduced page size
  • 33. Resources NewRelic http://www.newrelic.com Application Insights https://azure.microsoft.com/en- us/services/application-insights/ Page Load Timer https://github.com/alex-vv/chrome- load-timer Web Page Test http://webpagetest.org/ Glimpse http://getglimpse.com/ Process Explorer https://technet.microsoft.com/en -us/processexplorer To learn more about our .NET CMS: http://www.dnnsoftware.com