SlideShare una empresa de Scribd logo
1 de 22
Descargar para leer sin conexión
Goal Driven Performance
      Optimization
              Highload++,
              October 25-26,2010
              Moscow, Russia
              Peter Zaitsev
              Percona Inc
What is this all about ?
• First step to successful performance optimization is
  setting right goals
• In most cases goals are not set (or unclear) and a lot
  of resources wasted on not important things
• This presentation is about setting the right goals and
  using them to optimize performance of existing
  system




Goal Driven Performance Optimization
When is it Applicable ?
• Optimizing Performance for Existing Applications
• Can be used with load testing for scaling application
  and testing new features
• A way to implement monitoring and spot problems
  before users start complain




Goal Driven Performance Optimization
Understanding Performance
• Latency/Response Time
      – Always Important
      – Tolerance can be very different
             • 50ms of Ajax Request
             • 30minutes for report
• Throughtput
      – Often important for multi-user systems
      – System can do 1000 transactions/second




Goal Driven Performance Optimization
Throughput/Latency Relation
• Response time tends to increase with throughput
      – When system overload response time goes to infinity
• Call Center analogy
      – Fewer people servicing calls = better utilization
             • Same as throughput per person
      – More people servicing calls = better response time
             • Calls spend less time waiting in the queue
• Classical Performance Optimization Goal
      – Maximizing Throughput/Utilization while maintaining
        Response time within a guidelines


Goal Driven Performance Optimization
Response Time Metrics
• Average/Medium/Response Time
      – Not a good metric for adequate performance
      – Same as average person temperature in hospital
      – Can be helpful for historical trending
• Maximum Response Time
      – Good in theory. We want No requests taking longer than X
      – Hard to work in practice – some requests will take too long
• Define Percentile response time
      – 95% or requests serviced within 500ms
      – 99% or requests serviced within 1000ms

Goal Driven Performance Optimization
Alternative Measurments
• 95 percentille response time is hard/expensive to
  compute in SQL
      – Can use other metrics
• APDEX
      – http://en.wikipedia.org/wiki/Apdex
• Portion where response time is within response time
      – SUM(response_time<0.5)/count(*)
      – Returning 0.95 Is same as 95% response time of 0.5 sec




Goal Driven Performance Optimization
Even Response Time
• 95% response time goal will allow your system to be
  non responsive for an hour every day
      – Ie extremely bad performance when taking backup
• You want to ensure there is no stalls/performance
  dips.
• If page loads slow and user presses reload and it
  loads quickly it is OK – there are always network
  glitches.
• Define your performance goals at short intervals.
      – Goals should be met at ALL 5 minutes intervals.

Goal Driven Performance Optimization
Even Response Time math
• If you only can work with long intervals you can
  define stricter performance goals
      – 99.9% metrics means 2 min slow response will affect it
             • 86400/1000~=86 (sec) – assuming uniform traffic
• The longer response time is OK the larger intervals
  you can have
      – 1min allowed response time in 99% cases means 1 hour
        check interval should be enough




Goal Driven Performance Optimization
Response Time and an Object
• Not all the pages are created Equal
• Complexity and User Requirement Differ
• Ajax Pop Ups
      – 50ms
• Profile Page Generation
      – 150ms
• Search
      – 300ms
• Site Usage Report
      – 1000ms
Goal Driven Performance Optimization
Responses by Type of Client
• Human Being
      – Actual Human waiting and being impatient
      – Response Time critical
• Bots
      – Some systems have over 80% of bot traffic
      – Bot response time is less critical
             • Though should be good enough to be indexed
• Interactive Web Services
      – Can be used to generate pages on other sites
      – Low Response time is even more critical

Goal Driven Performance Optimization
Different kinds of Slowness
• System “randomly” responds slowly
      – OK as long as rare enough.
      – Users will write it off as Internet/computer slowness
• Sustained Slowness is bad
      – Search request which is always slow
      – User with many friends which is “always” slow
• Are these users/cases important ?
      – Track them separately. They may be invisible with 99%
        alone. ie Performance per customer
      – Consider Firing users/Blocking cases otherwise

Goal Driven Performance Optimization
Where to measure performance
• Client Side (the actual data)
      – http://code.google.com/p/jiffy-web/
      – Firebug etc (but only for development)
• External Performance Monitoring
      – Gomez, Keynote etc
      – Selected pages from selected locations
• Web Server Performance Analyses
      – Focused on one dynamil request response time
      – http://code.google.com/p/instrumentation-for-php/
      – Mk-query-digest; tcprstat

Goal Driven Performance Optimization
Summary of the Goal
• Define 95%, 99% etc response time
• For each User Interaction/Class, each application
  instance/user
• Measured/Monitored each 5 minutes
• From Front End and Backend observation
• Avoiding Performance Holes
      – Some actions or users which are rare but often slow




Goal Driven Performance Optimization
Performance Black Swans
• Queries can be intrinsically slow or caused to be
  slow by side load (queueing)
• You can ignore outliers only if their impact to system
  performance is limited.
• Discover Such Queries
      – Mk-query-digest will report outliers by default
      – Check SHOW PROCESSLIST for never completing
        queries
      – Optimize; Build protection to kill overly slow queries.



Goal Driven Performance Optimization
Production Instrumentation
• Many People Instrument Test System
      – Option to print out Queries/Web Service Requests
      – Great for Debugging/Testing
      – Will not show a lot of performance problems
             • Cold vs hot requests
             • Contention happening in production
             • Special User Cases
• Run Instrumented App in Production and Store Data
      – Can instrument only one of Web servers if overhead is
        large.
      – Can log only 1% of user sessions if can't handle all data

Goal Driven Performance Optimization
What to Instrument
• Total Response Time
• CPU Time
• “Wait Time”
      –   Connections/Database Queries
      –   MemCache
      –   Web Services Request
      –   Other Network Requests
• Additional Information
      – Number and Nature of different queries
      – Hits/Misses for Queries
      – Options which can affect performance
Goal Driven Performance Optimization
Where to Store
• Plain old log files
      – Or directly to the database for smaller systems
•   Load them to the database
•   Or Hadoop on the larger scale
•   Generate standard reports
•   Provide Ad-Hoc way to do deep data analyses




Goal Driven Performance Optimization
Start from what is most important
• Optimize Most important User Interactions first
• Pick What case to focus in
      – Queries which do not meet response time
      – But not Worse Case Scenario
             • Unless outliers kill your system
             • There are always going to be outliers
• Do not analyze just queries above response time
  threshold
      – It is much easier to reach 95% of 1 second if 50% of the
        queries are below 500ms.


Goal Driven Performance Optimization
Benefits of Such Approach
• Direct connection to the business goals
• High Priority problems targeted first
• Focus on real stuff
      – No guess work like “is my buffer pool hit ratio bad?” or “am
        I doing too much full table scans ?”
      – If these there the issues you will find and fix them anyway.
• Understandable and predictable result
      – If MySQL contributes 15% to the response time I can't
        possibly double performance focusing on MySQL
        optimization.


Goal Driven Performance Optimization
Final Notes
• Spikes; Special Cases should not be discarded
      – They are the most interesting/challenging are
• Understand what you're trying to achieve
      – The method is best for optimization of current scale for
        system already in production.
• Check out goal driven performance optimization
  whitepaper
      – http://www.percona.com/files/white-papers/goal-driven-
        performance-optimization.pdf



Goal Driven Performance Optimization
-22-


                             Thanks for Coming
• Questions ? Followup ?
      – pz@percona.com
• Yes, we do MySQL and Web Scaling Consulting
      – http://www.percona.com
• Check out our book
      – Complete rewrite of 1st edition
      – Available in Russian Too
• And Yes we're hiring
      – http://www.percona.com/contact/careers/



Goal Driven Performance Optimization

Más contenido relacionado

La actualidad más candente

Designing Highly-Available Architectures for OTM
Designing Highly-Available Architectures for OTMDesigning Highly-Available Architectures for OTM
Designing Highly-Available Architectures for OTM
MavenWire
 
Telecom Services Provider Assessment
Telecom Services Provider AssessmentTelecom Services Provider Assessment
Telecom Services Provider Assessment
Sourcing Sage
 
Telecom Process Assessment Example
Telecom Process Assessment ExampleTelecom Process Assessment Example
Telecom Process Assessment Example
Sourcing Sage
 
Monitoring and Managing Java Applications
Monitoring and Managing Java ApplicationsMonitoring and Managing Java Applications
Monitoring and Managing Java Applications
Alois Reitbauer
 
Ch4 Performance metrics
Ch4 Performance metricsCh4 Performance metrics
Ch4 Performance metrics
Josh Wei
 
When is a project ready for Software Automation_NEW
When is a project ready for Software Automation_NEWWhen is a project ready for Software Automation_NEW
When is a project ready for Software Automation_NEW
Mike Christesen
 

La actualidad más candente (20)

Designing Highly-Available Architectures for OTM
Designing Highly-Available Architectures for OTMDesigning Highly-Available Architectures for OTM
Designing Highly-Available Architectures for OTM
 
IBM Information on Demand 2013 - Session 2839 - Using IBM PureData System fo...
IBM Information on Demand 2013  - Session 2839 - Using IBM PureData System fo...IBM Information on Demand 2013  - Session 2839 - Using IBM PureData System fo...
IBM Information on Demand 2013 - Session 2839 - Using IBM PureData System fo...
 
Analyzing OTM Logs and Troubleshooting
Analyzing OTM Logs and TroubleshootingAnalyzing OTM Logs and Troubleshooting
Analyzing OTM Logs and Troubleshooting
 
Process Assessment Example
Process Assessment ExampleProcess Assessment Example
Process Assessment Example
 
Telecom Services Provider Assessment
Telecom Services Provider AssessmentTelecom Services Provider Assessment
Telecom Services Provider Assessment
 
Telecom Process Assessment Example
Telecom Process Assessment ExampleTelecom Process Assessment Example
Telecom Process Assessment Example
 
Site reliability engineering - Lightning Talk
Site reliability engineering - Lightning TalkSite reliability engineering - Lightning Talk
Site reliability engineering - Lightning Talk
 
Monitoring and Managing Java Applications
Monitoring and Managing Java ApplicationsMonitoring and Managing Java Applications
Monitoring and Managing Java Applications
 
Google Study: Could those failures be caused by design flaws
Google Study: Could those failures be caused by design flawsGoogle Study: Could those failures be caused by design flaws
Google Study: Could those failures be caused by design flaws
 
FMK2016 - HOunz Koudelka - Audit and Optimization
FMK2016 - HOunz Koudelka - Audit and OptimizationFMK2016 - HOunz Koudelka - Audit and Optimization
FMK2016 - HOunz Koudelka - Audit and Optimization
 
Building trust within the organization, first steps towards DevOps
Building trust within the organization, first steps towards DevOpsBuilding trust within the organization, first steps towards DevOps
Building trust within the organization, first steps towards DevOps
 
Preventing the Next Deployment Issue with Continuous Performance Testing and ...
Preventing the Next Deployment Issue with Continuous Performance Testing and ...Preventing the Next Deployment Issue with Continuous Performance Testing and ...
Preventing the Next Deployment Issue with Continuous Performance Testing and ...
 
Top 10 Virtualization Automation Tips for Infrastructure and Operations Profe...
Top 10 Virtualization Automation Tips for Infrastructure and Operations Profe...Top 10 Virtualization Automation Tips for Infrastructure and Operations Profe...
Top 10 Virtualization Automation Tips for Infrastructure and Operations Profe...
 
PAC 2019 virtual Alexander Podelko
PAC 2019 virtual Alexander Podelko PAC 2019 virtual Alexander Podelko
PAC 2019 virtual Alexander Podelko
 
Ch4 Performance metrics
Ch4 Performance metricsCh4 Performance metrics
Ch4 Performance metrics
 
Doing work in the background - Darryn Campbell, Zebra Technologies
Doing work in the background - Darryn Campbell, Zebra TechnologiesDoing work in the background - Darryn Campbell, Zebra Technologies
Doing work in the background - Darryn Campbell, Zebra Technologies
 
virtual memory
virtual memoryvirtual memory
virtual memory
 
CV_VishalSarode
CV_VishalSarodeCV_VishalSarode
CV_VishalSarode
 
When is a project ready for Software Automation_NEW
When is a project ready for Software Automation_NEWWhen is a project ready for Software Automation_NEW
When is a project ready for Software Automation_NEW
 
Top 10 DBA Mistakes on Microsoft SQL Server
Top 10 DBA Mistakes on Microsoft SQL ServerTop 10 DBA Mistakes on Microsoft SQL Server
Top 10 DBA Mistakes on Microsoft SQL Server
 

Destacado (7)

Ferrell7e Student Ch07
Ferrell7e Student Ch07Ferrell7e Student Ch07
Ferrell7e Student Ch07
 
Presentation4
Presentation4Presentation4
Presentation4
 
Rozjezdy roku 2013 - vítězný startup SportCentral
Rozjezdy roku 2013 - vítězný startup SportCentralRozjezdy roku 2013 - vítězný startup SportCentral
Rozjezdy roku 2013 - vítězný startup SportCentral
 
Connected classroom 2013 14
Connected classroom 2013 14Connected classroom 2013 14
Connected classroom 2013 14
 
The Real World - Agile
The Real World - AgileThe Real World - Agile
The Real World - Agile
 
Ms unit i
Ms unit iMs unit i
Ms unit i
 
Portfolio datajournalism_EN - 22 Mars / OWNI
Portfolio datajournalism_EN - 22 Mars / OWNIPortfolio datajournalism_EN - 22 Mars / OWNI
Portfolio datajournalism_EN - 22 Mars / OWNI
 

Similar a Goal driven performance optimization (Пётр Зайцев)

Similar a Goal driven performance optimization (Пётр Зайцев) (20)

Performance Assurance for Packaged Applications
Performance Assurance for Packaged ApplicationsPerformance Assurance for Packaged Applications
Performance Assurance for Packaged Applications
 
Performance tuning Grails applications
 Performance tuning Grails applications Performance tuning Grails applications
Performance tuning Grails applications
 
Building data intensive applications
Building data intensive applicationsBuilding data intensive applications
Building data intensive applications
 
Performance Testing Overview
Performance Testing OverviewPerformance Testing Overview
Performance Testing Overview
 
ADF Performance Monitor
ADF Performance MonitorADF Performance Monitor
ADF Performance Monitor
 
Adding Value in the Cloud with Performance Test
Adding Value in the Cloud with Performance TestAdding Value in the Cloud with Performance Test
Adding Value in the Cloud with Performance Test
 
Christian Bk Hansen - Agile on Huge Banking Mainframe Legacy Systems - EuroST...
Christian Bk Hansen - Agile on Huge Banking Mainframe Legacy Systems - EuroST...Christian Bk Hansen - Agile on Huge Banking Mainframe Legacy Systems - EuroST...
Christian Bk Hansen - Agile on Huge Banking Mainframe Legacy Systems - EuroST...
 
SCRIMPS-STD: Test Automation Design Principles - and asking the right questions!
SCRIMPS-STD: Test Automation Design Principles - and asking the right questions!SCRIMPS-STD: Test Automation Design Principles - and asking the right questions!
SCRIMPS-STD: Test Automation Design Principles - and asking the right questions!
 
05. performance-concepts-26-slides
05. performance-concepts-26-slides05. performance-concepts-26-slides
05. performance-concepts-26-slides
 
Software Performance
Software Performance Software Performance
Software Performance
 
Performance tuning Grails applications SpringOne 2GX 2014
Performance tuning Grails applications SpringOne 2GX 2014Performance tuning Grails applications SpringOne 2GX 2014
Performance tuning Grails applications SpringOne 2GX 2014
 
05. performance-concepts
05. performance-concepts05. performance-concepts
05. performance-concepts
 
PAC 2019 virtual Joerek Van Gaalen
PAC 2019 virtual Joerek Van GaalenPAC 2019 virtual Joerek Van Gaalen
PAC 2019 virtual Joerek Van Gaalen
 
Top 5 Java Performance Metrics, Tips & Tricks
Top 5 Java Performance Metrics, Tips & TricksTop 5 Java Performance Metrics, Tips & Tricks
Top 5 Java Performance Metrics, Tips & Tricks
 
Integration strategies best practices- Mulesoft meetup April 2018
Integration strategies   best practices- Mulesoft meetup April 2018Integration strategies   best practices- Mulesoft meetup April 2018
Integration strategies best practices- Mulesoft meetup April 2018
 
071310 sun d_0930_feldman_stephen
071310 sun d_0930_feldman_stephen071310 sun d_0930_feldman_stephen
071310 sun d_0930_feldman_stephen
 
Performance Testing
Performance TestingPerformance Testing
Performance Testing
 
ADF performance monitor at AMIS25
ADF performance monitor at AMIS25ADF performance monitor at AMIS25
ADF performance monitor at AMIS25
 
Rational Team Concert Process Customization - What you can and cannot do
Rational Team Concert Process Customization - What you can and cannot doRational Team Concert Process Customization - What you can and cannot do
Rational Team Concert Process Customization - What you can and cannot do
 
Managing Performance Globally with MySQL
Managing Performance Globally with MySQLManaging Performance Globally with MySQL
Managing Performance Globally with MySQL
 

Más de Ontico

Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...
Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...
Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...
Ontico
 

Más de Ontico (20)

One-cloud — система управления дата-центром в Одноклассниках / Олег Анастасье...
One-cloud — система управления дата-центром в Одноклассниках / Олег Анастасье...One-cloud — система управления дата-центром в Одноклассниках / Олег Анастасье...
One-cloud — система управления дата-центром в Одноклассниках / Олег Анастасье...
 
Масштабируя DNS / Артем Гавриченков (Qrator Labs)
Масштабируя DNS / Артем Гавриченков (Qrator Labs)Масштабируя DNS / Артем Гавриченков (Qrator Labs)
Масштабируя DNS / Артем Гавриченков (Qrator Labs)
 
Создание BigData-платформы для ФГУП Почта России / Андрей Бащенко (Luxoft)
Создание BigData-платформы для ФГУП Почта России / Андрей Бащенко (Luxoft)Создание BigData-платформы для ФГУП Почта России / Андрей Бащенко (Luxoft)
Создание BigData-платформы для ФГУП Почта России / Андрей Бащенко (Luxoft)
 
Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...
Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...
Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...
 
Новые технологии репликации данных в PostgreSQL / Александр Алексеев (Postgre...
Новые технологии репликации данных в PostgreSQL / Александр Алексеев (Postgre...Новые технологии репликации данных в PostgreSQL / Александр Алексеев (Postgre...
Новые технологии репликации данных в PostgreSQL / Александр Алексеев (Postgre...
 
PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)
PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)
PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)
 
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
 
Опыт разработки модуля межсетевого экранирования для MySQL / Олег Брославский...
Опыт разработки модуля межсетевого экранирования для MySQL / Олег Брославский...Опыт разработки модуля межсетевого экранирования для MySQL / Олег Брославский...
Опыт разработки модуля межсетевого экранирования для MySQL / Олег Брославский...
 
ProxySQL Use Case Scenarios / Alkin Tezuysal (Percona)
ProxySQL Use Case Scenarios / Alkin Tezuysal (Percona)ProxySQL Use Case Scenarios / Alkin Tezuysal (Percona)
ProxySQL Use Case Scenarios / Alkin Tezuysal (Percona)
 
MySQL Replication — Advanced Features / Петр Зайцев (Percona)
MySQL Replication — Advanced Features / Петр Зайцев (Percona)MySQL Replication — Advanced Features / Петр Зайцев (Percona)
MySQL Replication — Advanced Features / Петр Зайцев (Percona)
 
Внутренний open-source. Как разрабатывать мобильное приложение большим количе...
Внутренний open-source. Как разрабатывать мобильное приложение большим количе...Внутренний open-source. Как разрабатывать мобильное приложение большим количе...
Внутренний open-source. Как разрабатывать мобильное приложение большим количе...
 
Подробно о том, как Causal Consistency реализовано в MongoDB / Михаил Тюленев...
Подробно о том, как Causal Consistency реализовано в MongoDB / Михаил Тюленев...Подробно о том, как Causal Consistency реализовано в MongoDB / Михаил Тюленев...
Подробно о том, как Causal Consistency реализовано в MongoDB / Михаил Тюленев...
 
Балансировка на скорости проводов. Без ASIC, без ограничений. Решения NFWare ...
Балансировка на скорости проводов. Без ASIC, без ограничений. Решения NFWare ...Балансировка на скорости проводов. Без ASIC, без ограничений. Решения NFWare ...
Балансировка на скорости проводов. Без ASIC, без ограничений. Решения NFWare ...
 
Перехват трафика — мифы и реальность / Евгений Усков (Qrator Labs)
Перехват трафика — мифы и реальность / Евгений Усков (Qrator Labs)Перехват трафика — мифы и реальность / Евгений Усков (Qrator Labs)
Перехват трафика — мифы и реальность / Евгений Усков (Qrator Labs)
 
И тогда наверняка вдруг запляшут облака! / Алексей Сушков (ПЕТЕР-СЕРВИС)
И тогда наверняка вдруг запляшут облака! / Алексей Сушков (ПЕТЕР-СЕРВИС)И тогда наверняка вдруг запляшут облака! / Алексей Сушков (ПЕТЕР-СЕРВИС)
И тогда наверняка вдруг запляшут облака! / Алексей Сушков (ПЕТЕР-СЕРВИС)
 
Как мы заставили Druid работать в Одноклассниках / Юрий Невиницин (OK.RU)
Как мы заставили Druid работать в Одноклассниках / Юрий Невиницин (OK.RU)Как мы заставили Druid работать в Одноклассниках / Юрий Невиницин (OK.RU)
Как мы заставили Druid работать в Одноклассниках / Юрий Невиницин (OK.RU)
 
Разгоняем ASP.NET Core / Илья Вербицкий (WebStoating s.r.o.)
Разгоняем ASP.NET Core / Илья Вербицкий (WebStoating s.r.o.)Разгоняем ASP.NET Core / Илья Вербицкий (WebStoating s.r.o.)
Разгоняем ASP.NET Core / Илья Вербицкий (WebStoating s.r.o.)
 
100500 способов кэширования в Oracle Database или как достичь максимальной ск...
100500 способов кэширования в Oracle Database или как достичь максимальной ск...100500 способов кэширования в Oracle Database или как достичь максимальной ск...
100500 способов кэширования в Oracle Database или как достичь максимальной ск...
 
Apache Ignite Persistence: зачем Persistence для In-Memory, и как он работает...
Apache Ignite Persistence: зачем Persistence для In-Memory, и как он работает...Apache Ignite Persistence: зачем Persistence для In-Memory, и как он работает...
Apache Ignite Persistence: зачем Persistence для In-Memory, и как он работает...
 
Механизмы мониторинга баз данных: взгляд изнутри / Дмитрий Еманов (Firebird P...
Механизмы мониторинга баз данных: взгляд изнутри / Дмитрий Еманов (Firebird P...Механизмы мониторинга баз данных: взгляд изнутри / Дмитрий Еманов (Firebird P...
Механизмы мониторинга баз данных: взгляд изнутри / Дмитрий Еманов (Firebird P...
 

Último

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
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
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
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
[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
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Goal driven performance optimization (Пётр Зайцев)

  • 1. Goal Driven Performance Optimization Highload++, October 25-26,2010 Moscow, Russia Peter Zaitsev Percona Inc
  • 2. What is this all about ? • First step to successful performance optimization is setting right goals • In most cases goals are not set (or unclear) and a lot of resources wasted on not important things • This presentation is about setting the right goals and using them to optimize performance of existing system Goal Driven Performance Optimization
  • 3. When is it Applicable ? • Optimizing Performance for Existing Applications • Can be used with load testing for scaling application and testing new features • A way to implement monitoring and spot problems before users start complain Goal Driven Performance Optimization
  • 4. Understanding Performance • Latency/Response Time – Always Important – Tolerance can be very different • 50ms of Ajax Request • 30minutes for report • Throughtput – Often important for multi-user systems – System can do 1000 transactions/second Goal Driven Performance Optimization
  • 5. Throughput/Latency Relation • Response time tends to increase with throughput – When system overload response time goes to infinity • Call Center analogy – Fewer people servicing calls = better utilization • Same as throughput per person – More people servicing calls = better response time • Calls spend less time waiting in the queue • Classical Performance Optimization Goal – Maximizing Throughput/Utilization while maintaining Response time within a guidelines Goal Driven Performance Optimization
  • 6. Response Time Metrics • Average/Medium/Response Time – Not a good metric for adequate performance – Same as average person temperature in hospital – Can be helpful for historical trending • Maximum Response Time – Good in theory. We want No requests taking longer than X – Hard to work in practice – some requests will take too long • Define Percentile response time – 95% or requests serviced within 500ms – 99% or requests serviced within 1000ms Goal Driven Performance Optimization
  • 7. Alternative Measurments • 95 percentille response time is hard/expensive to compute in SQL – Can use other metrics • APDEX – http://en.wikipedia.org/wiki/Apdex • Portion where response time is within response time – SUM(response_time<0.5)/count(*) – Returning 0.95 Is same as 95% response time of 0.5 sec Goal Driven Performance Optimization
  • 8. Even Response Time • 95% response time goal will allow your system to be non responsive for an hour every day – Ie extremely bad performance when taking backup • You want to ensure there is no stalls/performance dips. • If page loads slow and user presses reload and it loads quickly it is OK – there are always network glitches. • Define your performance goals at short intervals. – Goals should be met at ALL 5 minutes intervals. Goal Driven Performance Optimization
  • 9. Even Response Time math • If you only can work with long intervals you can define stricter performance goals – 99.9% metrics means 2 min slow response will affect it • 86400/1000~=86 (sec) – assuming uniform traffic • The longer response time is OK the larger intervals you can have – 1min allowed response time in 99% cases means 1 hour check interval should be enough Goal Driven Performance Optimization
  • 10. Response Time and an Object • Not all the pages are created Equal • Complexity and User Requirement Differ • Ajax Pop Ups – 50ms • Profile Page Generation – 150ms • Search – 300ms • Site Usage Report – 1000ms Goal Driven Performance Optimization
  • 11. Responses by Type of Client • Human Being – Actual Human waiting and being impatient – Response Time critical • Bots – Some systems have over 80% of bot traffic – Bot response time is less critical • Though should be good enough to be indexed • Interactive Web Services – Can be used to generate pages on other sites – Low Response time is even more critical Goal Driven Performance Optimization
  • 12. Different kinds of Slowness • System “randomly” responds slowly – OK as long as rare enough. – Users will write it off as Internet/computer slowness • Sustained Slowness is bad – Search request which is always slow – User with many friends which is “always” slow • Are these users/cases important ? – Track them separately. They may be invisible with 99% alone. ie Performance per customer – Consider Firing users/Blocking cases otherwise Goal Driven Performance Optimization
  • 13. Where to measure performance • Client Side (the actual data) – http://code.google.com/p/jiffy-web/ – Firebug etc (but only for development) • External Performance Monitoring – Gomez, Keynote etc – Selected pages from selected locations • Web Server Performance Analyses – Focused on one dynamil request response time – http://code.google.com/p/instrumentation-for-php/ – Mk-query-digest; tcprstat Goal Driven Performance Optimization
  • 14. Summary of the Goal • Define 95%, 99% etc response time • For each User Interaction/Class, each application instance/user • Measured/Monitored each 5 minutes • From Front End and Backend observation • Avoiding Performance Holes – Some actions or users which are rare but often slow Goal Driven Performance Optimization
  • 15. Performance Black Swans • Queries can be intrinsically slow or caused to be slow by side load (queueing) • You can ignore outliers only if their impact to system performance is limited. • Discover Such Queries – Mk-query-digest will report outliers by default – Check SHOW PROCESSLIST for never completing queries – Optimize; Build protection to kill overly slow queries. Goal Driven Performance Optimization
  • 16. Production Instrumentation • Many People Instrument Test System – Option to print out Queries/Web Service Requests – Great for Debugging/Testing – Will not show a lot of performance problems • Cold vs hot requests • Contention happening in production • Special User Cases • Run Instrumented App in Production and Store Data – Can instrument only one of Web servers if overhead is large. – Can log only 1% of user sessions if can't handle all data Goal Driven Performance Optimization
  • 17. What to Instrument • Total Response Time • CPU Time • “Wait Time” – Connections/Database Queries – MemCache – Web Services Request – Other Network Requests • Additional Information – Number and Nature of different queries – Hits/Misses for Queries – Options which can affect performance Goal Driven Performance Optimization
  • 18. Where to Store • Plain old log files – Or directly to the database for smaller systems • Load them to the database • Or Hadoop on the larger scale • Generate standard reports • Provide Ad-Hoc way to do deep data analyses Goal Driven Performance Optimization
  • 19. Start from what is most important • Optimize Most important User Interactions first • Pick What case to focus in – Queries which do not meet response time – But not Worse Case Scenario • Unless outliers kill your system • There are always going to be outliers • Do not analyze just queries above response time threshold – It is much easier to reach 95% of 1 second if 50% of the queries are below 500ms. Goal Driven Performance Optimization
  • 20. Benefits of Such Approach • Direct connection to the business goals • High Priority problems targeted first • Focus on real stuff – No guess work like “is my buffer pool hit ratio bad?” or “am I doing too much full table scans ?” – If these there the issues you will find and fix them anyway. • Understandable and predictable result – If MySQL contributes 15% to the response time I can't possibly double performance focusing on MySQL optimization. Goal Driven Performance Optimization
  • 21. Final Notes • Spikes; Special Cases should not be discarded – They are the most interesting/challenging are • Understand what you're trying to achieve – The method is best for optimization of current scale for system already in production. • Check out goal driven performance optimization whitepaper – http://www.percona.com/files/white-papers/goal-driven- performance-optimization.pdf Goal Driven Performance Optimization
  • 22. -22- Thanks for Coming • Questions ? Followup ? – pz@percona.com • Yes, we do MySQL and Web Scaling Consulting – http://www.percona.com • Check out our book – Complete rewrite of 1st edition – Available in Russian Too • And Yes we're hiring – http://www.percona.com/contact/careers/ Goal Driven Performance Optimization