When I got back to my computer this afternoon I took a look at the performance of my RSS feeds over the past few hours:

3498.8924 | 1808.4851 |
3522.5980 | 1610.3802 |
2838.9859 | 1510.7083 |
428.4015 | 191.3470 |
588.4480 | 238.6685 |
415.9069 | 123.9909 |
525.5345 | 215.9800 |

Each row is the average time (in milliseconds) it took to generate a page for a given hour. The left column is the average time for each page, and the right column is the amount of time just spent querying the database.

Four hours ago, something big changed. At first, I thought that four hours ago something big broke, like maybe all of the crawlers had suddenly stopped working and taken their load off the database, but no, everything is working fine. Almost too fine.

Then I remembered the last thing I’d done before I took Ruby out this morning…

Recalling something that was mentioned at last month’s PHP conference, I changed the web server’s configuration to refer to the database server by IP address instead of by name. So, instead of querying db.feedwhip.com, it was going to 216.172.217.XXX. That one change knocked almost 90% off the average amount of time I spent waiting on the database.