SlideShare a Scribd company logo
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
Ad

Recommended

PDF
How to Harden the Security of Your .NET Website
DNN
 
PDF
Security in practice with Java EE 6 and GlassFish
Markus Eisele
 
PDF
How to avoid top 10 security risks in Java EE applications and how to avoid them
Masoud Kalali
 
PDF
Web hackingtools cf-summit2014
ColdFusionConference
 
PPTX
Security testautomation
Linkesh Kanna Velu
 
KEY
SQL Server: Security
LearnNowOnline
 
PDF
CNIT 129S: 12: Attacking Users: Cross-Site Scripting (Part 1 of 2)
Sam Bowne
 
PDF
Security DevOps - Free pentesters' time to focus on high-hanging fruits // Ha...
Christian Schneider
 
PDF
CNIT 129S: Ch 5: Bypassing Client-Side Controls
Sam Bowne
 
PDF
ECS19 - Thomas Vochten - ESSENTIAL DATABASE ADMINISTRATION SKILLS FOR SHAREPO...
European Collaboration Summit
 
PPTX
Spa Secure Coding Guide
Geoffrey Vandiest
 
PDF
BlackHat USA 2013 Arsenal - Sparty : A FrontPage and SharePoint Security Audi...
Aditya K Sood
 
PPTX
Pushing the Boundaries - A Deep-Dive into Real-World SharePoint Add-In and Ap...
Eric Shupps
 
PDF
Web hackingtools 2015
ColdFusionConference
 
PPT
Build Database Applications for SharePoint
Iron Speed
 
PDF
OWASP Top 10 Proactive Controls 2016 - PHP Québec August 2017
Philippe Gamache
 
PPTX
Extracting Credentials From Windows
NetSPI
 
PDF
Securty Testing For RESTful Applications
Source Conference
 
PPTX
PowerShell for the Anxious ITPro
Jason Himmelstein
 
PDF
CNIT 129S: 11: Attacking Application Logic
Sam Bowne
 
PDF
CNIT 129S: 12: Attacking Users: Cross-Site Scripting (Part 2 of 3)
Sam Bowne
 
PPTX
Making sense of Microsoft Identities in a Hybrid world
Jason Himmelstein
 
PDF
SharePoint 2013 Performance Enhancements
Eric Shupps
 
PDF
Fuzzing and You: Automating Whitebox Testing
NetSPI
 
PDF
O365Con18 - SharePoint Framework for Administrators - Waldek Mastykarz
NCCOMMS
 
PPTX
[Pinto] Is my SharePoint Development team properly enlighted?
European Collaboration Summit
 
PPTX
ECS19 - Vesa Juvonen - SharePoint and Office 365 Development PowerClass
European Collaboration Summit
 
PPTX
SharePoint 2013 Performance Analysis - Robi Vončina
SPC Adriatics
 
PPTX
ATAGTR2017 Unified APM: The new age performance monitoring for production sys...
Agile Testing Alliance
 
PPTX
Performance Testing
Anu Shaji
 

More Related Content

What's hot (19)

PDF
CNIT 129S: Ch 5: Bypassing Client-Side Controls
Sam Bowne
 
PDF
ECS19 - Thomas Vochten - ESSENTIAL DATABASE ADMINISTRATION SKILLS FOR SHAREPO...
European Collaboration Summit
 
PPTX
Spa Secure Coding Guide
Geoffrey Vandiest
 
PDF
BlackHat USA 2013 Arsenal - Sparty : A FrontPage and SharePoint Security Audi...
Aditya K Sood
 
PPTX
Pushing the Boundaries - A Deep-Dive into Real-World SharePoint Add-In and Ap...
Eric Shupps
 
PDF
Web hackingtools 2015
ColdFusionConference
 
PPT
Build Database Applications for SharePoint
Iron Speed
 
PDF
OWASP Top 10 Proactive Controls 2016 - PHP Québec August 2017
Philippe Gamache
 
PPTX
Extracting Credentials From Windows
NetSPI
 
PDF
Securty Testing For RESTful Applications
Source Conference
 
PPTX
PowerShell for the Anxious ITPro
Jason Himmelstein
 
PDF
CNIT 129S: 11: Attacking Application Logic
Sam Bowne
 
PDF
CNIT 129S: 12: Attacking Users: Cross-Site Scripting (Part 2 of 3)
Sam Bowne
 
PPTX
Making sense of Microsoft Identities in a Hybrid world
Jason Himmelstein
 
PDF
SharePoint 2013 Performance Enhancements
Eric Shupps
 
PDF
Fuzzing and You: Automating Whitebox Testing
NetSPI
 
PDF
O365Con18 - SharePoint Framework for Administrators - Waldek Mastykarz
NCCOMMS
 
PPTX
[Pinto] Is my SharePoint Development team properly enlighted?
European Collaboration Summit
 
PPTX
ECS19 - Vesa Juvonen - SharePoint and Office 365 Development PowerClass
European Collaboration Summit
 
CNIT 129S: Ch 5: Bypassing Client-Side Controls
Sam Bowne
 
ECS19 - Thomas Vochten - ESSENTIAL DATABASE ADMINISTRATION SKILLS FOR SHAREPO...
European Collaboration Summit
 
Spa Secure Coding Guide
Geoffrey Vandiest
 
BlackHat USA 2013 Arsenal - Sparty : A FrontPage and SharePoint Security Audi...
Aditya K Sood
 
Pushing the Boundaries - A Deep-Dive into Real-World SharePoint Add-In and Ap...
Eric Shupps
 
Web hackingtools 2015
ColdFusionConference
 
Build Database Applications for SharePoint
Iron Speed
 
OWASP Top 10 Proactive Controls 2016 - PHP Québec August 2017
Philippe Gamache
 
Extracting Credentials From Windows
NetSPI
 
Securty Testing For RESTful Applications
Source Conference
 
PowerShell for the Anxious ITPro
Jason Himmelstein
 
CNIT 129S: 11: Attacking Application Logic
Sam Bowne
 
CNIT 129S: 12: Attacking Users: Cross-Site Scripting (Part 2 of 3)
Sam Bowne
 
Making sense of Microsoft Identities in a Hybrid world
Jason Himmelstein
 
SharePoint 2013 Performance Enhancements
Eric Shupps
 
Fuzzing and You: Automating Whitebox Testing
NetSPI
 
O365Con18 - SharePoint Framework for Administrators - Waldek Mastykarz
NCCOMMS
 
[Pinto] Is my SharePoint Development team properly enlighted?
European Collaboration Summit
 
ECS19 - Vesa Juvonen - SharePoint and Office 365 Development PowerClass
European Collaboration Summit
 

Similar to How to Do a Performance Audit of Your .NET Website (20)

PPTX
SharePoint 2013 Performance Analysis - Robi Vončina
SPC Adriatics
 
PPTX
ATAGTR2017 Unified APM: The new age performance monitoring for production sys...
Agile Testing Alliance
 
PPTX
Performance Testing
Anu Shaji
 
PPTX
Load testing with Visual Studio and Azure - Andrew Siemer
Andrew Siemer
 
PDF
Real User Monitoring: Getting Real Data from Real Users in the Real World - S...
Akamai Technologies
 
PDF
Boost the Performance of SharePoint Today!
Brian Culver
 
PPTX
Closing the door on application performance problems
ManageEngine, Zoho Corporation
 
PDF
SharePoint Saturday The Conference 2011 - SP2010 Performance
Brian Culver
 
PPT
Performance Testing Overview
James Venetsanakos
 
PPTX
Visibility-from web application interface to the database
ManageEngine, Zoho Corporation
 
PDF
Web Performance Optimization (WPO)
Betclic Everest Group Tech Team
 
PPTX
ASP.pptx
SwapnilPawar483968
 
PPTX
Application Performance Management
Noriaki Tatsumi
 
PDF
Performance Testing w/ WebPage Test Private Instance (DrupalCamp Ohio)
Bill Condo
 
PDF
Azure Application insights - An Introduction
Matthias Güntert
 
PPTX
Website performance optimization QA
Denis Dudaev
 
PPTX
Service quality monitoring system architecture
Matsuo Sawahashi
 
PDF
Analysing and Troubleshooting Performance Issues in SAP BusinessObjects BI Re...
BI Brainz
 
PDF
Scalability and performance for e commerce
Ecommerce Solution Provider SysIQ
 
PPTX
Optimize application performance - Mumbai Seminar
ManageEngine, Zoho Corporation
 
SharePoint 2013 Performance Analysis - Robi Vončina
SPC Adriatics
 
ATAGTR2017 Unified APM: The new age performance monitoring for production sys...
Agile Testing Alliance
 
Performance Testing
Anu Shaji
 
Load testing with Visual Studio and Azure - Andrew Siemer
Andrew Siemer
 
Real User Monitoring: Getting Real Data from Real Users in the Real World - S...
Akamai Technologies
 
Boost the Performance of SharePoint Today!
Brian Culver
 
Closing the door on application performance problems
ManageEngine, Zoho Corporation
 
SharePoint Saturday The Conference 2011 - SP2010 Performance
Brian Culver
 
Performance Testing Overview
James Venetsanakos
 
Visibility-from web application interface to the database
ManageEngine, Zoho Corporation
 
Web Performance Optimization (WPO)
Betclic Everest Group Tech Team
 
Application Performance Management
Noriaki Tatsumi
 
Performance Testing w/ WebPage Test Private Instance (DrupalCamp Ohio)
Bill Condo
 
Azure Application insights - An Introduction
Matthias Güntert
 
Website performance optimization QA
Denis Dudaev
 
Service quality monitoring system architecture
Matsuo Sawahashi
 
Analysing and Troubleshooting Performance Issues in SAP BusinessObjects BI Re...
BI Brainz
 
Scalability and performance for e commerce
Ecommerce Solution Provider SysIQ
 
Optimize application performance - Mumbai Seminar
ManageEngine, Zoho Corporation
 
Ad

More from DNN (20)

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

Recently uploaded (20)

PDF
Cyber Defense Matrix Workshop - RSA Conference
Priyanka Aash
 
PDF
GenAI Opportunities and Challenges - Where 370 Enterprises Are Focusing Now.pdf
Priyanka Aash
 
PDF
Lessons Learned from Developing Secure AI Workflows.pdf
Priyanka Aash
 
PDF
10 Key Challenges for AI within the EU Data Protection Framework.pdf
Priyanka Aash
 
PDF
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
Priyanka Aash
 
PDF
WebdriverIO & JavaScript: The Perfect Duo for Web Automation
digitaljignect
 
PDF
"Scaling in space and time with Temporal", Andriy Lupa.pdf
Fwdays
 
PDF
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
caoyixuan2019
 
PDF
Agentic AI for Developers and Data Scientists Build an AI Agent in 10 Lines o...
All Things Open
 
PDF
The Growing Value and Application of FME & GenAI
Safe Software
 
PDF
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Safe Software
 
PDF
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik
 
PDF
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Nilesh Gule
 
PDF
9-1-1 Addressing: End-to-End Automation Using FME
Safe Software
 
PDF
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
PPTX
Security Tips for Enterprise Azure Solutions
Michele Leroux Bustamante
 
PDF
cnc-processing-centers-centateq-p-110-en.pdf
AmirStern2
 
PPTX
UserCon Belgium: Honey, VMware increased my bill
stijn40
 
PPTX
Wenn alles versagt - IBM Tape schützt, was zählt! Und besonders mit dem neust...
Josef Weingand
 
PDF
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
 
Cyber Defense Matrix Workshop - RSA Conference
Priyanka Aash
 
GenAI Opportunities and Challenges - Where 370 Enterprises Are Focusing Now.pdf
Priyanka Aash
 
Lessons Learned from Developing Secure AI Workflows.pdf
Priyanka Aash
 
10 Key Challenges for AI within the EU Data Protection Framework.pdf
Priyanka Aash
 
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
Priyanka Aash
 
WebdriverIO & JavaScript: The Perfect Duo for Web Automation
digitaljignect
 
"Scaling in space and time with Temporal", Andriy Lupa.pdf
Fwdays
 
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
caoyixuan2019
 
Agentic AI for Developers and Data Scientists Build an AI Agent in 10 Lines o...
All Things Open
 
The Growing Value and Application of FME & GenAI
Safe Software
 
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Safe Software
 
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik
 
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Nilesh Gule
 
9-1-1 Addressing: End-to-End Automation Using FME
Safe Software
 
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
Security Tips for Enterprise Azure Solutions
Michele Leroux Bustamante
 
cnc-processing-centers-centateq-p-110-en.pdf
AmirStern2
 
UserCon Belgium: Honey, VMware increased my bill
stijn40
 
Wenn alles versagt - IBM Tape schützt, was zählt! Und besonders mit dem neust...
Josef Weingand
 
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
 

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