SlideShare a Scribd company logo
1 of 15
Download to read offline
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

More Related Content

What's hot

Introduction to Threat Detection and Remediation on AWS
Introduction to Threat Detection and Remediation on AWSIntroduction to Threat Detection and Remediation on AWS
Introduction to Threat Detection and Remediation on AWSAmazon Web Services
 
Introduction to Modern Identity with Auth0's Developer
 Introduction to Modern Identity with Auth0's Developer Introduction to Modern Identity with Auth0's Developer
Introduction to Modern Identity with Auth0's DeveloperProduct School
 
The fundamentals of AWS cloud security - FND209-R - AWS re:Inforce 2019
The fundamentals of AWS cloud security - FND209-R - AWS re:Inforce 2019 The fundamentals of AWS cloud security - FND209-R - AWS re:Inforce 2019
The fundamentals of AWS cloud security - FND209-R - AWS re:Inforce 2019 Amazon Web Services
 
Migrate to the Latest WSO2 Micro Integrator to Unlock All-new Features
Migrate to the Latest WSO2 Micro Integrator to Unlock All-new FeaturesMigrate to the Latest WSO2 Micro Integrator to Unlock All-new Features
Migrate to the Latest WSO2 Micro Integrator to Unlock All-new FeaturesWSO2
 
AWS Networking Fundamentals - SVC304 - Anaheim AWS Summit
AWS Networking Fundamentals - SVC304 - Anaheim AWS SummitAWS Networking Fundamentals - SVC304 - Anaheim AWS Summit
AWS Networking Fundamentals - SVC304 - Anaheim AWS SummitAmazon Web Services
 
Azure fundamental -Introduction
Azure fundamental -IntroductionAzure fundamental -Introduction
Azure fundamental -IntroductionManishK55
 
Amazon EFS (Elastic File System) 이해하고사용하기
Amazon EFS (Elastic File System) 이해하고사용하기Amazon EFS (Elastic File System) 이해하고사용하기
Amazon EFS (Elastic File System) 이해하고사용하기Amazon Web Services Korea
 
Enforcing security invariants with AWS Organizations - SDD314 - AWS re:Inforc...
Enforcing security invariants with AWS Organizations - SDD314 - AWS re:Inforc...Enforcing security invariants with AWS Organizations - SDD314 - AWS re:Inforc...
Enforcing security invariants with AWS Organizations - SDD314 - AWS re:Inforc...Amazon Web Services
 
DerbyCon 8 - Attacking Azure Environments with PowerShell
DerbyCon 8 - Attacking Azure Environments with PowerShellDerbyCon 8 - Attacking Azure Environments with PowerShell
DerbyCon 8 - Attacking Azure Environments with PowerShellKarl Fosaaen
 
Securing APIs for ultimate security and privacy with Azure | Codit Webinar
Securing APIs for ultimate security and privacy with Azure | Codit WebinarSecuring APIs for ultimate security and privacy with Azure | Codit Webinar
Securing APIs for ultimate security and privacy with Azure | Codit WebinarCodit
 
Secure Spring Boot Microservices with Keycloak
Secure Spring Boot Microservices with KeycloakSecure Spring Boot Microservices with Keycloak
Secure Spring Boot Microservices with KeycloakRed Hat Developers
 
2019 FIDO Tokyo Seminar - LINE PayへのFIDO2実装
2019 FIDO Tokyo Seminar - LINE PayへのFIDO2実装2019 FIDO Tokyo Seminar - LINE PayへのFIDO2実装
2019 FIDO Tokyo Seminar - LINE PayへのFIDO2実装FIDO Alliance
 
Introduction to Vault
Introduction to VaultIntroduction to Vault
Introduction to VaultKnoldus Inc.
 
AWS Connectivity, VPC Design and Security Pro Tips
AWS Connectivity, VPC Design and Security Pro TipsAWS Connectivity, VPC Design and Security Pro Tips
AWS Connectivity, VPC Design and Security Pro TipsShiva Narayanaswamy
 

What's hot (20)

Fundamentals of AWS Security
Fundamentals of AWS SecurityFundamentals of AWS Security
Fundamentals of AWS Security
 
Introduction to Threat Detection and Remediation on AWS
Introduction to Threat Detection and Remediation on AWSIntroduction to Threat Detection and Remediation on AWS
Introduction to Threat Detection and Remediation on AWS
 
Introduction to Modern Identity with Auth0's Developer
 Introduction to Modern Identity with Auth0's Developer Introduction to Modern Identity with Auth0's Developer
Introduction to Modern Identity with Auth0's Developer
 
The fundamentals of AWS cloud security - FND209-R - AWS re:Inforce 2019
The fundamentals of AWS cloud security - FND209-R - AWS re:Inforce 2019 The fundamentals of AWS cloud security - FND209-R - AWS re:Inforce 2019
The fundamentals of AWS cloud security - FND209-R - AWS re:Inforce 2019
 
Migrate to the Latest WSO2 Micro Integrator to Unlock All-new Features
Migrate to the Latest WSO2 Micro Integrator to Unlock All-new FeaturesMigrate to the Latest WSO2 Micro Integrator to Unlock All-new Features
Migrate to the Latest WSO2 Micro Integrator to Unlock All-new Features
 
AWS Networking Fundamentals - SVC304 - Anaheim AWS Summit
AWS Networking Fundamentals - SVC304 - Anaheim AWS SummitAWS Networking Fundamentals - SVC304 - Anaheim AWS Summit
AWS Networking Fundamentals - SVC304 - Anaheim AWS Summit
 
Azure fundamental -Introduction
Azure fundamental -IntroductionAzure fundamental -Introduction
Azure fundamental -Introduction
 
Amazon EFS (Elastic File System) 이해하고사용하기
Amazon EFS (Elastic File System) 이해하고사용하기Amazon EFS (Elastic File System) 이해하고사용하기
Amazon EFS (Elastic File System) 이해하고사용하기
 
AWS WAF
AWS WAFAWS WAF
AWS WAF
 
AWS Secrets Manager
AWS Secrets ManagerAWS Secrets Manager
AWS Secrets Manager
 
Enforcing security invariants with AWS Organizations - SDD314 - AWS re:Inforc...
Enforcing security invariants with AWS Organizations - SDD314 - AWS re:Inforc...Enforcing security invariants with AWS Organizations - SDD314 - AWS re:Inforc...
Enforcing security invariants with AWS Organizations - SDD314 - AWS re:Inforc...
 
DerbyCon 8 - Attacking Azure Environments with PowerShell
DerbyCon 8 - Attacking Azure Environments with PowerShellDerbyCon 8 - Attacking Azure Environments with PowerShell
DerbyCon 8 - Attacking Azure Environments with PowerShell
 
How to Send IDOC to SAP using MuleSoft
How to Send IDOC to SAP using MuleSoftHow to Send IDOC to SAP using MuleSoft
How to Send IDOC to SAP using MuleSoft
 
Securing APIs for ultimate security and privacy with Azure | Codit Webinar
Securing APIs for ultimate security and privacy with Azure | Codit WebinarSecuring APIs for ultimate security and privacy with Azure | Codit Webinar
Securing APIs for ultimate security and privacy with Azure | Codit Webinar
 
Secure Spring Boot Microservices with Keycloak
Secure Spring Boot Microservices with KeycloakSecure Spring Boot Microservices with Keycloak
Secure Spring Boot Microservices with Keycloak
 
2019 FIDO Tokyo Seminar - LINE PayへのFIDO2実装
2019 FIDO Tokyo Seminar - LINE PayへのFIDO2実装2019 FIDO Tokyo Seminar - LINE PayへのFIDO2実装
2019 FIDO Tokyo Seminar - LINE PayへのFIDO2実装
 
SSO introduction
SSO introductionSSO introduction
SSO introduction
 
Hashicorp Vault ppt
Hashicorp Vault pptHashicorp Vault ppt
Hashicorp Vault ppt
 
Introduction to Vault
Introduction to VaultIntroduction to Vault
Introduction to Vault
 
AWS Connectivity, VPC Design and Security Pro Tips
AWS Connectivity, VPC Design and Security Pro TipsAWS Connectivity, VPC Design and Security Pro Tips
AWS Connectivity, VPC Design and Security Pro Tips
 

Viewers also liked

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
 

Viewers also liked (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 to 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 to 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
 

Recently uploaded

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
[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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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
 
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
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
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
 
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
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 

Recently uploaded (20)

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
[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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In 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
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
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
 
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
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

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