Systems Wrangling Session At WordCamp Developer Day

What is the current status of web servers…Is Apache 2.x “fast enough?â€
Automattic uses Lightspeed (for PHP), nginx (for static content), and Apache (for media uploads). For WordPress-generated content, all server options are approximately the same speed.
What about APC?
Automattic uses beta versions of APC, and provides a 3-5x performance increase. It’s tied closely to the PHP [...]

MySQL Slow Query Log Analysis

Peter at MySQL Performance Blog pointed out this sweet perl script to analyze MySQL’s slow query logs. (This is supposedly a PHP port.)
The script does a good job of aggregating similar queries (those that only differ in their query values) and displaying overall stats for them. The following two queries are showing up a lot [...]

5,848 (max), 656 (avg) MySQL Queries Per Second

The above graph is far from typical, but I love that the box (the top one in this picture) can do the job when it needs to. This activity is a result of bulk record imports, web activity results in relatively little database traffic due to my use of Memcached and Batcache.

Amazon To Offer Content Delivery Services

Via an email from the Amazon Web Services group today:
…we are excited to share some early details with you about a new offering we have under development here at AWS — a content delivery service.
This new service will provide you a high performance method of distributing content to end users, giving your customers low latency [...]

Steve Souders On Website Performance

Steve Souders: 10% of the problem is server performance, 90% of problem is browser activity after the main html is downloaded. He wrote the book and developed YSlow, so he should know.
JavaScripts are downloaded serially and block other activity. Most JavaScript functions aren’t used at OnLoad. We could split the JS and only load essential [...]

Optimizing Inserts/Updates On MySQL Tables

When doing a bulk insert/update/change to a MySQL table you can temporarily disable index updates like this:

ALTER TABLE $tbl_name DISABLE KEYS

…do stuff…

ALTER TABLE $tbl_name ENABLE KEYS

From the docs:
ALTER TABLE … DISABLE KEYS tells MySQL to stop updating non-unique indexes. ALTER TABLE … ENABLE KEYS then should be used to re-create missing indexes. MySQL does this [...]

WordPress to_ping Query Optimization

The WordPress team has taken up the issue of performance optimization pretty seriously, and I look forward to the fruits of their efforts, but I’m also casting a critical eye on my own code. Thanks to caching and a hugely optimized query architecture, Scriblio is now performing better than ever, and I’m now looking at [...]

WordPress + Invalid URLs = Extra Database Queries

After reporting weirdness last week I finally sat down with a completely clean and virgin install of WordPress 2.3.2 and traced what happens when you make a permalink request for a non-existent URL.
Here are two sets of URLs to use as examples and context:

These are valid URLs:

http://site.org/archives/101
http://site.org/page-name

These are _not_ valid URLs:

http://site.org/archivezorz/101
http://site.org/favicon.ico

Valid URLs get parsed, the [...]

Easy MySQL Performance Tips

Yes, I’m still trying to squeeze more performance out of MySQL. And since small changes to a query can make a big difference in performance…
Here are two really easy things to be aware of:

Never do a COUNT(*) (or anything *, says Zach). Instead, replace the * with the name of the column you’re searching against [...]

Speedy PHP: Intermediate Code Caching

I’ve been working on MySQL optimization for a while, and though there’s still more to done on that front, I’ve gotten to the point where the the cumulative query times make up less than half of the page generation time.
So I’m optimizing code when the solution is obvious (and I hope to rope Zach into [...]