Super Affiliate Toolkit for WordPress - Performance Marketing Summit
High Performance Wordpress
-
Upload
gareth-davies -
Category
Technology
-
view
4.954 -
download
0
description
Transcript of High Performance Wordpress
High Performance WordPress
Gareth Davies
Why performance?
•Speed
•so people don’t wait
•Scale
•serve as many requests to as many people as possible, concurrently
LAMP
•A stack
•LAMP
•Linux
•Apache
•MySQL
•PHP
WordPress
•Written in PHP
•Uses MySQL as the database
•Apache/nginx can be used for HTTP
WordPress
•Core (installed)
•Themes
•Plugins
OS Level Tuning
•You’re 64-bit by now
•Log errors, and nothing else
•TCP/IP settings
•Only run services that you need on a server
OS Level Tuning
•Simple firewall to stop bots
•Read log files from logwatch -- hardware dies too
•vmem.sh
•Filesystem - XFS is best, EXT3, EXT4 are OK too
Apache
•Tune Apache (httpd.conf)
•ab & httperf
•MaxClients
•Defaults are usually horrible
MySQL•Defaults are terrible, use my.cnf
•mysqltuner.pl, tuningprimer.sh
•mytop
•Use maatkit + mk-query-digest
• See general & slow query log (for your plugin problems)
• InnoDB is better for concurrency, though by default you’re probably using MyISAM
•mysqlslap for benchmarking
PHP
•Memory settings
•Opcode cache
•XCache, EAccelerator, APC
•php.ini
WordPress
•Plugins are often horribly coded
•Themes can have direct calls to the database
WordPress
•Look at wp_options tables
•Disable plugins
•Try the new Twenty Ten theme
•wp_config.php: WP_HOME, WP_SITEURL
Still struggling?
•Content Delivery Networks (CDN)
•Minify
•Caching
WP Caches
•WP Super Cache
•W3 Total Cache
More you can do
•use mod_proxy and serve static content
•CDN: Amazon S3+CloudFront is affordable
•use browser cache (set long expires)
Separate machines
•2 machines
•web server
•database server
•memcached servers?
Varnish
•Varnish serves everything from memory
•httpd on a different port, run varnish on port 80 and point it to httpd port
Further growth
•Its now time to think about MySQL replication (master-slave setups)
•memcached to keep caches of query results (up to 1M) in memory
•HyperDB supports data partitioning, and can read from multiple databases
WordPress.COM
•several billion HTTP queries per day, billions of MySQL queries too
•HP hardware, all SSD
HipHop from Facebook
•http://huichen.org/en/2010/06/wordpress-3-benchmark/
•http://huichen.org/en/2010/06/wordpress-3-benchmark-part-2/
•~2.7x improvement in performance
Find Me
•@ShaolinTiger on Twitter
•http://www.shaolintiger.com – My Blog
•shaolintiger at gmail – Email me