SlideShare une entreprise Scribd logo
1  sur  16
Anthropomorphic Design
Making a Better WordPress with Jazz Hands
+ =
But seriously….
HyperDB, MySQL
Performance, & Flavors of
MySQL
Evan Volgas
About me
• 10 years working with data — as an analyst, a
DBA, etc
• Currently a data engineer for WhatRunsWhere
• Data Engineer = DBA + Map Reduce + PTSD
from Apache Zookeeper
• Worked with WordPress off/on for about ~5 years
Disclaimers
I believe
• Google exists
• You can use it
• You don’t enjoy reading a bunch of code and
config files in a presentation any more than I do
• WordCamp needs more cowbell
What is
HyberDB?
• “Very advanced database class”
• Powers WordPress.com
• Supports replication, partitioning, load balancing,
etc
“Very advanced database class”
find 'hyperdb/' -name '*.php' | xargs wc -l
• HyperDB: 1,401 lines of PHP
• WordPress: 255,961 lines of PHP
• Hello Dolly: 81 lines of PHP
• Yoast’s Google Analytics 16,174 lines of PHP
Why’d you have to go and make
things so complicated
• The complexity of HyperDB has nothing to do with
the PHP code itself
• Implementing HyperDB itself is mostly
configuration
• To the extent that HyperDB is advanced, it’s
because MySQL has a lot of advanced stuff going
on underneath the hood
Who cares about MySQL?
An argument from fellow WordCamp ATL
presenter Tom McFarlin*
• Employers haven’t fully figured out what
WordPress *can* do
• WordPress makes it easy to be a software
implementer as opposed to a software
developer so in a lot of cases salaries probably
should be lower
• The WordPress community itself hasn’t
educated employers, customers, or software
implementors how classical software
development / engineering can fit into the
WordPress ecosystem
*https://tommcfarlin.com/wordpress-developer-
salary/
Tell me again why this matters
• We don’t need any more social media icons plugin
• Many of the things that are really pushing the
WordPress envelope are VERY database
intensive and their performance needs are poorly
understood
• There are a million things you can (and should) do
to optimize your WordPress website. When those
stop being enough, it’d be a good idea to know
some DB basics
HyperDB
• For practical extents and purposes, it’s kind of like a
giant wp-config.php that pertains to your database
• A lot of great resources for setting it up. If you
decide you want to try it, make sure you check out
https://www.digitalocean.com/community/tutorials/how-to-optimize-wordpress-
performance-with-mysql-replication-on-ubuntu-14-04
http://wpguru.co.uk/2010/07/testing-hyperdb/
http://codertalks.com/configuring-hyperdb-to-use-multiple-databases-for-buddypress-
multisite/
MySQL Lingo + Discussion
• Replication
• Statement vs Row-based
• Master vs Slave
• Partitioning
• Tends to either really help or really hurt you — very little in between
• NB: One of the reasons NoSQL has market adoption is because this is very painful
• Latency matters: https://gist.github.com/jboner/2841832
• Failover
• Load Balancing
• DB: HyperDB
• Web app: HA Proxy, Nginx, etc
MySQL Performance Basics
• innodb_buffer_pool_size: 70-80% of memory is common
• innodb_buffer_pool_instances: if you have a lot of memory, you might
run into bottlenecks where multiple threads are trying to access the buffer
pool. Splitting it up into multiple buffer pools can help
• innodb_file_per_table: if you are using < MySQL 5.6, turn this on. Trust
me.
• max_connections: if you ever think you need to tweak this, double check
that your connections are terminating properly
• log_bin: your master nodes needs this
• slow-query-log, slow-query-log-file, long_query_time: log your slow
queries. Don’t go crazy, but periodically log everything and analyze it
MySQL Best Practices
Monitor everything
• New Relic, Datadog, Zabbix, graphite/statsd/collectd
• http://www.percona.com/live/mysql-conference-
2013/sites/default/files/slides/percona-live-santa-clara-2013-presentation-
spilgames-mysql-statsd.pdf <— Interesting idea
Analyze your queries
• pt-query-digest, mysqldumpslow, plugins for third party monitoring
Learn how to reason about the Query Execution Plan
• http://www.sitepoint.com/using-explain-to-write-better-mysql-queries/
Schedule DB maintenance
Flavors of MySQL
• MySQL
• MariaDB
• https://mariadb.com/blog/how-install-and-run-
wordpress-mariadb
• Percona:
• https://www.digitalocean.com/community/tutorials/ho
w-to-install-a-fresh-percona-server-or-replace-mysql
Special Mention
Percona Toolkit
• http://www.percona.com/doc/percona-toolkit/2.2/
pt-query-digest --since '2014-11-01' --filter '$event->{arg} =~ m/^select/i' /var/log/mysql/slow-query.log >
/tmp/pt_slow_since_nov2014
Nginx + PHP-FPM
• http://www.raspipress.com/2014/06/tutorial-install-wordpress-on-a-
raspberry-pi-using-nginx/
Learn from people within WordPress and from outside of it
• good example: https://roots.io/twelve-factor-wordpress/

Contenu connexe

Tendances

Speed up Your Joomla Site for Ultimate Performance
Speed up Your Joomla Site for Ultimate PerformanceSpeed up Your Joomla Site for Ultimate Performance
Speed up Your Joomla Site for Ultimate PerformanceJoomlaDay Australia
 
High Performance WordPress - WordCamp Jerusalem 2010
High Performance WordPress - WordCamp Jerusalem 2010High Performance WordPress - WordCamp Jerusalem 2010
High Performance WordPress - WordCamp Jerusalem 2010Barry Abrahamson
 
High Performance WordPress II
High Performance WordPress IIHigh Performance WordPress II
High Performance WordPress IIBarry Abrahamson
 
How to make your Webpack builds 10x faster
How to make your Webpack builds 10x fasterHow to make your Webpack builds 10x faster
How to make your Webpack builds 10x fastertrueter
 
WordPress Plugins and Security
WordPress Plugins and SecurityWordPress Plugins and Security
WordPress Plugins and SecurityThink Media Inc.
 
WordCamp SF 2011: Debugging in WordPress
WordCamp SF 2011: Debugging in WordPressWordCamp SF 2011: Debugging in WordPress
WordCamp SF 2011: Debugging in WordPressandrewnacin
 
What Multisite can do for You - Anthony Cole - WordCamp Sydney 2012
What Multisite can do for You - Anthony Cole - WordCamp Sydney 2012What Multisite can do for You - Anthony Cole - WordCamp Sydney 2012
What Multisite can do for You - Anthony Cole - WordCamp Sydney 2012WordCamp Sydney
 
Hidden Secrets For A Hack-Proof Joomla! Site
Hidden Secrets For A Hack-Proof Joomla! SiteHidden Secrets For A Hack-Proof Joomla! Site
Hidden Secrets For A Hack-Proof Joomla! SiteDaniel Kanchev
 
Here Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPressHere Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPressRami Sayar
 
Exploring WordPress Multisite
Exploring WordPress MultisiteExploring WordPress Multisite
Exploring WordPress MultisiteLisa Sabin-Wilson
 
How to Speed Up Your Joomla! Site
How to Speed Up Your Joomla! SiteHow to Speed Up Your Joomla! Site
How to Speed Up Your Joomla! SiteDaniel Kanchev
 
DrupalCon Barcelona 2015
DrupalCon Barcelona 2015DrupalCon Barcelona 2015
DrupalCon Barcelona 2015Daniel Kanchev
 
Optimizing WordPress (WordCamp Philly 2011)
Optimizing WordPress (WordCamp Philly 2011)Optimizing WordPress (WordCamp Philly 2011)
Optimizing WordPress (WordCamp Philly 2011)Ben Metcalfe
 
I Can Haz More Performanz?
I Can Haz More Performanz?I Can Haz More Performanz?
I Can Haz More Performanz?Andy Melichar
 
Speeding Up WordPress sites
Speeding Up WordPress sitesSpeeding Up WordPress sites
Speeding Up WordPress sitesJason Yingling
 

Tendances (20)

Speed up Your Joomla Site for Ultimate Performance
Speed up Your Joomla Site for Ultimate PerformanceSpeed up Your Joomla Site for Ultimate Performance
Speed up Your Joomla Site for Ultimate Performance
 
High Performance WordPress - WordCamp Jerusalem 2010
High Performance WordPress - WordCamp Jerusalem 2010High Performance WordPress - WordCamp Jerusalem 2010
High Performance WordPress - WordCamp Jerusalem 2010
 
Ithemes presentation
Ithemes presentationIthemes presentation
Ithemes presentation
 
High Performance WordPress II
High Performance WordPress IIHigh Performance WordPress II
High Performance WordPress II
 
How to make your Webpack builds 10x faster
How to make your Webpack builds 10x fasterHow to make your Webpack builds 10x faster
How to make your Webpack builds 10x faster
 
WordPress Plugins and Security
WordPress Plugins and SecurityWordPress Plugins and Security
WordPress Plugins and Security
 
WordCamp SF 2011: Debugging in WordPress
WordCamp SF 2011: Debugging in WordPressWordCamp SF 2011: Debugging in WordPress
WordCamp SF 2011: Debugging in WordPress
 
WordPress Multisite
WordPress MultisiteWordPress Multisite
WordPress Multisite
 
What Multisite can do for You - Anthony Cole - WordCamp Sydney 2012
What Multisite can do for You - Anthony Cole - WordCamp Sydney 2012What Multisite can do for You - Anthony Cole - WordCamp Sydney 2012
What Multisite can do for You - Anthony Cole - WordCamp Sydney 2012
 
Hidden Secrets For A Hack-Proof Joomla! Site
Hidden Secrets For A Hack-Proof Joomla! SiteHidden Secrets For A Hack-Proof Joomla! Site
Hidden Secrets For A Hack-Proof Joomla! Site
 
Here Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPressHere Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPress
 
Exploring WordPress Multisite
Exploring WordPress MultisiteExploring WordPress Multisite
Exploring WordPress Multisite
 
How to Speed Up Your Joomla! Site
How to Speed Up Your Joomla! SiteHow to Speed Up Your Joomla! Site
How to Speed Up Your Joomla! Site
 
DrupalCon Barcelona 2015
DrupalCon Barcelona 2015DrupalCon Barcelona 2015
DrupalCon Barcelona 2015
 
Presentation1
Presentation1Presentation1
Presentation1
 
Optimizing WordPress (WordCamp Philly 2011)
Optimizing WordPress (WordCamp Philly 2011)Optimizing WordPress (WordCamp Philly 2011)
Optimizing WordPress (WordCamp Philly 2011)
 
Optimizing wp
Optimizing wpOptimizing wp
Optimizing wp
 
I Can Haz More Performanz?
I Can Haz More Performanz?I Can Haz More Performanz?
I Can Haz More Performanz?
 
Hello npm
Hello npmHello npm
Hello npm
 
Speeding Up WordPress sites
Speeding Up WordPress sitesSpeeding Up WordPress sites
Speeding Up WordPress sites
 

En vedette

WordPress Multisite: O que são, onde vivem, do que se alimentam?
WordPress Multisite: O que são, onde vivem, do que se alimentam?WordPress Multisite: O que são, onde vivem, do que se alimentam?
WordPress Multisite: O que são, onde vivem, do que se alimentam?Rudá Almeida
 
High performance WordPress
High performance WordPressHigh performance WordPress
High performance WordPressMikel King
 
Paolo avalle discovery chemistry congress2012
Paolo avalle discovery chemistry congress2012Paolo avalle discovery chemistry congress2012
Paolo avalle discovery chemistry congress2012Paolo Avalle
 
Percona tool kit for MySQL DBA's
Percona tool kit for MySQL DBA'sPercona tool kit for MySQL DBA's
Percona tool kit for MySQL DBA'sKarthik .P.R
 
Make great tutorial and product videos
Make great tutorial and product videosMake great tutorial and product videos
Make great tutorial and product videosalledia
 
WordPress Multisite: Desenvolvendo Portais com Sites Interligados.
WordPress Multisite: Desenvolvendo Portais com Sites Interligados.WordPress Multisite: Desenvolvendo Portais com Sites Interligados.
WordPress Multisite: Desenvolvendo Portais com Sites Interligados.Nícholas André
 

En vedette (7)

WordPress Multisite: O que são, onde vivem, do que se alimentam?
WordPress Multisite: O que são, onde vivem, do que se alimentam?WordPress Multisite: O que são, onde vivem, do que se alimentam?
WordPress Multisite: O que são, onde vivem, do que se alimentam?
 
High performance WordPress
High performance WordPressHigh performance WordPress
High performance WordPress
 
Paolo avalle discovery chemistry congress2012
Paolo avalle discovery chemistry congress2012Paolo avalle discovery chemistry congress2012
Paolo avalle discovery chemistry congress2012
 
Percona tool kit for MySQL DBA's
Percona tool kit for MySQL DBA'sPercona tool kit for MySQL DBA's
Percona tool kit for MySQL DBA's
 
Mysql Administracion
Mysql AdministracionMysql Administracion
Mysql Administracion
 
Make great tutorial and product videos
Make great tutorial and product videosMake great tutorial and product videos
Make great tutorial and product videos
 
WordPress Multisite: Desenvolvendo Portais com Sites Interligados.
WordPress Multisite: Desenvolvendo Portais com Sites Interligados.WordPress Multisite: Desenvolvendo Portais com Sites Interligados.
WordPress Multisite: Desenvolvendo Portais com Sites Interligados.
 

Similaire à HyperDB, MySQL Performance, & Flavors of MySQL

Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsTaylor Lovett
 
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
 
5 Common Mistakes You are Making on your Website
 5 Common Mistakes You are Making on your Website 5 Common Mistakes You are Making on your Website
5 Common Mistakes You are Making on your WebsiteAcquia
 
Best practices-wordpress-enterprise
Best practices-wordpress-enterpriseBest practices-wordpress-enterprise
Best practices-wordpress-enterpriseTaylor Lovett
 
How Not to Be Conned by Your Drupal Vendor!
How Not to Be Conned by Your Drupal Vendor!How Not to Be Conned by Your Drupal Vendor!
How Not to Be Conned by Your Drupal Vendor!pixelonion
 
DrupalCampLA 2014 - Drupal backend performance and scalability
DrupalCampLA 2014 - Drupal backend performance and scalabilityDrupalCampLA 2014 - Drupal backend performance and scalability
DrupalCampLA 2014 - Drupal backend performance and scalabilitycherryhillco
 
Designing your API Server for mobile apps
Designing your API Server for mobile appsDesigning your API Server for mobile apps
Designing your API Server for mobile appsMugunth Kumar
 
My site is slow
My site is slowMy site is slow
My site is slowhernanibf
 
Best Practices for WordPress
Best Practices for WordPressBest Practices for WordPress
Best Practices for WordPressTaylor Lovett
 
Best Practices for WordPress in Enterprise
Best Practices for WordPress in EnterpriseBest Practices for WordPress in Enterprise
Best Practices for WordPress in EnterpriseTaylor Lovett
 
Picnic Software - Developing a flexible and scalable application
Picnic Software - Developing a flexible and scalable applicationPicnic Software - Developing a flexible and scalable application
Picnic Software - Developing a flexible and scalable applicationNick Josevski
 
Custom coded projects
Custom coded projectsCustom coded projects
Custom coded projectsMarko Heijnen
 
Big Data Strategy for the Relational World
Big Data Strategy for the Relational World Big Data Strategy for the Relational World
Big Data Strategy for the Relational World Andrew Brust
 
12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQLKonstantin Gredeskoul
 
High Performance Drupal
High Performance DrupalHigh Performance Drupal
High Performance DrupalChapter Three
 
BTV PHP - Building Fast Websites
BTV PHP - Building Fast WebsitesBTV PHP - Building Fast Websites
BTV PHP - Building Fast WebsitesJonathan Klein
 
11 Amazing things I Learnt At Word Camp Sydney 2014
11 Amazing things I Learnt At Word Camp Sydney 201411 Amazing things I Learnt At Word Camp Sydney 2014
11 Amazing things I Learnt At Word Camp Sydney 2014WordPressBrisbane
 
Untangling spring week1
Untangling spring week1Untangling spring week1
Untangling spring week1Derek Jacoby
 

Similaire à HyperDB, MySQL Performance, & Flavors of MySQL (20)

Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress Applications
 
Top ten-list
Top ten-listTop ten-list
Top ten-list
 
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
 
5 Common Mistakes You are Making on your Website
 5 Common Mistakes You are Making on your Website 5 Common Mistakes You are Making on your Website
5 Common Mistakes You are Making on your Website
 
Best practices-wordpress-enterprise
Best practices-wordpress-enterpriseBest practices-wordpress-enterprise
Best practices-wordpress-enterprise
 
How Not to Be Conned by Your Drupal Vendor!
How Not to Be Conned by Your Drupal Vendor!How Not to Be Conned by Your Drupal Vendor!
How Not to Be Conned by Your Drupal Vendor!
 
DrupalCampLA 2014 - Drupal backend performance and scalability
DrupalCampLA 2014 - Drupal backend performance and scalabilityDrupalCampLA 2014 - Drupal backend performance and scalability
DrupalCampLA 2014 - Drupal backend performance and scalability
 
Designing your API Server for mobile apps
Designing your API Server for mobile appsDesigning your API Server for mobile apps
Designing your API Server for mobile apps
 
My site is slow
My site is slowMy site is slow
My site is slow
 
Best Practices for WordPress
Best Practices for WordPressBest Practices for WordPress
Best Practices for WordPress
 
Best Practices for WordPress in Enterprise
Best Practices for WordPress in EnterpriseBest Practices for WordPress in Enterprise
Best Practices for WordPress in Enterprise
 
Picnic Software - Developing a flexible and scalable application
Picnic Software - Developing a flexible and scalable applicationPicnic Software - Developing a flexible and scalable application
Picnic Software - Developing a flexible and scalable application
 
Custom coded projects
Custom coded projectsCustom coded projects
Custom coded projects
 
Big Data Strategy for the Relational World
Big Data Strategy for the Relational World Big Data Strategy for the Relational World
Big Data Strategy for the Relational World
 
12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL
 
&lt;?php + WordPress
&lt;?php + WordPress&lt;?php + WordPress
&lt;?php + WordPress
 
High Performance Drupal
High Performance DrupalHigh Performance Drupal
High Performance Drupal
 
BTV PHP - Building Fast Websites
BTV PHP - Building Fast WebsitesBTV PHP - Building Fast Websites
BTV PHP - Building Fast Websites
 
11 Amazing things I Learnt At Word Camp Sydney 2014
11 Amazing things I Learnt At Word Camp Sydney 201411 Amazing things I Learnt At Word Camp Sydney 2014
11 Amazing things I Learnt At Word Camp Sydney 2014
 
Untangling spring week1
Untangling spring week1Untangling spring week1
Untangling spring week1
 

Dernier

Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...masabamasaba
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile EnvironmentVictorSzoltysek
 

Dernier (20)

Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
 

HyperDB, MySQL Performance, & Flavors of MySQL

  • 1. Anthropomorphic Design Making a Better WordPress with Jazz Hands + =
  • 3. HyperDB, MySQL Performance, & Flavors of MySQL Evan Volgas
  • 4. About me • 10 years working with data — as an analyst, a DBA, etc • Currently a data engineer for WhatRunsWhere • Data Engineer = DBA + Map Reduce + PTSD from Apache Zookeeper • Worked with WordPress off/on for about ~5 years
  • 5. Disclaimers I believe • Google exists • You can use it • You don’t enjoy reading a bunch of code and config files in a presentation any more than I do • WordCamp needs more cowbell
  • 6. What is HyberDB? • “Very advanced database class” • Powers WordPress.com • Supports replication, partitioning, load balancing, etc
  • 7. “Very advanced database class” find 'hyperdb/' -name '*.php' | xargs wc -l • HyperDB: 1,401 lines of PHP • WordPress: 255,961 lines of PHP • Hello Dolly: 81 lines of PHP • Yoast’s Google Analytics 16,174 lines of PHP
  • 8. Why’d you have to go and make things so complicated • The complexity of HyperDB has nothing to do with the PHP code itself • Implementing HyperDB itself is mostly configuration • To the extent that HyperDB is advanced, it’s because MySQL has a lot of advanced stuff going on underneath the hood
  • 9. Who cares about MySQL? An argument from fellow WordCamp ATL presenter Tom McFarlin* • Employers haven’t fully figured out what WordPress *can* do • WordPress makes it easy to be a software implementer as opposed to a software developer so in a lot of cases salaries probably should be lower • The WordPress community itself hasn’t educated employers, customers, or software implementors how classical software development / engineering can fit into the WordPress ecosystem *https://tommcfarlin.com/wordpress-developer- salary/
  • 10. Tell me again why this matters • We don’t need any more social media icons plugin • Many of the things that are really pushing the WordPress envelope are VERY database intensive and their performance needs are poorly understood • There are a million things you can (and should) do to optimize your WordPress website. When those stop being enough, it’d be a good idea to know some DB basics
  • 11. HyperDB • For practical extents and purposes, it’s kind of like a giant wp-config.php that pertains to your database • A lot of great resources for setting it up. If you decide you want to try it, make sure you check out https://www.digitalocean.com/community/tutorials/how-to-optimize-wordpress- performance-with-mysql-replication-on-ubuntu-14-04 http://wpguru.co.uk/2010/07/testing-hyperdb/ http://codertalks.com/configuring-hyperdb-to-use-multiple-databases-for-buddypress- multisite/
  • 12. MySQL Lingo + Discussion • Replication • Statement vs Row-based • Master vs Slave • Partitioning • Tends to either really help or really hurt you — very little in between • NB: One of the reasons NoSQL has market adoption is because this is very painful • Latency matters: https://gist.github.com/jboner/2841832 • Failover • Load Balancing • DB: HyperDB • Web app: HA Proxy, Nginx, etc
  • 13. MySQL Performance Basics • innodb_buffer_pool_size: 70-80% of memory is common • innodb_buffer_pool_instances: if you have a lot of memory, you might run into bottlenecks where multiple threads are trying to access the buffer pool. Splitting it up into multiple buffer pools can help • innodb_file_per_table: if you are using < MySQL 5.6, turn this on. Trust me. • max_connections: if you ever think you need to tweak this, double check that your connections are terminating properly • log_bin: your master nodes needs this • slow-query-log, slow-query-log-file, long_query_time: log your slow queries. Don’t go crazy, but periodically log everything and analyze it
  • 14. MySQL Best Practices Monitor everything • New Relic, Datadog, Zabbix, graphite/statsd/collectd • http://www.percona.com/live/mysql-conference- 2013/sites/default/files/slides/percona-live-santa-clara-2013-presentation- spilgames-mysql-statsd.pdf <— Interesting idea Analyze your queries • pt-query-digest, mysqldumpslow, plugins for third party monitoring Learn how to reason about the Query Execution Plan • http://www.sitepoint.com/using-explain-to-write-better-mysql-queries/ Schedule DB maintenance
  • 15. Flavors of MySQL • MySQL • MariaDB • https://mariadb.com/blog/how-install-and-run- wordpress-mariadb • Percona: • https://www.digitalocean.com/community/tutorials/ho w-to-install-a-fresh-percona-server-or-replace-mysql
  • 16. Special Mention Percona Toolkit • http://www.percona.com/doc/percona-toolkit/2.2/ pt-query-digest --since '2014-11-01' --filter '$event->{arg} =~ m/^select/i' /var/log/mysql/slow-query.log > /tmp/pt_slow_since_nov2014 Nginx + PHP-FPM • http://www.raspipress.com/2014/06/tutorial-install-wordpress-on-a- raspberry-pi-using-nginx/ Learn from people within WordPress and from outside of it • good example: https://roots.io/twelve-factor-wordpress/