SlideShare a Scribd company logo
1 of 38
Download to read offline
PERFORMANCE & SCALABILITY
      Where to Begin




                            Brandon Lyon
Performance & Scalability
                Define the Objective
Performance & Scalability
                Define the Objective
                    Minimize HTTP
                     Requests
Performance & Scalability
                Define the Objective
                    Minimize HTTP
                     Requests
                    Minimize Server
                     Processing
Performance & Scalability
                Define the Objective
                    Minimize HTTP
                     Requests
                    Minimize Server
                     Processing
                    Optimize Server
                     Processing
Performance & Scalability
                Define the Objective
                    Minimize HTTP
                     Requests
                    Minimize Server
                     Processing
                    Optimize Server
                     Processing
                    Optimize the
                     Database
Performance & Scalability
                Define the Objective
                    Minimize HTTP
                     Requests
                    Minimize Server
                     Processing
                    Optimize Server
                     Processing
                    Optimize the
                     Database
Minimizing HTTP Requests
               Aggregate &
                Compress CSS Files
Minimizing HTTP Requests
               Aggregate &
                Compress CSS Files
               Aggregate
                JavaScript Files
Minimizing HTTP Requests
               Aggregate &
                Compress CSS Files
               Aggregate
                JavaScript Files
               Image Sprites
Performance & Scalability
                Define the Objective
                    Minimize HTTP
                     Requests
                    Minimize Server
                     Processing
                    Optimize Server
                     Processing
                    Optimize the
                     Database
Minimize Server Processing
   Alternative PHP
    Cache (APC)
   Memcached
   Varnish Cache
Alternative PHP Cache (APC)
   Make sure you've allocated enough memory.
    apc.shm_segments=1
    apc.shm_size=32
   Check your script files on every request?
    apc.stat=0
   Memory Fragmentation?
    apc.ttl=0
Memcached
   Basic Implementation
    # memcached -m 24 -p 11211 -d
    $conf = array(
     'memcache_servers' => array(
          'localhost:11211' => 'default',
     ),
     'memcache_bins' => array(
          'cache' => 'default',
     ),
Memcached
   Server Cluster?
    $conf = array(
     'memcache_servers' => array(
          host1:port => cluster,
          hostN:port => cluster,
     ),
     'memcache_bins' => array(
          bin1 => cluster,
          binN => cluster,
     ),
Varnish Cache
   Toss your cookies!                                      Define Exceptions
    if (req.url !~ "^/blog/.*/") {                          if (req.url ~ "install.php|update.php") {

        set req.http.Cookie =                                    return(pass);

        regsuball(req.http.Cookie, "comment_.*", "");       }

    }
Performance & Scalability
                Define the Objective
                    Minimize HTTP
                     Requests
                    Minimize Server
                     Processing
                    Optimize Server
                     Processing
                    Optimize the
                     Database
Optimize Server Processing
   Identify the Problem
Optimize Server Processing
   Identify the Problem




                           FIX IT
Optimize Server Processing
   Identifying the Problem Areas
       Network
       Linux
       Apache
       MySQL
       PHP
Optimize Server Processing
   Identifying the Problem Areas
       Network
       Linux
       Apache
       MySQL
       PHP
Optimize Server Processing
   Performance Profiling
       Apache Benchmarking (ab)
       MySQL Slow Query Log & Profiling
       PHP Xdebug & KCachegrind
Apache Benchmarking (ab)
# ab -n 100 -c 10 http://d7.blyon.lan/
                      10 Concurrent Requests


                       100 Requests
                       7.35 Requests/Second
                       50% of Requests served in
                        under 1352ms
Apache Benchmarking (ab)
   Compress Cached Pages
   Aggregate and Compress CSS files
   Aggregate JavaScript files
Apache Benchmarking (ab)
# ab -n 100 -c 10 http://d7.blyon.lan/
                      10 Concurrent Requests


                       100 Requests
                       46.32 Requests/Second
                       50% of Requests served in
                        under 213ms
Apache Benchmarking (ab)
   Install APC
   Install APC Drupal Module
Apache Benchmarking (ab)
# ab -n 100 -c 10 http://d7.blyon.lan/
                      10 Concurrent Requests


                       100 Requests
                       648.77 Requests/Second
                       50% of Requests served in
                        under 12ms
Optimize Server Processing
   Performance Profiling
       Apache Benchmarking (ab)
       MySQL Slow Query Log & Profiling
       PHP Xdebug & KCachegrind
MySQL Slow Query Log
/etc/mysql/my.cnf
  log_slow_queries = /var/log/mysql/mysql-slow.log
  long_query_time = 1



# tail -f /var/log/mysql/mysql-slow.log
  # User@Host: root[root] @ localhost []
  # Query_time: 0.000427 Lock_time: 0.000037 Rows_sent: 50
  Rows_examined: 50
  SET timestamp=1294541182;
  select * from node;
Optimize Server Processing
   Performance Profiling
       Apache Benchmarking (ab)
       MySQL Slow Query Log & Profiling
       PHP Xdebug & KCachegrind
PHP Xdebug & KCachegrind
   Xdebug Features
       Stack Traces & Function Traces in Error
        Messages
       Memory Allocation
       Infinite Recursion Protection
       PHP Profiling
       Code Coverage Analysis
       Interactive Debugging support
PHP Xdebug & KCachegrind
   Xdebug Configuration
       zend_extension="/usr/local/php/modules/xdebug.so"
       xdebug.profiler_enable_trigger = 1


   Xdebug Usage
       Append ”?XDEBUG_PROFILE=1” to URL
       View cachegrind compatible profile log
        /tmp/cachegrind.out.10362
PHP Xdebug & KCachegrind
   Kcachegrind
       Profile data Visualization tool
       Accepts ”Callgrind Profile” formatted data
       Requires KDE Libraries
PHP Xdebug & KCachegrind
Now FIX IT
Performance & Scalability
                Define the Objective
                    Minimize HTTP
                     Requests
                    Minimize Server
                     Processing
                    Optimize Server
                     Processing
                    Optimize the
                     Database
Optimizing the Database

http://day32.com/MySQL/tuning-primer.sh
   Analyzes current my.cnf
   Analyzes resource usage
   Analyzes Caching
   Analyzes Tables and Queries
   Generates recommended my.cnf
PERFORMANCE & SCALABILITY
      Where to Begin




                            Brandon Lyon

More Related Content

What's hot

DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...Timofey Turenko
 
Service-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMixService-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMixBruce Snyder
 
Amazon RDS for MySQL: Best Practices and Migration
Amazon RDS for MySQL: Best Practices and MigrationAmazon RDS for MySQL: Best Practices and Migration
Amazon RDS for MySQL: Best Practices and MigrationAmazon Web Services
 
Integrated Cache on Netscaler
Integrated Cache on NetscalerIntegrated Cache on Netscaler
Integrated Cache on NetscalerMark Hillick
 
Servletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postServletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postvamsi krishna
 
ApacheCon EU 2014: Enterprise Development with Apache Karaf
ApacheCon EU 2014: Enterprise Development with Apache KarafApacheCon EU 2014: Enterprise Development with Apache Karaf
ApacheCon EU 2014: Enterprise Development with Apache KarafAchim Nierbeck
 
High-Performance JDBC Voxxed Bucharest 2016
High-Performance JDBC Voxxed Bucharest 2016High-Performance JDBC Voxxed Bucharest 2016
High-Performance JDBC Voxxed Bucharest 2016Vlad Mihalcea
 
High Performance Hibernate JavaZone 2016
High Performance Hibernate JavaZone 2016High Performance Hibernate JavaZone 2016
High Performance Hibernate JavaZone 2016Vlad Mihalcea
 
Solving_the_C20K_problem_PHP_Performance_and_Scalability-phpquebec_2009
Solving_the_C20K_problem_PHP_Performance_and_Scalability-phpquebec_2009Solving_the_C20K_problem_PHP_Performance_and_Scalability-phpquebec_2009
Solving_the_C20K_problem_PHP_Performance_and_Scalability-phpquebec_2009Hiroshi Ono
 
Service Oriented Integration with ServiceMix
Service Oriented Integration with ServiceMixService Oriented Integration with ServiceMix
Service Oriented Integration with ServiceMixghessler
 
(CMP402) Amazon EC2 Instances Deep Dive
(CMP402) Amazon EC2 Instances Deep Dive(CMP402) Amazon EC2 Instances Deep Dive
(CMP402) Amazon EC2 Instances Deep DiveAmazon Web Services
 
High Concurrency Architecture and Laravel Performance Tuning
High Concurrency Architecture and Laravel Performance TuningHigh Concurrency Architecture and Laravel Performance Tuning
High Concurrency Architecture and Laravel Performance TuningAlbert Chen
 
(NET308) Consolidating DNS Data in the Cloud with Amazon Route 53
(NET308) Consolidating DNS Data in the Cloud with Amazon Route 53(NET308) Consolidating DNS Data in the Cloud with Amazon Route 53
(NET308) Consolidating DNS Data in the Cloud with Amazon Route 53Amazon Web Services
 
Give Your Site a Boost with Memcache
Give Your Site a Boost with MemcacheGive Your Site a Boost with Memcache
Give Your Site a Boost with MemcacheBen Ramsey
 
Page Performance
Page PerformancePage Performance
Page Performanceatorreno
 

What's hot (20)

DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
 
Service-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMixService-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMix
 
Amazon RDS for MySQL: Best Practices and Migration
Amazon RDS for MySQL: Best Practices and MigrationAmazon RDS for MySQL: Best Practices and Migration
Amazon RDS for MySQL: Best Practices and Migration
 
High Performance Databases
High Performance DatabasesHigh Performance Databases
High Performance Databases
 
JBoss AS 7
JBoss AS 7JBoss AS 7
JBoss AS 7
 
Integrated Cache on Netscaler
Integrated Cache on NetscalerIntegrated Cache on Netscaler
Integrated Cache on Netscaler
 
Servletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postServletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,post
 
ApacheCon EU 2014: Enterprise Development with Apache Karaf
ApacheCon EU 2014: Enterprise Development with Apache KarafApacheCon EU 2014: Enterprise Development with Apache Karaf
ApacheCon EU 2014: Enterprise Development with Apache Karaf
 
High-Performance JDBC Voxxed Bucharest 2016
High-Performance JDBC Voxxed Bucharest 2016High-Performance JDBC Voxxed Bucharest 2016
High-Performance JDBC Voxxed Bucharest 2016
 
High Performance Hibernate JavaZone 2016
High Performance Hibernate JavaZone 2016High Performance Hibernate JavaZone 2016
High Performance Hibernate JavaZone 2016
 
Solving_the_C20K_problem_PHP_Performance_and_Scalability-phpquebec_2009
Solving_the_C20K_problem_PHP_Performance_and_Scalability-phpquebec_2009Solving_the_C20K_problem_PHP_Performance_and_Scalability-phpquebec_2009
Solving_the_C20K_problem_PHP_Performance_and_Scalability-phpquebec_2009
 
Service Oriented Integration with ServiceMix
Service Oriented Integration with ServiceMixService Oriented Integration with ServiceMix
Service Oriented Integration with ServiceMix
 
Apache servicemix1
Apache servicemix1Apache servicemix1
Apache servicemix1
 
(CMP402) Amazon EC2 Instances Deep Dive
(CMP402) Amazon EC2 Instances Deep Dive(CMP402) Amazon EC2 Instances Deep Dive
(CMP402) Amazon EC2 Instances Deep Dive
 
High Concurrency Architecture and Laravel Performance Tuning
High Concurrency Architecture and Laravel Performance TuningHigh Concurrency Architecture and Laravel Performance Tuning
High Concurrency Architecture and Laravel Performance Tuning
 
(NET308) Consolidating DNS Data in the Cloud with Amazon Route 53
(NET308) Consolidating DNS Data in the Cloud with Amazon Route 53(NET308) Consolidating DNS Data in the Cloud with Amazon Route 53
(NET308) Consolidating DNS Data in the Cloud with Amazon Route 53
 
Technical tips for secure Apache Hadoop cluster #ApacheConAsia #ApacheCon
Technical tips for secure Apache Hadoop cluster #ApacheConAsia #ApacheConTechnical tips for secure Apache Hadoop cluster #ApacheConAsia #ApacheCon
Technical tips for secure Apache Hadoop cluster #ApacheConAsia #ApacheCon
 
Give Your Site a Boost with Memcache
Give Your Site a Boost with MemcacheGive Your Site a Boost with Memcache
Give Your Site a Boost with Memcache
 
Page Performance
Page PerformancePage Performance
Page Performance
 
Alfresco tuning part1
Alfresco tuning part1Alfresco tuning part1
Alfresco tuning part1
 

Similar to Performance scalability brandonlyon

Site Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariSite Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariJoseph Scott
 
Speeding up your WordPress Site - WordCamp Toronto 2015
Speeding up your WordPress Site - WordCamp Toronto 2015Speeding up your WordPress Site - WordCamp Toronto 2015
Speeding up your WordPress Site - WordCamp Toronto 2015Alan Lok
 
SharePoint 2010 Boost your farm performance!
SharePoint 2010 Boost your farm performance!SharePoint 2010 Boost your farm performance!
SharePoint 2010 Boost your farm performance!Brian Culver
 
SharePoint Performance Optimization In 10 Steps for the IT Professional
SharePoint Performance Optimization In 10 Steps for the IT ProfessionalSharePoint Performance Optimization In 10 Steps for the IT Professional
SharePoint Performance Optimization In 10 Steps for the IT ProfessionalJoel Oleson
 
Using Apache as an Application Server
Using Apache as an Application ServerUsing Apache as an Application Server
Using Apache as an Application ServerPhil Windley
 
Monitoring Cassandra with Riemann
Monitoring Cassandra with RiemannMonitoring Cassandra with Riemann
Monitoring Cassandra with RiemannPatricia Gorla
 
Implementing SharePoint on Azure, Lessons Learnt from a Real World Project
Implementing SharePoint on Azure, Lessons Learnt from a Real World ProjectImplementing SharePoint on Azure, Lessons Learnt from a Real World Project
Implementing SharePoint on Azure, Lessons Learnt from a Real World ProjectK.Mohamed Faizal
 
Speeding up your WordPress site - WordCamp Hamilton 2015
Speeding up your WordPress site - WordCamp Hamilton 2015Speeding up your WordPress site - WordCamp Hamilton 2015
Speeding up your WordPress site - WordCamp Hamilton 2015Alan Lok
 
AWS Webinar 23 - Getting Started with AWS - Understanding total cost of owner...
AWS Webinar 23 - Getting Started with AWS - Understanding total cost of owner...AWS Webinar 23 - Getting Started with AWS - Understanding total cost of owner...
AWS Webinar 23 - Getting Started with AWS - Understanding total cost of owner...Cobus Bernard
 
ASP.NET MVC Performance
ASP.NET MVC PerformanceASP.NET MVC Performance
ASP.NET MVC Performancerudib
 
Clug 2011 March web server optimisation
Clug 2011 March  web server optimisationClug 2011 March  web server optimisation
Clug 2011 March web server optimisationgrooverdan
 
Performance Tuning - MuraCon 2012
Performance Tuning - MuraCon 2012Performance Tuning - MuraCon 2012
Performance Tuning - MuraCon 2012eballisty
 
Web Performance, Scalability, and Testing Techniques - Boston PHP Meetup
Web Performance, Scalability, and Testing Techniques - Boston PHP MeetupWeb Performance, Scalability, and Testing Techniques - Boston PHP Meetup
Web Performance, Scalability, and Testing Techniques - Boston PHP MeetupJonathan Klein
 
Optimizing WordPress for Performance - WordCamp Houston
Optimizing WordPress for Performance - WordCamp HoustonOptimizing WordPress for Performance - WordCamp Houston
Optimizing WordPress for Performance - WordCamp HoustonChris Olbekson
 
Load Balancing MySQL with HAProxy - Slides
Load Balancing MySQL with HAProxy - SlidesLoad Balancing MySQL with HAProxy - Slides
Load Balancing MySQL with HAProxy - SlidesSeveralnines
 
Configuring Apache Servers for Better Web Perormance
Configuring Apache Servers for Better Web PerormanceConfiguring Apache Servers for Better Web Perormance
Configuring Apache Servers for Better Web PerormanceSpark::red
 

Similar to Performance scalability brandonlyon (20)

Site Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariSite Performance - From Pinto to Ferrari
Site Performance - From Pinto to Ferrari
 
Speeding up your WordPress Site - WordCamp Toronto 2015
Speeding up your WordPress Site - WordCamp Toronto 2015Speeding up your WordPress Site - WordCamp Toronto 2015
Speeding up your WordPress Site - WordCamp Toronto 2015
 
SharePoint 2010 Boost your farm performance!
SharePoint 2010 Boost your farm performance!SharePoint 2010 Boost your farm performance!
SharePoint 2010 Boost your farm performance!
 
SharePoint Performance Optimization In 10 Steps for the IT Professional
SharePoint Performance Optimization In 10 Steps for the IT ProfessionalSharePoint Performance Optimization In 10 Steps for the IT Professional
SharePoint Performance Optimization In 10 Steps for the IT Professional
 
Ipc mysql php
Ipc mysql php Ipc mysql php
Ipc mysql php
 
Using Apache as an Application Server
Using Apache as an Application ServerUsing Apache as an Application Server
Using Apache as an Application Server
 
Monitoring Cassandra with Riemann
Monitoring Cassandra with RiemannMonitoring Cassandra with Riemann
Monitoring Cassandra with Riemann
 
Implementing SharePoint on Azure, Lessons Learnt from a Real World Project
Implementing SharePoint on Azure, Lessons Learnt from a Real World ProjectImplementing SharePoint on Azure, Lessons Learnt from a Real World Project
Implementing SharePoint on Azure, Lessons Learnt from a Real World Project
 
Speeding up your WordPress site - WordCamp Hamilton 2015
Speeding up your WordPress site - WordCamp Hamilton 2015Speeding up your WordPress site - WordCamp Hamilton 2015
Speeding up your WordPress site - WordCamp Hamilton 2015
 
AWS Webinar 23 - Getting Started with AWS - Understanding total cost of owner...
AWS Webinar 23 - Getting Started with AWS - Understanding total cost of owner...AWS Webinar 23 - Getting Started with AWS - Understanding total cost of owner...
AWS Webinar 23 - Getting Started with AWS - Understanding total cost of owner...
 
Sun Web Server Brief
Sun Web Server BriefSun Web Server Brief
Sun Web Server Brief
 
ASP.NET MVC Performance
ASP.NET MVC PerformanceASP.NET MVC Performance
ASP.NET MVC Performance
 
App fabric introduction
App fabric introductionApp fabric introduction
App fabric introduction
 
Clug 2011 March web server optimisation
Clug 2011 March  web server optimisationClug 2011 March  web server optimisation
Clug 2011 March web server optimisation
 
Performance Tuning - MuraCon 2012
Performance Tuning - MuraCon 2012Performance Tuning - MuraCon 2012
Performance Tuning - MuraCon 2012
 
Web Performance, Scalability, and Testing Techniques - Boston PHP Meetup
Web Performance, Scalability, and Testing Techniques - Boston PHP MeetupWeb Performance, Scalability, and Testing Techniques - Boston PHP Meetup
Web Performance, Scalability, and Testing Techniques - Boston PHP Meetup
 
Optimizing WordPress for Performance - WordCamp Houston
Optimizing WordPress for Performance - WordCamp HoustonOptimizing WordPress for Performance - WordCamp Houston
Optimizing WordPress for Performance - WordCamp Houston
 
Load Balancing MySQL with HAProxy - Slides
Load Balancing MySQL with HAProxy - SlidesLoad Balancing MySQL with HAProxy - Slides
Load Balancing MySQL with HAProxy - Slides
 
Configuring Apache Servers for Better Web Perormance
Configuring Apache Servers for Better Web PerormanceConfiguring Apache Servers for Better Web Perormance
Configuring Apache Servers for Better Web Perormance
 
Bca1931 final
Bca1931 finalBca1931 final
Bca1931 final
 

More from Digitaria

Creating Goals in Google Analytics
Creating Goals in Google AnalyticsCreating Goals in Google Analytics
Creating Goals in Google AnalyticsDigitaria
 
If Content is King, Who is Sheriff?
If Content is King, Who is Sheriff?If Content is King, Who is Sheriff?
If Content is King, Who is Sheriff?Digitaria
 
Mobile As a Product, Not a Website
Mobile As a Product, Not a WebsiteMobile As a Product, Not a Website
Mobile As a Product, Not a WebsiteDigitaria
 
Ctools presentation
Ctools presentationCtools presentation
Ctools presentationDigitaria
 
Digital Convergence...Are You Ready?
Digital Convergence...Are You Ready?Digital Convergence...Are You Ready?
Digital Convergence...Are You Ready?Digitaria
 

More from Digitaria (6)

Creating Goals in Google Analytics
Creating Goals in Google AnalyticsCreating Goals in Google Analytics
Creating Goals in Google Analytics
 
If Content is King, Who is Sheriff?
If Content is King, Who is Sheriff?If Content is King, Who is Sheriff?
If Content is King, Who is Sheriff?
 
Mobile As a Product, Not a Website
Mobile As a Product, Not a WebsiteMobile As a Product, Not a Website
Mobile As a Product, Not a Website
 
Drupal SEO
Drupal SEODrupal SEO
Drupal SEO
 
Ctools presentation
Ctools presentationCtools presentation
Ctools presentation
 
Digital Convergence...Are You Ready?
Digital Convergence...Are You Ready?Digital Convergence...Are You Ready?
Digital Convergence...Are You Ready?
 

Recently uploaded

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 MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
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 MenDelhi Call girls
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
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 Nanonetsnaman860154
 
[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.pdfhans926745
 
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 WorkerThousandEyes
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 

Recently uploaded (20)

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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
[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
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 

Performance scalability brandonlyon

  • 1. PERFORMANCE & SCALABILITY Where to Begin Brandon Lyon
  • 2. Performance & Scalability  Define the Objective
  • 3. Performance & Scalability  Define the Objective  Minimize HTTP Requests
  • 4. Performance & Scalability  Define the Objective  Minimize HTTP Requests  Minimize Server Processing
  • 5. Performance & Scalability  Define the Objective  Minimize HTTP Requests  Minimize Server Processing  Optimize Server Processing
  • 6. Performance & Scalability  Define the Objective  Minimize HTTP Requests  Minimize Server Processing  Optimize Server Processing  Optimize the Database
  • 7. Performance & Scalability  Define the Objective  Minimize HTTP Requests  Minimize Server Processing  Optimize Server Processing  Optimize the Database
  • 8. Minimizing HTTP Requests  Aggregate & Compress CSS Files
  • 9. Minimizing HTTP Requests  Aggregate & Compress CSS Files  Aggregate JavaScript Files
  • 10. Minimizing HTTP Requests  Aggregate & Compress CSS Files  Aggregate JavaScript Files  Image Sprites
  • 11. Performance & Scalability  Define the Objective  Minimize HTTP Requests  Minimize Server Processing  Optimize Server Processing  Optimize the Database
  • 12. Minimize Server Processing  Alternative PHP Cache (APC)  Memcached  Varnish Cache
  • 13. Alternative PHP Cache (APC)  Make sure you've allocated enough memory. apc.shm_segments=1 apc.shm_size=32  Check your script files on every request? apc.stat=0  Memory Fragmentation? apc.ttl=0
  • 14. Memcached  Basic Implementation # memcached -m 24 -p 11211 -d $conf = array( 'memcache_servers' => array( 'localhost:11211' => 'default', ), 'memcache_bins' => array( 'cache' => 'default', ),
  • 15. Memcached  Server Cluster? $conf = array( 'memcache_servers' => array( host1:port => cluster, hostN:port => cluster, ), 'memcache_bins' => array( bin1 => cluster, binN => cluster, ),
  • 16. Varnish Cache  Toss your cookies!  Define Exceptions if (req.url !~ "^/blog/.*/") { if (req.url ~ "install.php|update.php") { set req.http.Cookie = return(pass); regsuball(req.http.Cookie, "comment_.*", ""); } }
  • 17. Performance & Scalability  Define the Objective  Minimize HTTP Requests  Minimize Server Processing  Optimize Server Processing  Optimize the Database
  • 18. Optimize Server Processing  Identify the Problem
  • 19. Optimize Server Processing  Identify the Problem FIX IT
  • 20. Optimize Server Processing  Identifying the Problem Areas  Network  Linux  Apache  MySQL  PHP
  • 21. Optimize Server Processing  Identifying the Problem Areas  Network  Linux  Apache  MySQL  PHP
  • 22. Optimize Server Processing  Performance Profiling  Apache Benchmarking (ab)  MySQL Slow Query Log & Profiling  PHP Xdebug & KCachegrind
  • 23. Apache Benchmarking (ab) # ab -n 100 -c 10 http://d7.blyon.lan/  10 Concurrent Requests  100 Requests  7.35 Requests/Second  50% of Requests served in under 1352ms
  • 24. Apache Benchmarking (ab)  Compress Cached Pages  Aggregate and Compress CSS files  Aggregate JavaScript files
  • 25. Apache Benchmarking (ab) # ab -n 100 -c 10 http://d7.blyon.lan/  10 Concurrent Requests  100 Requests  46.32 Requests/Second  50% of Requests served in under 213ms
  • 26. Apache Benchmarking (ab)  Install APC  Install APC Drupal Module
  • 27. Apache Benchmarking (ab) # ab -n 100 -c 10 http://d7.blyon.lan/  10 Concurrent Requests  100 Requests  648.77 Requests/Second  50% of Requests served in under 12ms
  • 28. Optimize Server Processing  Performance Profiling  Apache Benchmarking (ab)  MySQL Slow Query Log & Profiling  PHP Xdebug & KCachegrind
  • 29. MySQL Slow Query Log /etc/mysql/my.cnf log_slow_queries = /var/log/mysql/mysql-slow.log long_query_time = 1 # tail -f /var/log/mysql/mysql-slow.log # User@Host: root[root] @ localhost [] # Query_time: 0.000427 Lock_time: 0.000037 Rows_sent: 50 Rows_examined: 50 SET timestamp=1294541182; select * from node;
  • 30. Optimize Server Processing  Performance Profiling  Apache Benchmarking (ab)  MySQL Slow Query Log & Profiling  PHP Xdebug & KCachegrind
  • 31. PHP Xdebug & KCachegrind  Xdebug Features  Stack Traces & Function Traces in Error Messages  Memory Allocation  Infinite Recursion Protection  PHP Profiling  Code Coverage Analysis  Interactive Debugging support
  • 32. PHP Xdebug & KCachegrind  Xdebug Configuration  zend_extension="/usr/local/php/modules/xdebug.so"  xdebug.profiler_enable_trigger = 1  Xdebug Usage  Append ”?XDEBUG_PROFILE=1” to URL  View cachegrind compatible profile log /tmp/cachegrind.out.10362
  • 33. PHP Xdebug & KCachegrind  Kcachegrind  Profile data Visualization tool  Accepts ”Callgrind Profile” formatted data  Requires KDE Libraries
  • 34. PHP Xdebug & KCachegrind
  • 36. Performance & Scalability  Define the Objective  Minimize HTTP Requests  Minimize Server Processing  Optimize Server Processing  Optimize the Database
  • 37. Optimizing the Database http://day32.com/MySQL/tuning-primer.sh  Analyzes current my.cnf  Analyzes resource usage  Analyzes Caching  Analyzes Tables and Queries  Generates recommended my.cnf
  • 38. PERFORMANCE & SCALABILITY Where to Begin Brandon Lyon