SlideShare una empresa de Scribd logo
1 de 15
Descargar para leer sin conexión
HIGH PERFORMANCE
                 WordPress
                  Iliya Polihronov
                  WordCamp San Francisco 2012

Saturday, August 4, 12
Iliya
       Polihronov
       Systems Wrangler
       Automattic




       polihronov.wordpress.com
       slideshare.net/vnsavage
                @vnsavage

Saturday, August 4, 12
WordPress.com
            Numbers

             ‣ 115 million pageviews per day

             ‣ 2.6 billion requests per day

             ‣ over 200 plugins

             ‣ 500ms per page


Saturday, August 4, 12
Notable Users




Saturday, August 4, 12
Services Installation
            Nginx                   wiki.nginx.org/Install

            PHP-FPM                 Compile PHP with --enable-fpm

            For Debian Squeeze
            $ gpg --keyserver   hkp://keys.gnupg.net --recv-keys E9C74FEEA2098A6E
            $ gpg --keyserver   hkp://keys.gnupg.net --recv-keys ABF5BD827BD9BF62
            $ gpg -a --export E9C74FEEA2098A6E | apt-key add -
            $ gpg -a --export ABF5BD827BD9BF62 | apt-key add -
            $ echo 'deb http://nginx.org/packages/debian/ squeeze nginx' >> /etc/apt/sources.list
            $ echo 'deb http://packages.dotdeb.org squeeze-php54 all' >> /etc/apt/sources.list
            $ apt-get update
            $ apt-get install nginx php5-cli php5-fpm php5-cgi php5-mysql php5-memcache




Saturday, August 4, 12
Services Installation
            APC                php.net/manual/en/apc.installation.php


            MySQL              percona.com/doc/percona-server/5.5/installation.html


            Memcached                   memcached.org


            For Debian Squeeze
            $ gpg --keyserver   hkp://keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A
            $ gpg -a --export CD2EFD2A | apt-key add -
            $ echo ‘deb http://repo.percona.com/apt squeeze main’ >> /etc/apt/sources.list
            $ apt-get update
            $ apt-get install php5-apc memcached percona-server-server-5.5 percona-server-client-5.5




Saturday, August 4, 12
Nginx Configuration
            /etc/nginx/nginx.conf

            worker_processes 8;
            worker_connections 2048;
            keepalive_timeout 30;

            gzip on;
            gzip_types text/css text/javascript application/x-javascript application/json text/xml;
            gzip_min_length 500;
            gzip_comp_level 5;

            location ~ .(css|js|jp(e)?g|gif|png|swf|ico)$   {
               expires 1y;
            }

            fastcgi_buffer_size 32k;
            fastcgi_buffers 256 4k;

            /etc/init.d/nginx

            ulimit -n 65536

            Full configuration at polihronov.wordpress.com


Saturday, August 4, 12
PHP-FPM and APC
            /etc/php5/fpm/pool.d/www.conf

            pm = dynamic
            pm.max_children = 40
            pm.start_servers = 5
            pm.min_spare_servers = 5
            pm.max_spare_servers = 10
            listen.backlog = 512

            /etc/php5/conf.d/20-apc.ini

            extension="apc.so"
            apc.enabled = 1
            apc.shm_size = 32M

            /etc/php5/fpm/php.ini

            output_buffering = 4096




Saturday, August 4, 12
MySQL Configuration
            /etc/mysql/my.cnf

            key_buffer = 256M
            sort_buffer_size = 4M
            read_buffer_size = 4M
            innodb_buffer_pool_size = 256M
            innodb_log_buffer_size = 8M

            tmp_table_size = 32M
            max_heap_table_size = 32M

            table_cache = 128
            thread_cache = 64

            query_cache_type = 1
            query_cache_limit = 1M
            query_cache_size = 32M

            InnoDB - for tables with lots of reads and writes
            mysqlreport - inspect important MySQL status values




Saturday, August 4, 12
Optimizing your
            WordPress Install

            ‣ Keep it up to date

            ‣ Avoid unnecessary plugins

            ‣ Avoid slow plugins
                  http://wordpress.org/extend/plugins/p3-profiler



Saturday, August 4, 12
Caching

            Memcached Object Cache
            http://wordpress.org/extend/plugins/memcached/




            WP Super Cache
            http://wordpress.org/extend/plugins/wp-super-cache/

            ‣ Custom permalinks, like /%year/%monthnum%/%postname%/
            ‣ Enable all the recommended settings



Saturday, August 4, 12
Benchmarks
            Virtual machine on a laptop, using Apache Benchmark (ab):


            Without APC

               11.07 REQUESTS/SEC

            With APC

                 48.39 REQUESTS/SEC

            With APC and Caching

                                                16,140.70 REQUESTS/SEC


Saturday, August 4, 12
At a Larger Scale

                         INTERNET

                                                  Load Balancers




                                    Web Servers   Caching Servers   Web Servers




                                     Memcached
                                                        Master-Slave MySQL

Saturday, August 4, 12
Questions?
                         HIGH PERFORMANCE
                         WordPress

Saturday, August 4, 12
Iliya
       Polihronov
       Systems Wrangler
       Automattic




       polihronov.wordpress.com
       slideshare.net/vnsavage
                @vnsavage

Saturday, August 4, 12

Más contenido relacionado

La actualidad más candente

Eliminating Secret Sprawl in the Cloud with HashiCorp Vault - 07.11.2018
Eliminating Secret Sprawl in the Cloud with HashiCorp Vault - 07.11.2018Eliminating Secret Sprawl in the Cloud with HashiCorp Vault - 07.11.2018
Eliminating Secret Sprawl in the Cloud with HashiCorp Vault - 07.11.2018HashiCorp
 
Kubernetes Secrets Management on Production with Demo
Kubernetes Secrets Management on Production with DemoKubernetes Secrets Management on Production with Demo
Kubernetes Secrets Management on Production with DemoOpsta
 
Security for oauth 2.0 - @topavankumarj
Security for oauth 2.0 - @topavankumarjSecurity for oauth 2.0 - @topavankumarj
Security for oauth 2.0 - @topavankumarjPavan Kumar J
 
Uncover the Flex Gateway with a Demonstration (1).pdf
Uncover the Flex Gateway with a Demonstration (1).pdfUncover the Flex Gateway with a Demonstration (1).pdf
Uncover the Flex Gateway with a Demonstration (1).pdfPankajGoyal164048
 
Managing secrets at scale
Managing secrets at scaleManaging secrets at scale
Managing secrets at scaleAlex Schoof
 
XXE Exposed: SQLi, XSS, XXE and XEE against Web Services
XXE Exposed: SQLi, XSS, XXE and XEE against Web ServicesXXE Exposed: SQLi, XSS, XXE and XEE against Web Services
XXE Exposed: SQLi, XSS, XXE and XEE against Web ServicesAbraham Aranguren
 
Api gateway
Api gatewayApi gateway
Api gatewayenyert
 
Fido Technical Overview
Fido Technical OverviewFido Technical Overview
Fido Technical OverviewFIDO Alliance
 
API Security Best Practices and Guidelines
API Security Best Practices and GuidelinesAPI Security Best Practices and Guidelines
API Security Best Practices and GuidelinesWSO2
 
Neil Saunders (Beamly) - Securing your AWS Infrastructure with Hashicorp Vault
Neil Saunders (Beamly) - Securing your AWS Infrastructure with Hashicorp Vault Neil Saunders (Beamly) - Securing your AWS Infrastructure with Hashicorp Vault
Neil Saunders (Beamly) - Securing your AWS Infrastructure with Hashicorp Vault Outlyer
 
SIngle Sign On with Keycloak
SIngle Sign On with KeycloakSIngle Sign On with Keycloak
SIngle Sign On with KeycloakJulien Pivotto
 
OWASP AppSecCali 2015 - Marshalling Pickles
OWASP AppSecCali 2015 - Marshalling PicklesOWASP AppSecCali 2015 - Marshalling Pickles
OWASP AppSecCali 2015 - Marshalling PicklesChristopher Frohoff
 
API Security Best Practices & Guidelines
API Security Best Practices & GuidelinesAPI Security Best Practices & Guidelines
API Security Best Practices & GuidelinesPrabath Siriwardena
 
How to create a User Defined Policy with IBM APIc (v10)
How to create a User Defined Policy with IBM APIc (v10)How to create a User Defined Policy with IBM APIc (v10)
How to create a User Defined Policy with IBM APIc (v10)Shiu-Fun Poon
 
Credential store using HashiCorp Vault
Credential store using HashiCorp VaultCredential store using HashiCorp Vault
Credential store using HashiCorp VaultMayank Patel
 
API Security : Patterns and Practices
API Security : Patterns and PracticesAPI Security : Patterns and Practices
API Security : Patterns and PracticesPrabath Siriwardena
 

La actualidad más candente (20)

Eliminating Secret Sprawl in the Cloud with HashiCorp Vault - 07.11.2018
Eliminating Secret Sprawl in the Cloud with HashiCorp Vault - 07.11.2018Eliminating Secret Sprawl in the Cloud with HashiCorp Vault - 07.11.2018
Eliminating Secret Sprawl in the Cloud with HashiCorp Vault - 07.11.2018
 
Kubernetes Secrets Management on Production with Demo
Kubernetes Secrets Management on Production with DemoKubernetes Secrets Management on Production with Demo
Kubernetes Secrets Management on Production with Demo
 
Security for oauth 2.0 - @topavankumarj
Security for oauth 2.0 - @topavankumarjSecurity for oauth 2.0 - @topavankumarj
Security for oauth 2.0 - @topavankumarj
 
Uncover the Flex Gateway with a Demonstration (1).pdf
Uncover the Flex Gateway with a Demonstration (1).pdfUncover the Flex Gateway with a Demonstration (1).pdf
Uncover the Flex Gateway with a Demonstration (1).pdf
 
Managing secrets at scale
Managing secrets at scaleManaging secrets at scale
Managing secrets at scale
 
XXE Exposed: SQLi, XSS, XXE and XEE against Web Services
XXE Exposed: SQLi, XSS, XXE and XEE against Web ServicesXXE Exposed: SQLi, XSS, XXE and XEE against Web Services
XXE Exposed: SQLi, XSS, XXE and XEE against Web Services
 
Api gateway
Api gatewayApi gateway
Api gateway
 
Fido Technical Overview
Fido Technical OverviewFido Technical Overview
Fido Technical Overview
 
HashiCorp's Vault - The Examples
HashiCorp's Vault - The ExamplesHashiCorp's Vault - The Examples
HashiCorp's Vault - The Examples
 
API Security Best Practices and Guidelines
API Security Best Practices and GuidelinesAPI Security Best Practices and Guidelines
API Security Best Practices and Guidelines
 
Vault 101
Vault 101Vault 101
Vault 101
 
OAuth 2.0
OAuth 2.0OAuth 2.0
OAuth 2.0
 
Neil Saunders (Beamly) - Securing your AWS Infrastructure with Hashicorp Vault
Neil Saunders (Beamly) - Securing your AWS Infrastructure with Hashicorp Vault Neil Saunders (Beamly) - Securing your AWS Infrastructure with Hashicorp Vault
Neil Saunders (Beamly) - Securing your AWS Infrastructure with Hashicorp Vault
 
SIngle Sign On with Keycloak
SIngle Sign On with KeycloakSIngle Sign On with Keycloak
SIngle Sign On with Keycloak
 
OWASP AppSecCali 2015 - Marshalling Pickles
OWASP AppSecCali 2015 - Marshalling PicklesOWASP AppSecCali 2015 - Marshalling Pickles
OWASP AppSecCali 2015 - Marshalling Pickles
 
API Security Best Practices & Guidelines
API Security Best Practices & GuidelinesAPI Security Best Practices & Guidelines
API Security Best Practices & Guidelines
 
How to create a User Defined Policy with IBM APIc (v10)
How to create a User Defined Policy with IBM APIc (v10)How to create a User Defined Policy with IBM APIc (v10)
How to create a User Defined Policy with IBM APIc (v10)
 
Kotlin
KotlinKotlin
Kotlin
 
Credential store using HashiCorp Vault
Credential store using HashiCorp VaultCredential store using HashiCorp Vault
Credential store using HashiCorp Vault
 
API Security : Patterns and Practices
API Security : Patterns and PracticesAPI Security : Patterns and Practices
API Security : Patterns and Practices
 

Destacado

WCSF 2012 - All You Can Eat Content Types
WCSF 2012 - All You Can Eat Content TypesWCSF 2012 - All You Can Eat Content Types
WCSF 2012 - All You Can Eat Content TypesScott Clark
 
bbPress - WCSF 2012
bbPress - WCSF 2012bbPress - WCSF 2012
bbPress - WCSF 2012John Jacoby
 
WordPress SEO Revisited by Lou Anne McKeefery of Be Found
WordPress SEO Revisited by Lou Anne McKeefery of Be FoundWordPress SEO Revisited by Lou Anne McKeefery of Be Found
WordPress SEO Revisited by Lou Anne McKeefery of Be FoundEast Bay WordPress Meetup
 
Git Version Control for the Complete N00b by Adam LaBarge
Git Version Control for the Complete N00b by Adam LaBargeGit Version Control for the Complete N00b by Adam LaBarge
Git Version Control for the Complete N00b by Adam LaBargeEast Bay WordPress Meetup
 
WordPress and Business Intelligence
WordPress and Business IntelligenceWordPress and Business Intelligence
WordPress and Business IntelligenceTech Liminal
 
Designing for The Modern Web
Designing for The Modern WebDesigning for The Modern Web
Designing for The Modern WebSara Cannon
 
WordPress State of the Word 2012
WordPress State of the Word 2012WordPress State of the Word 2012
WordPress State of the Word 2012photomatt
 
Nginx & php fpm - the webserver you might actually like - php usergroup berlin
Nginx & php fpm - the webserver you might actually like - php usergroup berlinNginx & php fpm - the webserver you might actually like - php usergroup berlin
Nginx & php fpm - the webserver you might actually like - php usergroup berlinEdorian
 
WordPress for Nonprofits Using CiviCRM
WordPress for Nonprofits Using CiviCRMWordPress for Nonprofits Using CiviCRM
WordPress for Nonprofits Using CiviCRMTadpole Collective
 
PHP conference Berlin 2015: running PHP on Nginx
PHP conference Berlin 2015: running PHP on NginxPHP conference Berlin 2015: running PHP on Nginx
PHP conference Berlin 2015: running PHP on NginxHarald Zeitlhofer
 
Sallie Goetsch: Making the Events Calendar Sit Up and Beg
Sallie Goetsch: Making the Events Calendar Sit Up and BegSallie Goetsch: Making the Events Calendar Sit Up and Beg
Sallie Goetsch: Making the Events Calendar Sit Up and BegEast Bay WordPress Meetup
 
Rob La Gatta; Making the Events Calendar Sit Up and Beg
Rob La Gatta; Making the Events Calendar Sit Up and BegRob La Gatta; Making the Events Calendar Sit Up and Beg
Rob La Gatta; Making the Events Calendar Sit Up and BegEast Bay WordPress Meetup
 
AWS Cloudfront Howto
AWS Cloudfront HowtoAWS Cloudfront Howto
AWS Cloudfront Howtomailbhargav
 
Real Developer Tools for WordPress by Stefan Didak
Real Developer Tools for WordPress by Stefan DidakReal Developer Tools for WordPress by Stefan Didak
Real Developer Tools for WordPress by Stefan DidakEast Bay WordPress Meetup
 

Destacado (20)

WCSF 2012 - All You Can Eat Content Types
WCSF 2012 - All You Can Eat Content TypesWCSF 2012 - All You Can Eat Content Types
WCSF 2012 - All You Can Eat Content Types
 
bbPress - WCSF 2012
bbPress - WCSF 2012bbPress - WCSF 2012
bbPress - WCSF 2012
 
WordPress SEO Revisited by Lou Anne McKeefery of Be Found
WordPress SEO Revisited by Lou Anne McKeefery of Be FoundWordPress SEO Revisited by Lou Anne McKeefery of Be Found
WordPress SEO Revisited by Lou Anne McKeefery of Be Found
 
Git Version Control for the Complete N00b by Adam LaBarge
Git Version Control for the Complete N00b by Adam LaBargeGit Version Control for the Complete N00b by Adam LaBarge
Git Version Control for the Complete N00b by Adam LaBarge
 
WordPress Gallery tutorial
WordPress Gallery tutorialWordPress Gallery tutorial
WordPress Gallery tutorial
 
Is Your (Client's) Website Ready for 2017?
Is Your (Client's) Website Ready for 2017?Is Your (Client's) Website Ready for 2017?
Is Your (Client's) Website Ready for 2017?
 
WordPress and Business Intelligence
WordPress and Business IntelligenceWordPress and Business Intelligence
WordPress and Business Intelligence
 
State of Mobile
State of MobileState of Mobile
State of Mobile
 
Designing for The Modern Web
Designing for The Modern WebDesigning for The Modern Web
Designing for The Modern Web
 
WordPress State of the Word 2012
WordPress State of the Word 2012WordPress State of the Word 2012
WordPress State of the Word 2012
 
Nginx & php fpm - the webserver you might actually like - php usergroup berlin
Nginx & php fpm - the webserver you might actually like - php usergroup berlinNginx & php fpm - the webserver you might actually like - php usergroup berlin
Nginx & php fpm - the webserver you might actually like - php usergroup berlin
 
WordPress for Nonprofits Using CiviCRM
WordPress for Nonprofits Using CiviCRMWordPress for Nonprofits Using CiviCRM
WordPress for Nonprofits Using CiviCRM
 
PHP conference Berlin 2015: running PHP on Nginx
PHP conference Berlin 2015: running PHP on NginxPHP conference Berlin 2015: running PHP on Nginx
PHP conference Berlin 2015: running PHP on Nginx
 
Sallie Goetsch: Making the Events Calendar Sit Up and Beg
Sallie Goetsch: Making the Events Calendar Sit Up and BegSallie Goetsch: Making the Events Calendar Sit Up and Beg
Sallie Goetsch: Making the Events Calendar Sit Up and Beg
 
PhpStorm for WordPress
PhpStorm for WordPressPhpStorm for WordPress
PhpStorm for WordPress
 
Rob La Gatta; Making the Events Calendar Sit Up and Beg
Rob La Gatta; Making the Events Calendar Sit Up and BegRob La Gatta; Making the Events Calendar Sit Up and Beg
Rob La Gatta; Making the Events Calendar Sit Up and Beg
 
WordPress Comments (November Meetup)
WordPress Comments (November Meetup)WordPress Comments (November Meetup)
WordPress Comments (November Meetup)
 
Making WordPress Easier to Use
Making WordPress Easier to UseMaking WordPress Easier to Use
Making WordPress Easier to Use
 
AWS Cloudfront Howto
AWS Cloudfront HowtoAWS Cloudfront Howto
AWS Cloudfront Howto
 
Real Developer Tools for WordPress by Stefan Didak
Real Developer Tools for WordPress by Stefan DidakReal Developer Tools for WordPress by Stefan Didak
Real Developer Tools for WordPress by Stefan Didak
 

Similar a High Performance WordPress Optimization

Award-winning technology: Oxid loves the query cache
Award-winning technology: Oxid loves the query cacheAward-winning technology: Oxid loves the query cache
Award-winning technology: Oxid loves the query cacheUlf Wendel
 
How to install and configure LEMP stack
How to install and configure LEMP stackHow to install and configure LEMP stack
How to install and configure LEMP stackRootGate
 
Site Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariSite Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariJoseph Scott
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalabilityWim Godden
 
Nginx [engine x] and you (and WordPress)
Nginx [engine x] and you (and WordPress)Nginx [engine x] and you (and WordPress)
Nginx [engine x] and you (and WordPress)Justin Foell
 
10 Million hits a day with WordPress using a $15 VPS
10 Million hits a day  with WordPress using a $15 VPS10 Million hits a day  with WordPress using a $15 VPS
10 Million hits a day with WordPress using a $15 VPSPaolo Tonin
 
Sofia WP User Group Presentation
Sofia WP User Group PresentationSofia WP User Group Presentation
Sofia WP User Group PresentationDaniel Kanchev
 
Caching and tuning fun for high scalability @ FOSDEM 2012
Caching and tuning fun for high scalability @ FOSDEM 2012Caching and tuning fun for high scalability @ FOSDEM 2012
Caching and tuning fun for high scalability @ FOSDEM 2012Wim Godden
 
Scale Apache with Nginx
Scale Apache with NginxScale Apache with Nginx
Scale Apache with NginxBud Siddhisena
 
Cache all the things - A guide to caching Drupal
Cache all the things - A guide to caching DrupalCache all the things - A guide to caching Drupal
Cache all the things - A guide to caching Drupaldigital006
 
Web Front End Performance
Web Front End PerformanceWeb Front End Performance
Web Front End PerformanceChris Love
 
PHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the CloudPHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the CloudSalesforce Developers
 
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry PiGrâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry PiJérémy Derussé
 
Website releases made easy with the PEAR installer, OSCON 2009
Website releases made easy with the PEAR installer, OSCON 2009Website releases made easy with the PEAR installer, OSCON 2009
Website releases made easy with the PEAR installer, OSCON 2009Helgi Þormar Þorbjörnsson
 
Converting Your Dev Environment to a Docker Stack - php[world]
Converting Your Dev Environment to a Docker Stack - php[world]Converting Your Dev Environment to a Docker Stack - php[world]
Converting Your Dev Environment to a Docker Stack - php[world]Dana Luther
 
OSCP Preparation Guide @ Infosectrain
OSCP Preparation Guide @ InfosectrainOSCP Preparation Guide @ Infosectrain
OSCP Preparation Guide @ InfosectrainInfosecTrain
 

Similar a High Performance WordPress Optimization (20)

Award-winning technology: Oxid loves the query cache
Award-winning technology: Oxid loves the query cacheAward-winning technology: Oxid loves the query cache
Award-winning technology: Oxid loves the query cache
 
How to install and configure LEMP stack
How to install and configure LEMP stackHow to install and configure LEMP stack
How to install and configure LEMP stack
 
Site Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariSite Performance - From Pinto to Ferrari
Site Performance - From Pinto to Ferrari
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalability
 
Nginx [engine x] and you (and WordPress)
Nginx [engine x] and you (and WordPress)Nginx [engine x] and you (and WordPress)
Nginx [engine x] and you (and WordPress)
 
Scaling WordPress
Scaling WordPressScaling WordPress
Scaling WordPress
 
10 Million hits a day with WordPress using a $15 VPS
10 Million hits a day  with WordPress using a $15 VPS10 Million hits a day  with WordPress using a $15 VPS
10 Million hits a day with WordPress using a $15 VPS
 
Running PHP on nginx
Running PHP on nginxRunning PHP on nginx
Running PHP on nginx
 
Sofia WP User Group Presentation
Sofia WP User Group PresentationSofia WP User Group Presentation
Sofia WP User Group Presentation
 
Caching and tuning fun for high scalability @ FOSDEM 2012
Caching and tuning fun for high scalability @ FOSDEM 2012Caching and tuning fun for high scalability @ FOSDEM 2012
Caching and tuning fun for high scalability @ FOSDEM 2012
 
Scale Apache with Nginx
Scale Apache with NginxScale Apache with Nginx
Scale Apache with Nginx
 
Nginx pres
Nginx presNginx pres
Nginx pres
 
Cache all the things - A guide to caching Drupal
Cache all the things - A guide to caching DrupalCache all the things - A guide to caching Drupal
Cache all the things - A guide to caching Drupal
 
Web Front End Performance
Web Front End PerformanceWeb Front End Performance
Web Front End Performance
 
161208
161208161208
161208
 
PHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the CloudPHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the Cloud
 
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry PiGrâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
 
Website releases made easy with the PEAR installer, OSCON 2009
Website releases made easy with the PEAR installer, OSCON 2009Website releases made easy with the PEAR installer, OSCON 2009
Website releases made easy with the PEAR installer, OSCON 2009
 
Converting Your Dev Environment to a Docker Stack - php[world]
Converting Your Dev Environment to a Docker Stack - php[world]Converting Your Dev Environment to a Docker Stack - php[world]
Converting Your Dev Environment to a Docker Stack - php[world]
 
OSCP Preparation Guide @ Infosectrain
OSCP Preparation Guide @ InfosectrainOSCP Preparation Guide @ Infosectrain
OSCP Preparation Guide @ Infosectrain
 

Último

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
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
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
[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
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
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
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
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
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
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
 

Último (20)

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
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
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
[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
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
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
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.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
 
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...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

High Performance WordPress Optimization

  • 1. HIGH PERFORMANCE WordPress Iliya Polihronov WordCamp San Francisco 2012 Saturday, August 4, 12
  • 2. Iliya Polihronov Systems Wrangler Automattic polihronov.wordpress.com slideshare.net/vnsavage @vnsavage Saturday, August 4, 12
  • 3. WordPress.com Numbers ‣ 115 million pageviews per day ‣ 2.6 billion requests per day ‣ over 200 plugins ‣ 500ms per page Saturday, August 4, 12
  • 5. Services Installation Nginx wiki.nginx.org/Install PHP-FPM Compile PHP with --enable-fpm For Debian Squeeze $ gpg --keyserver hkp://keys.gnupg.net --recv-keys E9C74FEEA2098A6E $ gpg --keyserver hkp://keys.gnupg.net --recv-keys ABF5BD827BD9BF62 $ gpg -a --export E9C74FEEA2098A6E | apt-key add - $ gpg -a --export ABF5BD827BD9BF62 | apt-key add - $ echo 'deb http://nginx.org/packages/debian/ squeeze nginx' >> /etc/apt/sources.list $ echo 'deb http://packages.dotdeb.org squeeze-php54 all' >> /etc/apt/sources.list $ apt-get update $ apt-get install nginx php5-cli php5-fpm php5-cgi php5-mysql php5-memcache Saturday, August 4, 12
  • 6. Services Installation APC php.net/manual/en/apc.installation.php MySQL percona.com/doc/percona-server/5.5/installation.html Memcached memcached.org For Debian Squeeze $ gpg --keyserver hkp://keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A $ gpg -a --export CD2EFD2A | apt-key add - $ echo ‘deb http://repo.percona.com/apt squeeze main’ >> /etc/apt/sources.list $ apt-get update $ apt-get install php5-apc memcached percona-server-server-5.5 percona-server-client-5.5 Saturday, August 4, 12
  • 7. Nginx Configuration /etc/nginx/nginx.conf worker_processes 8; worker_connections 2048; keepalive_timeout 30; gzip on; gzip_types text/css text/javascript application/x-javascript application/json text/xml; gzip_min_length 500; gzip_comp_level 5; location ~ .(css|js|jp(e)?g|gif|png|swf|ico)$ { expires 1y; } fastcgi_buffer_size 32k; fastcgi_buffers 256 4k; /etc/init.d/nginx ulimit -n 65536 Full configuration at polihronov.wordpress.com Saturday, August 4, 12
  • 8. PHP-FPM and APC /etc/php5/fpm/pool.d/www.conf pm = dynamic pm.max_children = 40 pm.start_servers = 5 pm.min_spare_servers = 5 pm.max_spare_servers = 10 listen.backlog = 512 /etc/php5/conf.d/20-apc.ini extension="apc.so" apc.enabled = 1 apc.shm_size = 32M /etc/php5/fpm/php.ini output_buffering = 4096 Saturday, August 4, 12
  • 9. MySQL Configuration /etc/mysql/my.cnf key_buffer = 256M sort_buffer_size = 4M read_buffer_size = 4M innodb_buffer_pool_size = 256M innodb_log_buffer_size = 8M tmp_table_size = 32M max_heap_table_size = 32M table_cache = 128 thread_cache = 64 query_cache_type = 1 query_cache_limit = 1M query_cache_size = 32M InnoDB - for tables with lots of reads and writes mysqlreport - inspect important MySQL status values Saturday, August 4, 12
  • 10. Optimizing your WordPress Install ‣ Keep it up to date ‣ Avoid unnecessary plugins ‣ Avoid slow plugins http://wordpress.org/extend/plugins/p3-profiler Saturday, August 4, 12
  • 11. Caching Memcached Object Cache http://wordpress.org/extend/plugins/memcached/ WP Super Cache http://wordpress.org/extend/plugins/wp-super-cache/ ‣ Custom permalinks, like /%year/%monthnum%/%postname%/ ‣ Enable all the recommended settings Saturday, August 4, 12
  • 12. Benchmarks Virtual machine on a laptop, using Apache Benchmark (ab): Without APC 11.07 REQUESTS/SEC With APC 48.39 REQUESTS/SEC With APC and Caching 16,140.70 REQUESTS/SEC Saturday, August 4, 12
  • 13. At a Larger Scale INTERNET Load Balancers Web Servers Caching Servers Web Servers Memcached Master-Slave MySQL Saturday, August 4, 12
  • 14. Questions? HIGH PERFORMANCE WordPress Saturday, August 4, 12
  • 15. Iliya Polihronov Systems Wrangler Automattic polihronov.wordpress.com slideshare.net/vnsavage @vnsavage Saturday, August 4, 12