SlideShare uma empresa Scribd logo
1 de 50
Baixar para ler offline
TreeHouseAgency.com!




Who?
Thomas Wysocki!
Lead Architect!
Thomas@treehouseagency.com!




Steven Merrill!
Sr. Developer!
Steven@treehouseagency.com!
What we're doing today
     Identify scaling issues!

 
     Introduce an optimization

 
     process!
     Look at useful testing and

 
     monitoring tools!
Does Drupal Scale?
When is scaling a concern?
          When there are a lot of:!

 
           Pageviews!
     
 
           Authenticated users!
     
 
What if a site doesn't scale?


  Crash!!
Enable
 slow
 query
logging!




Test
Plan!                                              Ongoing
                                                  Monitoring!
           Analyze
                      Optimize
            slow
                      queries!
           queries!


 Load                               Site Live?!    Front-end
                                                  Optimization!
Testing!
           Analyze
                      Additional!
            slow       Caching!
            pages!
                                                  Additional
                                                  Techniques!
Enable Slow Query Log
•    Ensure you have a my.cnf
     active!
•    Enable the logging of slow
     queries inside my.cnf  !
Enable Slow Query Log


      !

 
Load testing - why?

   Simulate traffic before your
  site hits the real world!

   Populate the site with data
  automatically!
Load testing - how?

   Utilize load testing software or
  services!

   HP Load Runner!

   OpenLoad!

   jMeter !
Load testing - differences?
      Cost!

 
      Complexity!

 
      Hardware requirements!

 
      Types of testing available!

 
Load Testing - jMeter


     Note: I have a swf video for now but

 
     not sure how to embed that here.  
     See attachment via email.!
Load Testing - jMeter - Execute


      !

 
 !

 
Reviewing slow query logs


       Check if any files were output to you
1. 
       slow log file.!

       Generate a summary of the log file
2. 
       using mysqldumpslow!
Reviewing slow query logs


       !

 
Slow Query Logs
•    Typical Problems:!
     Poor Indexing resulting in Table

 
     scans!

     Locking!

 
     large result sets !

 
     Slow, complicated queries!

 
Slow Query Log


     For example:!

 
Query Optimization
          Things to keep in mind!

 
            keep it simple!
     
 

            know your data!
     
 

            be consistent and plan ahead !
     
 
Analyze Page execution time


     screenshot!

 
Test with the devel module


      features, screenshot, screencast?!

 
Implement caching
•    Types of cache!
     Caching Engines!

 
     Drupal Configurable cache!

 
     Programmatic caching!

 
Implement caching
•    Types of caching
     engines:!
     Standard Drupal Cache!

 
     APC - standard drupal cache +

 
     memory?!

     Memcache!

 
     Static page cache / Boost !

 
Standard Drupal Cache
•    positive    !

     provides caching out of the

 
     box!

•    negative !
     relies upon the database for

 
     storage, which results in a lot
     of reads/writes which can
     result in table or row locks,
     etc.!
APC
•    positive !
     much faster performance than

 
     memcached!

•    negative !
     not networkable, so not suited

 
     to multiple webheads!
Memcache
•    positive    !

     standard drupal cache +

 
     memory + multiple servers!

•    negative !
     limited control over when and

 
     how things disappear from
     cache!
Static Page Cache/Boost
•    positive!
     drupal flexibility +

 
     performance of static files!

•    negative !
     generally works only with

 
     anonymous users!
Implement caching
•    Types of configurable
     cache:!
     Page cache!

 
     Block Cache!

 
Page Cache
•    positive   !

     allows full pages to be

 
     cached, and thus we can serve
     many more page views on a
     single server!

•    negative !
     only works for anonymous

 
     users!
Block Cache
•    positive       !

     configurable to work with

 
     anonymous users, as well as logged
     in users!

     can be page specific, user specific,

 
     both or site wide and set to expire at
     specified intervals!

•    negative !
     hard to control the expiration of

 
     data outside of the specified
     intervals!
Implement caching
•    Types of programmatic
     cache:!
     Static variable cache!

 
     Programmatic data cache!

 
Static Variable Cache
• positive !

  eliminates often duplicate rendered
objects!


  core already uses this in some places so
that a second node_load() in a page
                                  !
request doesn't hit the database

• negative !

  Only applicable in the course of a single
web request!
Programmatic Data Cache
•     positive    !

      Expensive items can be cached

 
      for a period of time!

      Easily added into custom

 
      modules or custom themes!

•     negative !
      Difficult to know where to do

 
      it, and invalidating content
      becomes complicated!
Ongoing monitoring
•    Tools available!
     Cacti!

 
     MySql Enterprise Manager!

 
     Gomez!

 
Ongoing monitoring - Cacti
          Free!!

 
          Monitors various aspect of your site.  !

 
            cpu utilization!
     
 

            server load!
     
 

            memory usage!
     
 

            database activity!
     
 

          Trend visualization!

 
          Community add-ons !

 
 !

 
Additional measures
          Database Scaling!

 
               Addition of read-only slave servers!
     
 

               InnoDB / MyISM / Memory optimization!
     
 

               You must currently patch modules or add
     
 
               slave queries to your own modules!

               Drupal 7 should inherently let us do this !
     
 

          Hardware changes!

 
               Load balancers!
     
 

                 caching!
          
 

                 redundancy!
          
 
Additional measures
     Front-end techniques!

 
     Apache tweaks!

 
     CDN!

 
Front end Techniques
     Front-end performance matters!!

 
     If a page takes 0.5s to generate and

 
     7s to render, it will still seem slow!

     Use YSlow! to get a score on how

 
     fast your website's front-end is!

     JS Aggregation / Compression!

 
     Similar to CSS Aggregation !

 
     Load JS on the bottom!

 
Front end Techniques
     YSlow! in action!

 
     before optimizing:!

 
     212.7K (auth user)!

 
     Almost 6 seconds!

 
     Barely earns a ‘D’!

 
Front end Techniques
     JS Aggregation!

 
     Same size!

 
     33% faster!

 
     Better score!

 
Front end Techniques
          JS Aggregation!

 
           Core in D6, Available as contrib in D5!
     
 

          JS Minification!

 
           Unsafe in PHP!
     
 

          CSS Aggregation!

 
           Available out of the box, extremely useful
     
 
           in reducing the number of http requests
           needed for each page.   !
CDN
     Load static assets from several

 
     points around the country or world!

     Eliminates unnecessary load on your

 
     web servers!

     Relatively cheap!

 
     Easy to implement   !

 
     As cloud storage evolves, CDN

 
     integration is becoming
     commoditized, like SimpleCDN!
Front end Techniques
     All images, css

 
     and js on
     SimpleCDN!

     Gzip

 
     compression!

     Far-future

 
     expiry headers!

     Page size 40% of

 
     original!

     Load time down

 
     45%!
Apache Techniques
     GZip compression!

 
     Move .htaccess

 
     configurations inside your
     http.config!
Results
     Far-Future

 
     Expiry Headers!

     Gzipping!

 
     Updated

 
     ShareThis!

     212.7k to 99.96k!

 
     5.7s to 1.7s!

 
     D to A!!

 
Key takeaways
     Follow a logical, deliberate

 
     process!
     Leverage the tools available

 
     to you!

     Use a multi-faceted approach  !

 
     Test, test, test!!

 

Mais conteúdo relacionado

Mais procurados

How_To_Soup_Up_Your_Farm
How_To_Soup_Up_Your_FarmHow_To_Soup_Up_Your_Farm
How_To_Soup_Up_Your_FarmNigel Price
 
Performance and scalability with drupal
Performance and scalability with drupalPerformance and scalability with drupal
Performance and scalability with drupalRonan Berder
 
How MongoDB is Being Used in China - Case Studies
How MongoDB is Being Used in China - Case StudiesHow MongoDB is Being Used in China - Case Studies
How MongoDB is Being Used in China - Case StudiesMongoDB
 
Extreme Web Performance for Mobile Devices - Velocity NY
Extreme Web Performance for Mobile Devices - Velocity NYExtreme Web Performance for Mobile Devices - Velocity NY
Extreme Web Performance for Mobile Devices - Velocity NYMaximiliano Firtman
 
High Performance Mobile Web
High Performance Mobile WebHigh Performance Mobile Web
High Performance Mobile WebJames D Bloom
 
"Turbo boost your website" aka BigPipe at Webinale 2014 in Berlin
"Turbo boost your website" aka BigPipe at Webinale 2014 in Berlin"Turbo boost your website" aka BigPipe at Webinale 2014 in Berlin
"Turbo boost your website" aka BigPipe at Webinale 2014 in BerlinTobias Zander
 
Windy cityrails performance_tuning
Windy cityrails performance_tuningWindy cityrails performance_tuning
Windy cityrails performance_tuningJohn McCaffrey
 
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
 
Best practices para publicar un WebSite con SharePoint Server 2010
Best practices para publicar un WebSite con SharePoint Server 2010Best practices para publicar un WebSite con SharePoint Server 2010
Best practices para publicar un WebSite con SharePoint Server 2010Juan Andrés Valenzuela
 
The Need for Speed - SMX Sydney 2013
The Need for Speed - SMX Sydney 2013The Need for Speed - SMX Sydney 2013
The Need for Speed - SMX Sydney 2013Bastian Grimm
 
Client-side Website Optimization
Client-side Website OptimizationClient-side Website Optimization
Client-side Website OptimizationRadu Pintilie
 
improving the performance of Rails web Applications
improving the performance of Rails web Applicationsimproving the performance of Rails web Applications
improving the performance of Rails web ApplicationsJohn McCaffrey
 
Administrivia: Golden Tips for Making JIRA Hum
Administrivia: Golden Tips for Making JIRA HumAdministrivia: Golden Tips for Making JIRA Hum
Administrivia: Golden Tips for Making JIRA HumAtlassian
 
Florian Koch - Monitoring CoreOS with Zabbix
Florian Koch - Monitoring CoreOS with ZabbixFlorian Koch - Monitoring CoreOS with Zabbix
Florian Koch - Monitoring CoreOS with ZabbixZabbix
 
Performance automation 101 @LDNWebPerf MickMcGuinness
Performance automation 101 @LDNWebPerf MickMcGuinnessPerformance automation 101 @LDNWebPerf MickMcGuinness
Performance automation 101 @LDNWebPerf MickMcGuinnessStephen Thair
 
WordPress Theme and Plugin Optimization - WordPress Arvika March '14
WordPress Theme and Plugin Optimization - WordPress Arvika March '14WordPress Theme and Plugin Optimization - WordPress Arvika March '14
WordPress Theme and Plugin Optimization - WordPress Arvika March '14slobodanmanic
 

Mais procurados (20)

How_To_Soup_Up_Your_Farm
How_To_Soup_Up_Your_FarmHow_To_Soup_Up_Your_Farm
How_To_Soup_Up_Your_Farm
 
Caching 101 - WordCamp OC
Caching 101 - WordCamp OCCaching 101 - WordCamp OC
Caching 101 - WordCamp OC
 
Performance and scalability with drupal
Performance and scalability with drupalPerformance and scalability with drupal
Performance and scalability with drupal
 
How MongoDB is Being Used in China - Case Studies
How MongoDB is Being Used in China - Case StudiesHow MongoDB is Being Used in China - Case Studies
How MongoDB is Being Used in China - Case Studies
 
Extreme Web Performance for Mobile Devices - Velocity NY
Extreme Web Performance for Mobile Devices - Velocity NYExtreme Web Performance for Mobile Devices - Velocity NY
Extreme Web Performance for Mobile Devices - Velocity NY
 
High Performance Mobile Web
High Performance Mobile WebHigh Performance Mobile Web
High Performance Mobile Web
 
"Turbo boost your website" aka BigPipe at Webinale 2014 in Berlin
"Turbo boost your website" aka BigPipe at Webinale 2014 in Berlin"Turbo boost your website" aka BigPipe at Webinale 2014 in Berlin
"Turbo boost your website" aka BigPipe at Webinale 2014 in Berlin
 
Cypress, charm and easy.
Cypress, charm and easy.Cypress, charm and easy.
Cypress, charm and easy.
 
Faster web pages
Faster web pagesFaster web pages
Faster web pages
 
Windy cityrails performance_tuning
Windy cityrails performance_tuningWindy cityrails performance_tuning
Windy cityrails performance_tuning
 
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
 
Best practices para publicar un WebSite con SharePoint Server 2010
Best practices para publicar un WebSite con SharePoint Server 2010Best practices para publicar un WebSite con SharePoint Server 2010
Best practices para publicar un WebSite con SharePoint Server 2010
 
The Need for Speed - SMX Sydney 2013
The Need for Speed - SMX Sydney 2013The Need for Speed - SMX Sydney 2013
The Need for Speed - SMX Sydney 2013
 
Client-side Website Optimization
Client-side Website OptimizationClient-side Website Optimization
Client-side Website Optimization
 
improving the performance of Rails web Applications
improving the performance of Rails web Applicationsimproving the performance of Rails web Applications
improving the performance of Rails web Applications
 
Administrivia: Golden Tips for Making JIRA Hum
Administrivia: Golden Tips for Making JIRA HumAdministrivia: Golden Tips for Making JIRA Hum
Administrivia: Golden Tips for Making JIRA Hum
 
Cypress new old Selenium
Cypress new old SeleniumCypress new old Selenium
Cypress new old Selenium
 
Florian Koch - Monitoring CoreOS with Zabbix
Florian Koch - Monitoring CoreOS with ZabbixFlorian Koch - Monitoring CoreOS with Zabbix
Florian Koch - Monitoring CoreOS with Zabbix
 
Performance automation 101 @LDNWebPerf MickMcGuinness
Performance automation 101 @LDNWebPerf MickMcGuinnessPerformance automation 101 @LDNWebPerf MickMcGuinness
Performance automation 101 @LDNWebPerf MickMcGuinness
 
WordPress Theme and Plugin Optimization - WordPress Arvika March '14
WordPress Theme and Plugin Optimization - WordPress Arvika March '14WordPress Theme and Plugin Optimization - WordPress Arvika March '14
WordPress Theme and Plugin Optimization - WordPress Arvika March '14
 

Semelhante a Scaling Drupal: Not IF... HOW

Gmr Highload Presentation Revised
Gmr Highload Presentation RevisedGmr Highload Presentation Revised
Gmr Highload Presentation RevisedOntico
 
Gmr Highload Presentation
Gmr Highload PresentationGmr Highload Presentation
Gmr Highload PresentationOntico
 
From One to a Cluster
From One to a ClusterFrom One to a Cluster
From One to a Clusterguestd34230
 
Web Optimization Level: Paranoid
Web Optimization Level: ParanoidWeb Optimization Level: Paranoid
Web Optimization Level: Paranoidrobin_sy
 
Administrivia: Golden Tips for Making JIRA Hum
Administrivia: Golden Tips for Making JIRA HumAdministrivia: Golden Tips for Making JIRA Hum
Administrivia: Golden Tips for Making JIRA HumAtlassian
 
Facebook Hadoop Data & Applications
Facebook Hadoop Data & ApplicationsFacebook Hadoop Data & Applications
Facebook Hadoop Data & Applicationsdzhou
 
Wordpress optimization
Wordpress optimizationWordpress optimization
Wordpress optimizationAlmog Baku
 
My Site is slow - Drupal Camp London 2013
My Site is slow - Drupal Camp London 2013My Site is slow - Drupal Camp London 2013
My Site is slow - Drupal Camp London 2013hernanibf
 
Ajax Tutorial
Ajax TutorialAjax Tutorial
Ajax Tutorialoscon2007
 
Rails Conf Europe 2007 Notes
Rails Conf  Europe 2007  NotesRails Conf  Europe 2007  Notes
Rails Conf Europe 2007 NotesRoss Lawley
 
Iguazú: A Long-Running Job Scheduler using Docker and Mesos
Iguazú: A Long-Running Job Scheduler using Docker and MesosIguazú: A Long-Running Job Scheduler using Docker and Mesos
Iguazú: A Long-Running Job Scheduler using Docker and MesosColleen Lee
 
Wordcamp2009
Wordcamp2009Wordcamp2009
Wordcamp2009joetek
 
Implementing a production Shibboleth IdP service at Cardiff University
Implementing a production Shibboleth IdP service at Cardiff UniversityImplementing a production Shibboleth IdP service at Cardiff University
Implementing a production Shibboleth IdP service at Cardiff UniversityJISC.AM
 
Inside Picnik: How We Built Picnik (and What We Learned Along the Way)
Inside Picnik: How We Built Picnik (and What We Learned Along the Way)Inside Picnik: How We Built Picnik (and What We Learned Along the Way)
Inside Picnik: How We Built Picnik (and What We Learned Along the Way)jjhuff
 
MongoDB and server performance
MongoDB and server performanceMongoDB and server performance
MongoDB and server performanceAlon Horev
 
Smart Client Development
Smart Client DevelopmentSmart Client Development
Smart Client DevelopmentTamir Khason
 

Semelhante a Scaling Drupal: Not IF... HOW (20)

Gmr Highload Presentation Revised
Gmr Highload Presentation RevisedGmr Highload Presentation Revised
Gmr Highload Presentation Revised
 
Gmr Highload Presentation
Gmr Highload PresentationGmr Highload Presentation
Gmr Highload Presentation
 
Magee Dday2 Fixing App Performance Italiano
Magee Dday2 Fixing App Performance ItalianoMagee Dday2 Fixing App Performance Italiano
Magee Dday2 Fixing App Performance Italiano
 
From One to a Cluster
From One to a ClusterFrom One to a Cluster
From One to a Cluster
 
Web Optimization Level: Paranoid
Web Optimization Level: ParanoidWeb Optimization Level: Paranoid
Web Optimization Level: Paranoid
 
Meta Refresh 2014
Meta Refresh 2014Meta Refresh 2014
Meta Refresh 2014
 
Qcon
QconQcon
Qcon
 
Administrivia: Golden Tips for Making JIRA Hum
Administrivia: Golden Tips for Making JIRA HumAdministrivia: Golden Tips for Making JIRA Hum
Administrivia: Golden Tips for Making JIRA Hum
 
Facebook Hadoop Data & Applications
Facebook Hadoop Data & ApplicationsFacebook Hadoop Data & Applications
Facebook Hadoop Data & Applications
 
Wordpress optimization
Wordpress optimizationWordpress optimization
Wordpress optimization
 
My Site is slow - Drupal Camp London 2013
My Site is slow - Drupal Camp London 2013My Site is slow - Drupal Camp London 2013
My Site is slow - Drupal Camp London 2013
 
Ajax Tutorial
Ajax TutorialAjax Tutorial
Ajax Tutorial
 
Rails Conf Europe 2007 Notes
Rails Conf  Europe 2007  NotesRails Conf  Europe 2007  Notes
Rails Conf Europe 2007 Notes
 
Iguazú: A Long-Running Job Scheduler using Docker and Mesos
Iguazú: A Long-Running Job Scheduler using Docker and MesosIguazú: A Long-Running Job Scheduler using Docker and Mesos
Iguazú: A Long-Running Job Scheduler using Docker and Mesos
 
Wordcamp2009
Wordcamp2009Wordcamp2009
Wordcamp2009
 
Web 2.0 101
Web 2.0 101Web 2.0 101
Web 2.0 101
 
Implementing a production Shibboleth IdP service at Cardiff University
Implementing a production Shibboleth IdP service at Cardiff UniversityImplementing a production Shibboleth IdP service at Cardiff University
Implementing a production Shibboleth IdP service at Cardiff University
 
Inside Picnik: How We Built Picnik (and What We Learned Along the Way)
Inside Picnik: How We Built Picnik (and What We Learned Along the Way)Inside Picnik: How We Built Picnik (and What We Learned Along the Way)
Inside Picnik: How We Built Picnik (and What We Learned Along the Way)
 
MongoDB and server performance
MongoDB and server performanceMongoDB and server performance
MongoDB and server performance
 
Smart Client Development
Smart Client DevelopmentSmart Client Development
Smart Client Development
 

Mais de Treehouse Agency

Dcnyc10 build a better drupal agency
Dcnyc10 build a better drupal agencyDcnyc10 build a better drupal agency
Dcnyc10 build a better drupal agencyTreehouse Agency
 
Strategic Management of Multiple Projects (aka Project Whispering)
Strategic Management of Multiple Projects (aka Project Whispering)Strategic Management of Multiple Projects (aka Project Whispering)
Strategic Management of Multiple Projects (aka Project Whispering)Treehouse Agency
 
Modern Theming: Beyond Proprocessing and .tpls
Modern Theming: Beyond Proprocessing and .tplsModern Theming: Beyond Proprocessing and .tpls
Modern Theming: Beyond Proprocessing and .tplsTreehouse Agency
 
Project Management as an Art Form
Project Management as an Art FormProject Management as an Art Form
Project Management as an Art FormTreehouse Agency
 
The Case for Drupal in the Enterprise
The Case for Drupal in the EnterpriseThe Case for Drupal in the Enterprise
The Case for Drupal in the EnterpriseTreehouse Agency
 

Mais de Treehouse Agency (11)

Dcnyc10 build a better drupal agency
Dcnyc10 build a better drupal agencyDcnyc10 build a better drupal agency
Dcnyc10 build a better drupal agency
 
Vagrant puppet
Vagrant puppetVagrant puppet
Vagrant puppet
 
Front endnyc
Front endnycFront endnyc
Front endnyc
 
Strategic Management of Multiple Projects (aka Project Whispering)
Strategic Management of Multiple Projects (aka Project Whispering)Strategic Management of Multiple Projects (aka Project Whispering)
Strategic Management of Multiple Projects (aka Project Whispering)
 
Project whispering-v1
Project whispering-v1Project whispering-v1
Project whispering-v1
 
Bad beans
Bad beansBad beans
Bad beans
 
Modern Theming: Beyond Proprocessing and .tpls
Modern Theming: Beyond Proprocessing and .tplsModern Theming: Beyond Proprocessing and .tpls
Modern Theming: Beyond Proprocessing and .tpls
 
Leaving you.v3
Leaving you.v3Leaving you.v3
Leaving you.v3
 
Project Management as an Art Form
Project Management as an Art FormProject Management as an Art Form
Project Management as an Art Form
 
Ctools UI Presentation
Ctools UI PresentationCtools UI Presentation
Ctools UI Presentation
 
The Case for Drupal in the Enterprise
The Case for Drupal in the EnterpriseThe Case for Drupal in the Enterprise
The Case for Drupal in the Enterprise
 

Último

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
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
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
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
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
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
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
[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
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
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
 

Último (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
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
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
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
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
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
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
[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
 
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 ...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
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
 

Scaling Drupal: Not IF... HOW

  • 1.
  • 3. Thomas Wysocki! Lead Architect! Thomas@treehouseagency.com! Steven Merrill! Sr. Developer! Steven@treehouseagency.com!
  • 4. What we're doing today Identify scaling issues!   Introduce an optimization   process! Look at useful testing and   monitoring tools!
  • 6.
  • 7. When is scaling a concern? When there are a lot of:!   Pageviews!   Authenticated users!  
  • 8. What if a site doesn't scale? Crash!!
  • 9. Enable slow query logging! Test Plan! Ongoing Monitoring! Analyze Optimize slow queries! queries! Load Site Live?! Front-end Optimization! Testing! Analyze Additional! slow Caching! pages! Additional Techniques!
  • 10. Enable Slow Query Log •  Ensure you have a my.cnf active! •  Enable the logging of slow queries inside my.cnf  !
  • 11. Enable Slow Query Log  !  
  • 12. Load testing - why?   Simulate traffic before your site hits the real world!   Populate the site with data automatically!
  • 13. Load testing - how?   Utilize load testing software or services!   HP Load Runner!   OpenLoad!   jMeter !
  • 14. Load testing - differences? Cost!   Complexity!   Hardware requirements!   Types of testing available!  
  • 15. Load Testing - jMeter Note: I have a swf video for now but   not sure how to embed that here.   See attachment via email.!
  • 16. Load Testing - jMeter - Execute  !  
  • 18. Reviewing slow query logs Check if any files were output to you 1.  slow log file.! Generate a summary of the log file 2.  using mysqldumpslow!
  • 19. Reviewing slow query logs  !  
  • 20. Slow Query Logs •  Typical Problems:! Poor Indexing resulting in Table   scans! Locking!   large result sets !   Slow, complicated queries!  
  • 21. Slow Query Log For example:!  
  • 22. Query Optimization Things to keep in mind!   keep it simple!   know your data!   be consistent and plan ahead !  
  • 23. Analyze Page execution time screenshot!  
  • 24. Test with the devel module features, screenshot, screencast?!  
  • 25. Implement caching •  Types of cache! Caching Engines!   Drupal Configurable cache!   Programmatic caching!  
  • 26. Implement caching •  Types of caching engines:! Standard Drupal Cache!   APC - standard drupal cache +   memory?! Memcache!   Static page cache / Boost !  
  • 27. Standard Drupal Cache •  positive ! provides caching out of the   box! •  negative ! relies upon the database for   storage, which results in a lot of reads/writes which can result in table or row locks, etc.!
  • 28. APC •  positive ! much faster performance than   memcached! •  negative ! not networkable, so not suited   to multiple webheads!
  • 29. Memcache •  positive ! standard drupal cache +   memory + multiple servers! •  negative ! limited control over when and   how things disappear from cache!
  • 30. Static Page Cache/Boost •  positive! drupal flexibility +   performance of static files! •  negative ! generally works only with   anonymous users!
  • 31. Implement caching •  Types of configurable cache:! Page cache!   Block Cache!  
  • 32. Page Cache •  positive ! allows full pages to be   cached, and thus we can serve many more page views on a single server! •  negative ! only works for anonymous   users!
  • 33. Block Cache •  positive ! configurable to work with   anonymous users, as well as logged in users! can be page specific, user specific,   both or site wide and set to expire at specified intervals! •  negative ! hard to control the expiration of   data outside of the specified intervals!
  • 34. Implement caching •  Types of programmatic cache:! Static variable cache!   Programmatic data cache!  
  • 35. Static Variable Cache • positive !  eliminates often duplicate rendered objects!  core already uses this in some places so that a second node_load() in a page ! request doesn't hit the database • negative !  Only applicable in the course of a single web request!
  • 36. Programmatic Data Cache •  positive ! Expensive items can be cached   for a period of time! Easily added into custom   modules or custom themes! •  negative ! Difficult to know where to do   it, and invalidating content becomes complicated!
  • 37. Ongoing monitoring •  Tools available! Cacti!   MySql Enterprise Manager!   Gomez!  
  • 38. Ongoing monitoring - Cacti Free!!   Monitors various aspect of your site.  !   cpu utilization!   server load!   memory usage!   database activity!   Trend visualization!   Community add-ons !  
  • 40. Additional measures Database Scaling!   Addition of read-only slave servers!   InnoDB / MyISM / Memory optimization!   You must currently patch modules or add   slave queries to your own modules! Drupal 7 should inherently let us do this !   Hardware changes!   Load balancers!   caching!   redundancy!  
  • 41. Additional measures Front-end techniques!   Apache tweaks!   CDN!  
  • 42. Front end Techniques Front-end performance matters!!   If a page takes 0.5s to generate and   7s to render, it will still seem slow! Use YSlow! to get a score on how   fast your website's front-end is! JS Aggregation / Compression!   Similar to CSS Aggregation !   Load JS on the bottom!  
  • 43. Front end Techniques YSlow! in action!   before optimizing:!   212.7K (auth user)!   Almost 6 seconds!   Barely earns a ‘D’!  
  • 44. Front end Techniques JS Aggregation!   Same size!   33% faster!   Better score!  
  • 45. Front end Techniques JS Aggregation!   Core in D6, Available as contrib in D5!   JS Minification!   Unsafe in PHP!   CSS Aggregation!   Available out of the box, extremely useful   in reducing the number of http requests needed for each page.   !
  • 46. CDN Load static assets from several   points around the country or world! Eliminates unnecessary load on your   web servers! Relatively cheap!   Easy to implement   !   As cloud storage evolves, CDN   integration is becoming commoditized, like SimpleCDN!
  • 47. Front end Techniques All images, css   and js on SimpleCDN! Gzip   compression! Far-future   expiry headers! Page size 40% of   original! Load time down   45%!
  • 48. Apache Techniques GZip compression!   Move .htaccess   configurations inside your http.config!
  • 49. Results Far-Future   Expiry Headers! Gzipping!   Updated   ShareThis! 212.7k to 99.96k!   5.7s to 1.7s!   D to A!!  
  • 50. Key takeaways Follow a logical, deliberate   process! Leverage the tools available   to you! Use a multi-faceted approach  !   Test, test, test!!  

Notas do Editor

  1. A quick intro of where the session will be goingNote that focus is how to deal with problems on an existing site, rather than building a new site
  2. People are always asking, \"Does Drupal scale?\"
  3. All these sites attest, it can!
  4. Please revise this as needed
  5. I really don't know what else should go here. Please add as appropriate.
  6. On Mac / MAMP:/Applications/MAMP/Library/my.cnf
  7. Discuss:What load testing isWhat jMeter isWhat makes an effective plan
  8. I:
  9. jMeter Execution stepsStart slow to make sure the test plan works and makes senseDecide on the number of users you wanna serve in a given period of time. What we expect to get out of thisQueries into the slow query logProblem pages
  10. jMeter ResultsVariety of reportings available:GraphsResponse time tablesSummary reports, etc.We’ll get into it more in a bit….
  11. Discuss:How to find logsHow to identify \"slow queries\"--what constitutes slow, how to identify them in the logs
  12. Discuss:How to find logsHow to identify \"slow queries\"--what constitutes slow, how to identify them in the logs
  13. One example (the first query on the previous slide)
  14. Potential pitfalls of queriespoor indexinguseless joins and/or group bysreturning too much dataGood practices for writing querieskeep it simpleknow your databe consistent and plan ahead
  15. Interesting information:1) Fastest page response2) Slowest page response3) 90% time4) Errors
  16. By enabling the Devel module:1) View the listing of queries executed2) Make note of any:Slow QueriesQueries that are repeated frequentlyAnything that is being executed yet really shouldn’t be
  17. Optimize slow queriesLocate if any of the items being executed are the results of blocks or segments that can be cached in some wayWhat ways? - see slide
  18. Following slides will outline postives and negatives…Types of caching engines:Caching Engines- Standard Drupal Cache
  19. Types of configurable cache:
  20. Page cache- positive - allows full pages to be cached, and thus we can serve many more page views on a single server- negative - only works for anonymous users
  21. Block cache- positive - configurable to work with anonymous users, as well as logged in users- positive - can be page specific, user specific, both or site wide and set to expire at specified intervals- negative - hard to control the expiration of data outside of the specified intervals(i.e. if a block only shows a certain node type, you can set the cache to regenerate when any node type is created)
  22. Types of programmatic cache:Static variable cache- Programmatic data cache- creating caching strategies within your custom modules- you can also do this in the theme layer (if a particular part on a user's homepage takes a lot of queries or effort to run, you could consider caching it for even 5 minutes)
  23. only retrieve a single variable once per session- positive - eliminates often duplicate rendered objects- positive - core already uses this in some places so that a second node_load() in a single page request doesn't hit the database again.
  24. creating caching strategies within your custom modules- you can also do this in the theme layer (if a particular part on a user's homepage takes a lot of queries or effort to run, you could consider caching it for even 5 minutes)
  25. Discuss:Why ongoing monitoring is importantWhat Cacti isHow Cacti should be used
  26. - Free!- Monitors various aspect of your site.
  27. Discuss:Why ongoing monitoring is importantWhat Cacti isHow Cacti should be used
  28. - Database Scaling
  29. Not sure how you want to go with this part, if you want to cover each item individually like the others, or talk very briefly about each.Bullets randomly grabbed from notes...please change as you like.
  30. Front-end performance matters!If a page takes 0.5s to generate and 7s to render, it will still seem slowUse YSlow! to get a score on how fast your website's front-end isJS Aggregation / CompressionSimilar to CSS Aggregation
  31. YSlow! in actionbefore optimizing:The site is 212.7K
  32. - With Drupal's JSaggregation turned on,the site already scoresmuch better.- The page has notgotten much smallerin page size (only .6kis saved because coredoesn't compress JS)- The page is almost33% faster to load andour score is muchbetter.
  33. - CSS sprites let you reuse a single image as a background on multiple objects, again dropping the number of http requests
  34. Not sure how you want to go with this part, if you want to cover each item individually like the others, or talk very briefly about each.Bullets randomly grabbed from notes...please change as you like.
  35. the site with all the images, css and js on SimpleCDN.- SimpleCDN lets you
  36. Not sure how you want to go with this part, if you want to cover each item individually like the others, or talk very briefly about each.Bullets randomly grabbed from notes...please change as you like.
  37. - Here's the final resultwith our Apache serversending far-futureexpiry headers andgzipping html content.- To boost from a scoreof 90 - 99, I also broughtthe ShareThis module tothe 1.4 version, whichstopped it from beingincluded on every page.- Overall savings:212.7k - 99.96k page size5.7s - 1.7s page load timea
  38. These are my inferences. Please add or change as appropriate.