SlideShare une entreprise Scribd logo
1  sur  33
Télécharger pour lire hors ligne
Performance Monitoring
      John McCaffrey
1. Why does performance matter?
2. Know your Business Metrics
3. Quick ways assess application performance
4. Monitoring tools to help you track performance
Why does performance matter?
•   Revenue
•   Costs
•   Time
•   Competition
•   User satisfaction
Why does performance matter?
• Google cares!
• "Speeding up websites is important .. faster sites don't
  just improve user experience...improving site speed also
  reduces operating costs. Like us, our users place a lot of
  value in speed - that's why we've decided to take site
  speed into account in our search rankings. "
When should I start caring?
•   Capacity planning
•   Design
•   Growth
•   Development
•   Testing
•   Deployment
•   Monitoring
What am I tracking?
Business Metrics

•   Page visits per day
•   Page visits per user per day
•   Time on site
•   Searches performed
•   Products views
•   Orders
SHOPZILLA

            Improving
            from 6 sec
            down to
            1.2
            seconds




               6
Netflix:
43% drop in outbound traffic
after enabling gzip




                               7
Making a business case
So we know that performance matters.
Now what?




                                   9
Performance Terms
Latency    = seconds per job, or "how long it takes"
Throughput = jobs per second, or "how many workers"

Average Response time = average latency
Requests per second = average throughput

If 1 worker that can compute 1 job in .5 sec
       latency = .5 secs per job
       throughput = 2 jobs per sec
Quick ways to check your stats
• Eyeball the log files
• Use Log reading tool
• Use browser tools
  o Confirm your dev env vs staging
• External site tests
  o Compare values outside of your network
  o Repeatable tests
Eyeball it
 Processing UserSessionsController#new (for 127.0.0.1 at
2010-05-15 10:11:09) [GET]
  Parameters: {"action"=>"new", "controller"=>"user_sessions"}
Rendering template within layouts/login
Rendering user_sessions/new
Completed in 202ms (View: 105, DB: 42) | 200 OK [http://localhost/
login]
Log analyzer
gem install request-log-analyzer
request-log-analyzer log/development.log
Yslow
Page Speed
Speed Tracer
Microsoft tools
– Dynatrace
– MsFast
– VRTA
– Fiddler
– Developer tools
Dom Monster




http://javascriptrocks.com/performance/



                                          18
Are these numbers right?
•   Are they consistent?
•   Do they seem reasonable
•   How can we repeat the tests?
•   Can we reproduce them in all environments?
•   What should we investigate next?
External tools
– http://zoompf.com
– http://webo.name/
– http://tools.pingdom.com/
– http://gtmetrix.com
– http://www.webpagetest.org/
– http://www.site-perf.com/
– http://webwait.com
GtMetrix.com




               21
Don’t change anything!
– Resist the urge to change a bunch of stuff
– Test coverage
– repeatable perf tests
– don't break anything!
– focus on low hanging fruit first
– get your monitoring in place before you make any
  major changes
– don't make it less maintainable
– pair & share
Taking multiple measurements
– Monitor performance over time
– Manually keep an eye on your yslow/resp time
– http://loadimpact.com/
– Apache Bench, Httperf
– Jmeter
showslow.com




http://127.0.0.1/showslow/
New Relic
New Relic
Rails Metrics




                27
Rack Bug




           28
Now What?
– Summarize and describe your observations
– Prioritize based on ease of change and expected
  impact
– Make your changes in a branch
– Compare your results
– Look for patterns of optimization
– Work with your team
Nuggets of Wisdom
•   Gzip
•   Get very familiar with yslow
•   Look through your logs, analyze them
•   Turn on slow query logging for db
•   Upgrade your libraries (js, plugins)
•   Use RVM (try new plugins, rails, ruby)



                                             30
Upcoming Presentations
– Chicago Javascript
   – Improving Page performance

– ChicagoRuby
   – Improving Rails app performance
   – Improving Developer performance!

– WindyCityRails 2010
   – Improving Rails Application Performance

– twitter: @j_mccaffrey
References
– http://railsperformance.blogspot.com/ (me)
– Railslab http://railslab.newrelic.com/
– Steve Souders http://www.stevesouders.com/blog/
– http://velocityconference.blip.tv/
– http://code.google.com/events/io/2010/
–   http://speedgeeks-la.blip.tv/
–   http://developer.yahoo.com/performance/
–   http://code.google.com/speed/page-speed
References
• http://guides.rubyonrails.org/performance_testing.html




                                                           33

Contenu connexe

Tendances

Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Timothy Fisher
 
Avoiding integration hell
Avoiding integration hellAvoiding integration hell
Avoiding integration hellaaronbassett
 
Seven Jobs You Should Be Running #sqlsat126
Seven Jobs You Should Be Running #sqlsat126Seven Jobs You Should Be Running #sqlsat126
Seven Jobs You Should Be Running #sqlsat126Mike Hillwig
 
A tale of 3 databases
A tale of 3 databasesA tale of 3 databases
A tale of 3 databasesChris Skardon
 
Untangling - fall2017 - week 8
Untangling - fall2017 - week 8Untangling - fall2017 - week 8
Untangling - fall2017 - week 8Derek Jacoby
 
CI/CD and Asset Serving for Single Page Apps
CI/CD and Asset Serving for Single Page AppsCI/CD and Asset Serving for Single Page Apps
CI/CD and Asset Serving for Single Page AppsMike North
 
Saving Time By Testing With Jest
Saving Time By Testing With JestSaving Time By Testing With Jest
Saving Time By Testing With JestBen McCormick
 
In-house web automation?
In-house web automation?In-house web automation?
In-house web automation?Adam Christian
 
User-percieved performance
User-percieved performanceUser-percieved performance
User-percieved performanceMike North
 
Flexible UI Components for a Multi-Framework World
Flexible UI Components for a Multi-Framework WorldFlexible UI Components for a Multi-Framework World
Flexible UI Components for a Multi-Framework WorldKevin Ball
 
Python to go
Python to goPython to go
Python to goWeng Wei
 
Hadoop Demystified + Automation Smackdown! Austin JUG June 24 2014
Hadoop Demystified + Automation Smackdown!  Austin JUG June 24 2014Hadoop Demystified + Automation Smackdown!  Austin JUG June 24 2014
Hadoop Demystified + Automation Smackdown! Austin JUG June 24 2014datafundamentals
 
Ruby performance - The low hanging fruit
Ruby performance - The low hanging fruitRuby performance - The low hanging fruit
Ruby performance - The low hanging fruitBruce Werdschinski
 
Rails Performance Tricks and Treats
Rails Performance Tricks and TreatsRails Performance Tricks and Treats
Rails Performance Tricks and TreatsMarshall Yount
 
Performance - When, What and How
Performance - When, What and HowPerformance - When, What and How
Performance - When, What and HowAstrails
 
Optimizing Your Site for Holiday Traffic
Optimizing Your Site for Holiday TrafficOptimizing Your Site for Holiday Traffic
Optimizing Your Site for Holiday TrafficWP Engine UK
 
Michael North "Ember.js 2 - Future-friendly ambitious apps, that scale!"
Michael North "Ember.js 2 - Future-friendly ambitious apps, that scale!"Michael North "Ember.js 2 - Future-friendly ambitious apps, that scale!"
Michael North "Ember.js 2 - Future-friendly ambitious apps, that scale!"Fwdays
 
Write Once, Run Everywhere - Ember.js Munich
Write Once, Run Everywhere - Ember.js MunichWrite Once, Run Everywhere - Ember.js Munich
Write Once, Run Everywhere - Ember.js MunichMike North
 
Deployment Nirvana
Deployment NirvanaDeployment Nirvana
Deployment NirvanaAdrian Pike
 
Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Derek Jacoby
 

Tendances (20)

Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011
 
Avoiding integration hell
Avoiding integration hellAvoiding integration hell
Avoiding integration hell
 
Seven Jobs You Should Be Running #sqlsat126
Seven Jobs You Should Be Running #sqlsat126Seven Jobs You Should Be Running #sqlsat126
Seven Jobs You Should Be Running #sqlsat126
 
A tale of 3 databases
A tale of 3 databasesA tale of 3 databases
A tale of 3 databases
 
Untangling - fall2017 - week 8
Untangling - fall2017 - week 8Untangling - fall2017 - week 8
Untangling - fall2017 - week 8
 
CI/CD and Asset Serving for Single Page Apps
CI/CD and Asset Serving for Single Page AppsCI/CD and Asset Serving for Single Page Apps
CI/CD and Asset Serving for Single Page Apps
 
Saving Time By Testing With Jest
Saving Time By Testing With JestSaving Time By Testing With Jest
Saving Time By Testing With Jest
 
In-house web automation?
In-house web automation?In-house web automation?
In-house web automation?
 
User-percieved performance
User-percieved performanceUser-percieved performance
User-percieved performance
 
Flexible UI Components for a Multi-Framework World
Flexible UI Components for a Multi-Framework WorldFlexible UI Components for a Multi-Framework World
Flexible UI Components for a Multi-Framework World
 
Python to go
Python to goPython to go
Python to go
 
Hadoop Demystified + Automation Smackdown! Austin JUG June 24 2014
Hadoop Demystified + Automation Smackdown!  Austin JUG June 24 2014Hadoop Demystified + Automation Smackdown!  Austin JUG June 24 2014
Hadoop Demystified + Automation Smackdown! Austin JUG June 24 2014
 
Ruby performance - The low hanging fruit
Ruby performance - The low hanging fruitRuby performance - The low hanging fruit
Ruby performance - The low hanging fruit
 
Rails Performance Tricks and Treats
Rails Performance Tricks and TreatsRails Performance Tricks and Treats
Rails Performance Tricks and Treats
 
Performance - When, What and How
Performance - When, What and HowPerformance - When, What and How
Performance - When, What and How
 
Optimizing Your Site for Holiday Traffic
Optimizing Your Site for Holiday TrafficOptimizing Your Site for Holiday Traffic
Optimizing Your Site for Holiday Traffic
 
Michael North "Ember.js 2 - Future-friendly ambitious apps, that scale!"
Michael North "Ember.js 2 - Future-friendly ambitious apps, that scale!"Michael North "Ember.js 2 - Future-friendly ambitious apps, that scale!"
Michael North "Ember.js 2 - Future-friendly ambitious apps, that scale!"
 
Write Once, Run Everywhere - Ember.js Munich
Write Once, Run Everywhere - Ember.js MunichWrite Once, Run Everywhere - Ember.js Munich
Write Once, Run Everywhere - Ember.js Munich
 
Deployment Nirvana
Deployment NirvanaDeployment Nirvana
Deployment Nirvana
 
Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Untangling - fall2017 - week 9
Untangling - fall2017 - week 9
 

Similaire à improving the performance of Rails web Applications

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...Agile Testing Alliance
 
Deploy Faster Without Failing Faster - Metrics-Driven - Dynatrace User Groups...
Deploy Faster Without Failing Faster - Metrics-Driven - Dynatrace User Groups...Deploy Faster Without Failing Faster - Metrics-Driven - Dynatrace User Groups...
Deploy Faster Without Failing Faster - Metrics-Driven - Dynatrace User Groups...Andreas Grabner
 
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 PotsdamFrom Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 PotsdamAndreas Grabner
 
Ag02 agile practices - dnc14 handouts
Ag02   agile practices - dnc14 handoutsAg02   agile practices - dnc14 handouts
Ag02 agile practices - dnc14 handoutsDotNetCampus
 
Optimus XPages: An Explosion of Techniques and Best Practices
Optimus XPages: An Explosion of Techniques and Best PracticesOptimus XPages: An Explosion of Techniques and Best Practices
Optimus XPages: An Explosion of Techniques and Best PracticesTeamstudio
 
Микола Ковш “Performance Testing Implementation From Scratch. Why? When and H...
Микола Ковш “Performance Testing Implementation From Scratch. Why? When and H...Микола Ковш “Performance Testing Implementation From Scratch. Why? When and H...
Микола Ковш “Performance Testing Implementation From Scratch. Why? When and H...Dakiry
 
Performance Testing from Scratch + JMeter intro
Performance Testing from Scratch + JMeter introPerformance Testing from Scratch + JMeter intro
Performance Testing from Scratch + JMeter introMykola Kovsh
 
[DPE Summit] How Improving the Testing Experience Goes Beyond Quality: A Deve...
[DPE Summit] How Improving the Testing Experience Goes Beyond Quality: A Deve...[DPE Summit] How Improving the Testing Experience Goes Beyond Quality: A Deve...
[DPE Summit] How Improving the Testing Experience Goes Beyond Quality: A Deve...Roberto Pérez Alcolea
 
5 Key Metrics to Release Better Software Faster
5 Key Metrics to Release Better Software Faster5 Key Metrics to Release Better Software Faster
5 Key Metrics to Release Better Software FasterDynatrace
 
Performance Metrics for your Build Pipeline - presented at Vienna WebPerf Oct...
Performance Metrics for your Build Pipeline - presented at Vienna WebPerf Oct...Performance Metrics for your Build Pipeline - presented at Vienna WebPerf Oct...
Performance Metrics for your Build Pipeline - presented at Vienna WebPerf Oct...Andreas Grabner
 
Edge 2014: A Modern Approach to Performance Monitoring
Edge 2014: A Modern Approach to Performance MonitoringEdge 2014: A Modern Approach to Performance Monitoring
Edge 2014: A Modern Approach to Performance MonitoringAkamai Technologies
 
DevOPs Transformation Workshop
DevOPs Transformation WorkshopDevOPs Transformation Workshop
DevOPs Transformation WorkshopJules Pierre-Louis
 
Mobile User Experience: Auto Drive through Performance Metrics
Mobile User Experience:Auto Drive through Performance MetricsMobile User Experience:Auto Drive through Performance Metrics
Mobile User Experience: Auto Drive through Performance MetricsAndreas Grabner
 
PAC 2019 virtual Bruno Audoux
PAC 2019 virtual Bruno Audoux PAC 2019 virtual Bruno Audoux
PAC 2019 virtual Bruno Audoux Neotys
 
Training Webinar: Detect Performance Bottlenecks of Applications
Training Webinar: Detect Performance Bottlenecks of ApplicationsTraining Webinar: Detect Performance Bottlenecks of Applications
Training Webinar: Detect Performance Bottlenecks of ApplicationsOutSystems
 
Performance profiling and testing of symfony application 2
Performance profiling and testing of symfony application 2Performance profiling and testing of symfony application 2
Performance profiling and testing of symfony application 2Andrew Yatsenko
 
A Modern Approach to Performance Monitoring
A Modern Approach to Performance MonitoringA Modern Approach to Performance Monitoring
A Modern Approach to Performance MonitoringCliff Crocker
 
Performance testing in scope of migration to cloud by Serghei Radov
Performance testing in scope of migration to cloud by Serghei RadovPerformance testing in scope of migration to cloud by Serghei Radov
Performance testing in scope of migration to cloud by Serghei RadovValeriia Maliarenko
 

Similaire à improving the performance of Rails web Applications (20)

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...
 
Deploy Faster Without Failing Faster - Metrics-Driven - Dynatrace User Groups...
Deploy Faster Without Failing Faster - Metrics-Driven - Dynatrace User Groups...Deploy Faster Without Failing Faster - Metrics-Driven - Dynatrace User Groups...
Deploy Faster Without Failing Faster - Metrics-Driven - Dynatrace User Groups...
 
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 PotsdamFrom Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
 
Web Performance Optimization (WPO)
Web Performance Optimization (WPO)Web Performance Optimization (WPO)
Web Performance Optimization (WPO)
 
Ag02 agile practices - dnc14 handouts
Ag02   agile practices - dnc14 handoutsAg02   agile practices - dnc14 handouts
Ag02 agile practices - dnc14 handouts
 
Optimus XPages: An Explosion of Techniques and Best Practices
Optimus XPages: An Explosion of Techniques and Best PracticesOptimus XPages: An Explosion of Techniques and Best Practices
Optimus XPages: An Explosion of Techniques and Best Practices
 
Микола Ковш “Performance Testing Implementation From Scratch. Why? When and H...
Микола Ковш “Performance Testing Implementation From Scratch. Why? When and H...Микола Ковш “Performance Testing Implementation From Scratch. Why? When and H...
Микола Ковш “Performance Testing Implementation From Scratch. Why? When and H...
 
Performance Testing from Scratch + JMeter intro
Performance Testing from Scratch + JMeter introPerformance Testing from Scratch + JMeter intro
Performance Testing from Scratch + JMeter intro
 
[DPE Summit] How Improving the Testing Experience Goes Beyond Quality: A Deve...
[DPE Summit] How Improving the Testing Experience Goes Beyond Quality: A Deve...[DPE Summit] How Improving the Testing Experience Goes Beyond Quality: A Deve...
[DPE Summit] How Improving the Testing Experience Goes Beyond Quality: A Deve...
 
5 Key Metrics to Release Better Software Faster
5 Key Metrics to Release Better Software Faster5 Key Metrics to Release Better Software Faster
5 Key Metrics to Release Better Software Faster
 
Performance Metrics for your Build Pipeline - presented at Vienna WebPerf Oct...
Performance Metrics for your Build Pipeline - presented at Vienna WebPerf Oct...Performance Metrics for your Build Pipeline - presented at Vienna WebPerf Oct...
Performance Metrics for your Build Pipeline - presented at Vienna WebPerf Oct...
 
Edge 2014: A Modern Approach to Performance Monitoring
Edge 2014: A Modern Approach to Performance MonitoringEdge 2014: A Modern Approach to Performance Monitoring
Edge 2014: A Modern Approach to Performance Monitoring
 
DevOPs Transformation Workshop
DevOPs Transformation WorkshopDevOPs Transformation Workshop
DevOPs Transformation Workshop
 
Mobile User Experience: Auto Drive through Performance Metrics
Mobile User Experience:Auto Drive through Performance MetricsMobile User Experience:Auto Drive through Performance Metrics
Mobile User Experience: Auto Drive through Performance Metrics
 
PAC 2019 virtual Bruno Audoux
PAC 2019 virtual Bruno Audoux PAC 2019 virtual Bruno Audoux
PAC 2019 virtual Bruno Audoux
 
Training Webinar: Detect Performance Bottlenecks of Applications
Training Webinar: Detect Performance Bottlenecks of ApplicationsTraining Webinar: Detect Performance Bottlenecks of Applications
Training Webinar: Detect Performance Bottlenecks of Applications
 
Performance profiling and testing of symfony application 2
Performance profiling and testing of symfony application 2Performance profiling and testing of symfony application 2
Performance profiling and testing of symfony application 2
 
A Modern Approach to Performance Monitoring
A Modern Approach to Performance MonitoringA Modern Approach to Performance Monitoring
A Modern Approach to Performance Monitoring
 
Performance testing in scope of migration to cloud by Serghei Radov
Performance testing in scope of migration to cloud by Serghei RadovPerformance testing in scope of migration to cloud by Serghei Radov
Performance testing in scope of migration to cloud by Serghei Radov
 
Salesforce Performance hacks - Client Side
Salesforce Performance hacks - Client SideSalesforce Performance hacks - Client Side
Salesforce Performance hacks - Client Side
 

Plus de John McCaffrey

A Taste of TDD: The basics of TDD, why it is hard and how to do it better
A Taste of TDD: The basics of TDD, why it is hard and how to do it betterA Taste of TDD: The basics of TDD, why it is hard and how to do it better
A Taste of TDD: The basics of TDD, why it is hard and how to do it betterJohn McCaffrey
 
Becoming a more Productive Rails Developer
Becoming a more Productive Rails DeveloperBecoming a more Productive Rails Developer
Becoming a more Productive Rails DeveloperJohn McCaffrey
 
LeanStartup:Research is cheaper than development
LeanStartup:Research is cheaper than developmentLeanStartup:Research is cheaper than development
LeanStartup:Research is cheaper than developmentJohn McCaffrey
 
Becoming a more productive Rails Developer
Becoming a more productive Rails DeveloperBecoming a more productive Rails Developer
Becoming a more productive Rails DeveloperJohn McCaffrey
 
Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...
Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...
Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...John McCaffrey
 
PDF Generation in Rails with Prawn and Prawn-to: John McCaffrey
PDF Generation in Rails with Prawn and Prawn-to: John McCaffreyPDF Generation in Rails with Prawn and Prawn-to: John McCaffrey
PDF Generation in Rails with Prawn and Prawn-to: John McCaffreyJohn McCaffrey
 

Plus de John McCaffrey (8)

John's Sample
John's SampleJohn's Sample
John's Sample
 
A Taste of TDD: The basics of TDD, why it is hard and how to do it better
A Taste of TDD: The basics of TDD, why it is hard and how to do it betterA Taste of TDD: The basics of TDD, why it is hard and how to do it better
A Taste of TDD: The basics of TDD, why it is hard and how to do it better
 
Becoming a more Productive Rails Developer
Becoming a more Productive Rails DeveloperBecoming a more Productive Rails Developer
Becoming a more Productive Rails Developer
 
LeanStartup:Research is cheaper than development
LeanStartup:Research is cheaper than developmentLeanStartup:Research is cheaper than development
LeanStartup:Research is cheaper than development
 
Becoming a more productive Rails Developer
Becoming a more productive Rails DeveloperBecoming a more productive Rails Developer
Becoming a more productive Rails Developer
 
Irb Tips and Tricks
Irb Tips and TricksIrb Tips and Tricks
Irb Tips and Tricks
 
Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...
Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...
Ruby on Rails Performance Tuning. Make it faster, make it better (WindyCityRa...
 
PDF Generation in Rails with Prawn and Prawn-to: John McCaffrey
PDF Generation in Rails with Prawn and Prawn-to: John McCaffreyPDF Generation in Rails with Prawn and Prawn-to: John McCaffrey
PDF Generation in Rails with Prawn and Prawn-to: John McCaffrey
 

Dernier

Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Nikki Chapple
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
Digital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentDigital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentMahmoud Rabie
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Mark Simos
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsYoss Cohen
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...amber724300
 

Dernier (20)

Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
Digital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentDigital Tools & AI in Career Development
Digital Tools & AI in Career Development
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platforms
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
 

improving the performance of Rails web Applications

  • 1. Performance Monitoring John McCaffrey 1. Why does performance matter? 2. Know your Business Metrics 3. Quick ways assess application performance 4. Monitoring tools to help you track performance
  • 2. Why does performance matter? • Revenue • Costs • Time • Competition • User satisfaction
  • 3. Why does performance matter? • Google cares! • "Speeding up websites is important .. faster sites don't just improve user experience...improving site speed also reduces operating costs. Like us, our users place a lot of value in speed - that's why we've decided to take site speed into account in our search rankings. "
  • 4. When should I start caring? • Capacity planning • Design • Growth • Development • Testing • Deployment • Monitoring
  • 5. What am I tracking? Business Metrics • Page visits per day • Page visits per user per day • Time on site • Searches performed • Products views • Orders
  • 6. SHOPZILLA Improving from 6 sec down to 1.2 seconds 6
  • 7. Netflix: 43% drop in outbound traffic after enabling gzip 7
  • 9. So we know that performance matters. Now what? 9
  • 10. Performance Terms Latency = seconds per job, or "how long it takes" Throughput = jobs per second, or "how many workers" Average Response time = average latency Requests per second = average throughput If 1 worker that can compute 1 job in .5 sec latency = .5 secs per job throughput = 2 jobs per sec
  • 11. Quick ways to check your stats • Eyeball the log files • Use Log reading tool • Use browser tools o Confirm your dev env vs staging • External site tests o Compare values outside of your network o Repeatable tests
  • 12. Eyeball it Processing UserSessionsController#new (for 127.0.0.1 at 2010-05-15 10:11:09) [GET] Parameters: {"action"=>"new", "controller"=>"user_sessions"} Rendering template within layouts/login Rendering user_sessions/new Completed in 202ms (View: 105, DB: 42) | 200 OK [http://localhost/ login]
  • 13. Log analyzer gem install request-log-analyzer request-log-analyzer log/development.log
  • 14. Yslow
  • 17. Microsoft tools – Dynatrace – MsFast – VRTA – Fiddler – Developer tools
  • 19. Are these numbers right? • Are they consistent? • Do they seem reasonable • How can we repeat the tests? • Can we reproduce them in all environments? • What should we investigate next?
  • 20. External tools – http://zoompf.com – http://webo.name/ – http://tools.pingdom.com/ – http://gtmetrix.com – http://www.webpagetest.org/ – http://www.site-perf.com/ – http://webwait.com
  • 22. Don’t change anything! – Resist the urge to change a bunch of stuff – Test coverage – repeatable perf tests – don't break anything! – focus on low hanging fruit first – get your monitoring in place before you make any major changes – don't make it less maintainable – pair & share
  • 23. Taking multiple measurements – Monitor performance over time – Manually keep an eye on your yslow/resp time – http://loadimpact.com/ – Apache Bench, Httperf – Jmeter
  • 28. Rack Bug 28
  • 29. Now What? – Summarize and describe your observations – Prioritize based on ease of change and expected impact – Make your changes in a branch – Compare your results – Look for patterns of optimization – Work with your team
  • 30. Nuggets of Wisdom • Gzip • Get very familiar with yslow • Look through your logs, analyze them • Turn on slow query logging for db • Upgrade your libraries (js, plugins) • Use RVM (try new plugins, rails, ruby) 30
  • 31. Upcoming Presentations – Chicago Javascript – Improving Page performance – ChicagoRuby – Improving Rails app performance – Improving Developer performance! – WindyCityRails 2010 – Improving Rails Application Performance – twitter: @j_mccaffrey
  • 32. References – http://railsperformance.blogspot.com/ (me) – Railslab http://railslab.newrelic.com/ – Steve Souders http://www.stevesouders.com/blog/ – http://velocityconference.blip.tv/ – http://code.google.com/events/io/2010/ – http://speedgeeks-la.blip.tv/ – http://developer.yahoo.com/performance/ – http://code.google.com/speed/page-speed

Notes de l'éditeur

  1. Question: How does performance matter for your app?
  2. i took out a few words to make it fit http://googlewebmastercentral.blogspot.com/2010/04/using-site-speed-in-web-search-ranking.html http://www.websiteoptimization.com/speed/tweak/page-speed-search-rankings/
  3. http://www.getelastic.com/when-to-performance-test/
  4. http://www.getelastic.com/when-to-performance-test/
  5. shopzilla 8000 requests per second parallel downloads alone lead to a 0.5% increase in topline revenue info and graphs from http://www.phpied.com/the-performance-business-pitch/
  6. its not just about making things fast for the developers enjoyment or pride it has to be worth it from a business point of view
  7. performance is how long a singe job takes scalability is how many jobs you can handle
  8. most performance issues are at the page level, though we tend to emphasize optimizing the app and DB first http://tools.pingdom.com/ http://www.site-perf.com/
  9. empty cache primed cache score time to load rules
  10. Shows you all the browser’s actions requests, parsing, blocking, rendering, reflow, ajax Chrome tool http://code.google.com/webtoolkit/speedtracer/get-started.html
  11. I would start with firefox and chrome tools first, even if your users are primarily IE, because there is more help with those tools check your site with the IE tools to see if the numbers match
  12. Use the external site tools, or the internal browser tools as a sniff test. Its a quick way to get you thinking about what you should be looking into, but don't make any changes yet. Document your findings
  13. http://tools.pingdom.com/ http://www.site-perf.com/
  14. run the tests a few times against multiple environments write down what numbers you got on which day (maybe iTunes free music day really kills the bandwidth in your office) add some load http://www.xenoclast.org/autobench/ httperf
  15. you can can fool it with a change to your hosts file you can store just your info locally, if you aren’t cool with sending your data to another site you want to customize
  16. run it local
  17. there are other tools like scout and fiveruns
  18. work as a team to spread the knowledge and make sure performance issues don’t sneak back in