HyperDB and High Performance WordPress PLUS
by Patrick Havens
Barry a large race fan, thought of an indy car first off when thinking of his topic.
The Problem
Serve as many users as possible with a reasonable amount of resources.
Un-tuned LAMP Stack
- Linux Apache 2, PHP4 or 5, MySQL 4. or 5.0
- 8 requests/sec
- 691,2000 pageviews/day
- Enough for > 99% WP installations
Alternative PHP cache (APC)
- http://pecl.php.net/package/APC
- 12 requests/second
- 1,036,800 pageviews/day
- 50% performance increase
WP-Cache
- http://mnm.uib.es/gallir/wp-cache-2/
- 300 requests/sec
- 25,920,000 pageviews/day
- 25x increase!!!!
- possible gotcha - http://markjaquith.wordpress.com/2006/02/13/adventures-with-wp-cache2-apc/
Apache Alternative
- High Concurrency
- Majority (90%) of requests on a page are static
- Litespeed, lighttpd, apache + fcgi, proxy
PHP 5 - Just for fun
- Same as PHP 4 without APC
- Same as PHP 4 with APC 3.0.14
- Using APC from CVS, PHP5 is 15% faster than PHP4
When one isn’t enough
- Move the database to a second server (or 50)
- HyperDB (New database class that Matt will be talking about)
- Load Balancing
SlideShow is up
—-
Matt comes up.
Before they went public with WordPress.com he knew he’d need to shared the user data.
- So he pre-devided the user data 3,496 databases.
- Some table where global and some where local, so partition them so they didn’t need to be all in one place. ie. posts on one tale, and comments on another and so forth.
Ames developed a database that partitions as you need too.
He then switched into high speed, and it was something about reads… and lost me.
It looks at the table array, and looks at the type it is.
He then went through the config and showed how simple it ws. How it works of the DHCP, so it just looked at the queries, plus it tacks it so you can see i there are issues, where it is.
—
Load Balancing
- hardware of software?
- pound http://www.apsis.ch/pound/
- thousands of requests/sec
- Layer 7
Caching
- Memcache http://www.danga.com/memcached/
- Varnish http://varnish.linpro.no
- WP-Cache Alternatives (not MU aware… so looking at re-writing it)
WordPress.com
- Over 1.2 million blogs
- 10+ million pageviews/day (dynamic)
- 40+ million hits/day (static + ynamic)
- 7,000+ database queries/second
- 80,000+ memcache calls/day
- stats URL
—–
Q&A
In HyperDB you can specify arbtrary tables
Why use APC verses WP-Cache. they are completely different. Op-code only use for the APC cache.
Check plugins. Some queries they do, will cause very slow page loads. Work with a large dataset when testing the plugin.
What profiling tool they used… Barry wrote a recent post -> http://barry.wordpress.com/2007/07/18/keeping-track-of-300-servers/
And Apache Bench for the server benchmarks.
Will be trying to be getting rid of nfs, Barry’s nemesis.
Dealing with Digg - WP-Cache is very important. Disable non-essential
Apache is generally the largest issue. Techcrunch had to switch to lighhttpd.
Another good strategy would be manually making a cache.
—-
Hot Swap to Jeremy Zilarof the NY Times
Creating tons of blogs for them.
100+ and growing
30-40 blogs activly being writen
1 template used throughout
He’s a one man show, but recently added some extra people.
Currently a frankenblog.
They run on 1 install of Wordpress 2.0.5
500 Blog users, 3-8 writers, 10-12 new blogs in the next moonth.
We are teachers?
How many have had to show someone how to use WordPress.
How many have written a How To to teach someone.
Make sure they feel comfortable using it.
Blogs are a means to teach ourselves how to communicate
Are you listening?
Have you ever had a comment correcting a typo? Correcting it lets them know you are listening.
New Plugin coming out? Comment of the Moment? It brings inter-action.
—-
John Pozadzides of One Man Blog has posted this video of the session.
July 24th, 2007 at 6:56 pm
[...] first presentation was HyperDB and High Performance WordPress. But in reality Barry went through a lot of trouble to run some numbers. Numbers showing how even [...]