Scalability, hosting and caching

I manage a WordPress site that in the past year did about 7.5 million pageviews (200K | 1.1 million | +10%) from 830K unique visitors (36K | 125K | +14%) visiting 1.3 million times (50K | 195K | +22%). The numbers in parentheses are the low and high figures for each stat while the percentages are the increase from the prior year. Our content and thus traffic is highly affected the school year. Our biggest months are Sept-Oct (~25% of our visits) while our slowest months are June-July (~9% of our visits). We expect similar or higher traffic increases in the coming year as we reach out to get more schools involved.

On the WordPress side, we have nearly 90K posts, each with an average of 12 custom fields/postmeta rows, and members of an average of 4 categories and/or tags. We do not currently allow commenting or registration. For caching, I’ve been running DB Cache Reloaded (and now the Fix version) for more than a year and it helps a lot. I have tried both WP Super Cache, W3 Total Cache and Hyper Cache, but because we don’t currently have memcached and some other things installed, they haven’t been as useful as the database cache. I don’t currently have a php accelerator installed, but on some other sites I’ve found that to be very useful.

The site is hosted on a dedicated server with 4GB of RAM running FreeBSD. During high traffic months, MySQL crashes regularly and our server generally has about 5 percent of the scratch disk in use. My general experience is that MySQL runs better on Linux servers, but I inherited this server and have been holding out until I can find an optimal solution for our needs. Since we are about to enter our slowest period of the year, that time has come, which is why I seeking some advice here.

Because our traffic varies widely, I’m looking into some scalable virtual server based solutions where our main site would run on one or more sets of cloud based virtual servers with the ability to ramp up automatically as traffic warrants. We do not currently run a CDN, but that’s something else I’m looking into for our audio files, each around 3MB which are listened to an average of 70K times per month. Is anyone running something similar for a large WordPress installation? Any suggestions as to hosting companies we should look at?

Because our database is nearly 2GB (nearly half of which is the WordPress installation) and I’m not that familiar with clustering MySQL, I’m not sure how feasable a VPS solution would be compared to our dedicated server. Is the multi-db plugin available here something I should be considering and how does this scale when you add BuddyPress and Multisite into the mix?

We are not currently running BuddyPress or Multisite, but I am running Multisite on a test platform with the idea of splitting out some of the content into multiple sites. However, I don’t want to implement BuddyPress until I’ve made decisions about our hosting arrangements. I will probably set up Multisite on the production server in the coming weeks. But DB Cache Reloaded is not currently Multisite compatible so I need to either rewrite it so that it is or find a suitable replacement. Any suggestions?

Over the next few weeks, I’m going to be rewriting our two-year-old theme from the ground up to fix some weak spots in terms of performance. One of those problems is the fact that each archive/category/list has to be sorted by menu_order, an artificial method I set up of rating the content so that the “best” content would be at the top of those views. That, of course, is tremendous overhead for our most popular “pages” and something I need to work out a solution for. Also, I think that combining as much of the custom fields as possible into fewer rows could be a big help. Search is also a problem, but I keep hoping things will improve in WordPress that will make those fixes easier.

Thanks in advance for your suggestions…