Ask your questions here
Post your questions here and we will answer as many as we can during the Q&A session. Anything we don’t get to during the session, we will reply to later. You can ask anything.
We can then use this to ask follow-up questions (thanks to threaded comments) and we will then have a permanent record of the which will hopefully then be useful to other folks in the future.
Mark Jaquith 8:30 pm on May 31, 2009 Permalink |
What is the current status of web servers, for serving up WordPress pages? Is Apache 2.x “fast enough,” or does using Lighttpd or Litespeed still give you a significant performance boost?
Barry Abrahamson 8:35 pm on May 31, 2009 Permalink |
Chris says: Don’t use apache if you can help it. Apache + mod_php is rather inefficient in most environments because it loads php for every request even if the request doesn’t require php to process.
Mark Jaquith 8:38 pm on May 31, 2009 Permalink |
That’s what I meant by “serving up WordPress pages” vs serving up media content. So it sounds like if you’re using nginx to split out media and everything else, they’re about the same in a lot of cases.
Barry Abrahamson 9:17 pm on May 31, 2009 Permalink |
For dynamic content, all of them are about the same performance-wise. There are some other advantages to using something like nginx + php-fpm. For example, php-fpm allows you to set some wall-clock timers for php processess (as opposed to cpu-time) at which you can either log and/or kill a php process after a certain amount of time. This is helpful for example, when a php process hangs opening a connection to a remote site. Apache + mod_php can’t do this.
jwriteclub 8:31 pm on May 31, 2009 Permalink |
PHP Code Cache: APC vs ?
Andrew Sutherland 8:35 pm on May 31, 2009 Permalink |
and does it matter what version of APC?
Mark Jaquith 8:41 pm on May 31, 2009 Permalink |
I’ve tried other things, but I always come back to APC.
Casey 8:42 pm on May 31, 2009 Permalink |
Did Barry just say Automattic moved to PHP5?
mdawaffe 8:43 pm on May 31, 2009 Permalink |
Yup.
Christopher O'Connell 8:43 pm on May 31, 2009 Permalink |
Yes, about 6 months ago.
Barry Abrahamson 9:29 pm on May 31, 2009 Permalink |
Everything we do is now running php 5.2 except Gravatar which should be switched over shortly.
Barry Abrahamson 8:43 pm on May 31, 2009 Permalink |
For us, APC has been the best option. We always use the latest (beta) version from the APC site.
fesja 8:34 pm on May 31, 2009 Permalink |
have you looked at other databases that may work better than MySQL when you scale? Couchdb in a future?
Barry Abrahamson 8:47 pm on May 31, 2009 Permalink |
MySQL scales amazingly well if your application is designed correctly (which WordPress is!). We are currently running 250+ MySQL servers with over 70 million tables and haven’t run into any significant scaling issues. A very small % of time on every pageload is spent doing database queries.
Mark Jaquith 8:48 pm on May 31, 2009 Permalink |
Usually less than 10%.
titanas 8:37 pm on May 31, 2009 Permalink |
WordPress caching on steroids: eAccelerator, Batcache and …?
Mark Jaquith 8:47 pm on May 31, 2009 Permalink |
APC, Batcache/Memcache WP object backend, MySQL Query Cache. Then identify bottlenecks and start doing custom Memcache stuff or BatCache mods.
Ben Fremer 8:47 pm on May 31, 2009 Permalink |
Can hyperdb be added to an mu installation while rapid user growth is occuring on the site? (Or must hyperdb be configured from the start?)
Barry Abrahamson 9:06 pm on May 31, 2009 Permalink |
Since HyperDB is a drop in replacement for the standard database class, it can be added at any time. The sharding logic is NOT part of hyperb, but the query distribution code is.
Theo 8:49 pm on May 31, 2009 Permalink |
your thoughts on best practices for keeping and publishing statistics?
Casey 9:05 pm on May 31, 2009 Permalink |
/shameless plug/ bSuite tracks page views to generate popular post lists and “other people who viewed this post also viewed…” http://wordpress.org/extend/plugins/bsuite/
Barry Abrahamson 9:28 pm on May 31, 2009 Permalink |
Web stats:
For WordPress blogs, I think WordPress.com stats is the best option. It is included with every WordPress.com blog and available as a plugin for self-hosted WordPress blogs.
Google Analytics is also a good alternative/compliment (nothing prevents you from using both).
Mint also provides very nice stats but for busy sites has been known to cause some performance issues in the past. Rather than offloading the heavy lifting to other servers like WordPress.com stats or Google, it does all of the work on your server. Apparently some users in the Mint forums have solved these issues, but the changes are not in the official software so you may have to modify some code manually.
Barry Abrahamson 9:33 pm on May 31, 2009 Permalink |
Server stats:
We use Munin with some modifications to allow for the processing of a few hundred servers in under 5 minutes. Others are using Nagios and Cacti.
Casey 8:56 pm on May 31, 2009 Permalink |
MySQL details… how many queries per second? Dare to share your large-scale WP-optimized my.cnf settings?
Barry Abrahamson 9:07 pm on May 31, 2009 Permalink |
I will publish the graphs. There is a plan to make our real-time server graphs public, I just haven’t finished doing that yet.
Lorelle VanFossen 8:57 pm on May 31, 2009 Permalink |
With so many millions on WordPress.com, how are you managing data loss and backups?
Andrew Sutherland 9:11 pm on May 31, 2009 Permalink |
lvm snapshots
+ no backups on production servers — backup processes run on other db servers.
Ben Fremer 9:07 pm on May 31, 2009 Permalink |
What happens behind the scenes when someone moves their wordpress.com blog to a custom domain (ordered through wordpress.com )
Barry Abrahamson 9:24 pm on May 31, 2009 Permalink |
We add the DNS information to our servers dynamically when you purchase the domain. We then insert a row into a table which tells us which domain to associate with which blog. There is then code which switches all of the links to reflect mydomain.com rather than mydomain.wordpress.com and handles the redirects. It is very similar to the Domain Mapping plugin which Donncha has released.
Casey 9:08 pm on May 31, 2009 Permalink |
Any stories about Varnish or Pound or other reverse proxy tools y’all might use?
Barry Abrahamson 9:20 pm on May 31, 2009 Permalink |
We have switched away from pound mostly for performance reasons. Under high concurrency (many thousands of req/sec) the threaded model doesn’t scale and it will crash. We have replaced most of our pound instances with nginx. We are using Varnish heavily for caching images. All of the images on WordPress.com and Gravatar are cached via Varnish. We have about 60 varnish servers deployed on WordPress.com and 10 on Gravatar. Each Gravatar varnish server is serving 3ish thousand requests per second. My gripe with Varnish is that whenever we upgrade, we seem to run into new performance/optimization problems which require lots of time to resolve. As a result, WordPress.com is still running an older version of Varnish. Persistent caching (across server restarts) should be introduced in Varnish 2.1 which should be cool.
Jeff Waugh 7:18 am on June 2, 2009 Permalink |
Have you guys tested the new, built-in proxy caching stuff in nginx 0.7 on any of your media caching boxes? I’ve been using it for images on a (much smaller) site, and it appears to perform very well.
(Thanks very much for doing this Q&A!)
Barry 9:53 pm on June 22, 2009 Permalink |
Haven’t tested it. Did you benchmark it against varnish? Was it faster?
Marylyn 11:51 pm on June 25, 2013 Permalink |
Hi, everything is going well here and ofcourse
every one is sharing information, that’s actually fine, keep up writing.