Join 3,424 readers in helping fund MetaFilter (Hide)


I'm Too Big and Dumb for My VPS.
May 16, 2011 10:03 AM   Subscribe

I'm with a managed VPS webhost and apparently I've outgrown my current plan. Please help me figure out if it will be worth the added expense to move up a tier, or if there are things I can do to minimize my consumption of resources.

I run a moderately busy (83K pageviews in the last month), image-heavy, ad-supported Wordpress blog. About a year ago I moved from a shared hosting plan to a managed VPS (I need the hand-holding of a managed plan, as I have no server admin experience). My site has never been exactly zippy, and now it's experiencing lots of slowdowns and timeouts that made me switch in the first place. The host tells me I just have a resource-intensive site and recommended moving up a tier to a more expensive plan.

I'm not dead set against spending the money ... maybe I am just spoiled by all those $5/month shared hosting plans of my youth. But it doesn't make sense to me that a blog would be too much for a basic VPS hosting package when these packages are typically marketed to be used for game servers, host reselling, VOIP, etc.

I also wonder if I should maybe look for an extra-robust shared hosting plan, since I don't have the experience to deal with a VPS.

Any guidance on what to do would be appreciated! Let me know if you need any specific site statistics.
posted by kmel to Computers & Internet (12 answers total) 4 users marked this as a favorite
 
Are you using a cache? Are you serving your static resources off of something like S3 (or a CDN)?
posted by aparrish at 10:06 AM on May 16, 2011


Yes on the cache, the second question is Greek to me.
posted by kmel at 10:14 AM on May 16, 2011


Do you know enough about server admin to look at processor/memory utilization over time?

Does your WP site have a lot of plug-ins? Is search a heavily-used feature? Your site may be running a lot of queries against db tables that are not indexed properly.

I'm assuming you're using LAMP for this, right? There are probably a bunch of resources out there regarding tuning your environment (MySQL probably needs the most tweaking) for WordPress. Here's one, though I can't vouch for the quality therein.
posted by mkultra at 10:27 AM on May 16, 2011


WordPress with a properly configured cache should, in most cases, be perfectly happy to serve up such a small number of pageviews per month. On average, you're talking about two page-views per minute, which a well-managed shared host shouldn't have too much trouble with (all bets are off if you have a lot of sharp spikes and valleys).

One major problem with wordpress performance, however, is plugins. Are you running any? Which ones?

Many of them are simply not written well enough to be used on sites that need even two concurrent users, let alone two per minute.

Honestly, unless you're using a lot of custom code, you might try wordpress.com with a custom domain.
posted by toomuchpete at 10:31 AM on May 16, 2011


not all WP cache plugins are effective out of the box; you may want to check the management reports from the cache; these will show how much it's helping you. WP without a cache is a disaster.
posted by jenkinsEar at 10:33 AM on May 16, 2011


The first question I have would have is where is the resource bottleneck? Is it CPU or memory? Web server or database? Network? Performance tuning can be tricky stuff, but since a reasonably provisioned VPS should be able to handle this kind of load, I'd want to try to figure out where the bottleneck is before upgrading.

It might be worth finding a buddy with some experience in this or paying someone for a few hours of their time to help figure out what's going on here.

At a minimum, I'd try running top in the terminal. You can use "top -o cpu" to ensure it sorts by CPU usage. The key things to look at are mostly in the very top of the window. Check out the "Load Avg" and "CPU usage" sections, which will tell you what kind of processor usage is happening. Note that these numbers can be misleading with a VPS, depending on what virtualization system they are using, but it will give you an idea. Another thing to look at VM (virtual memory) section, specifically the part where it says something like "1342721(0) pageins, 393606(0) pageouts." If those numbers in parenthesis aren't sitting around zero, that can indicate that the system is swapping a lot of data in/out of memory, which can be an enormous performance bottleneck. Then look down and see what processes, if any, on your system are using a lot of CPU or memory. Is the database (most probably MySQL) running on the same server as the web server? Is it chewing up a lot of CPU?
posted by zachlipton at 10:49 AM on May 16, 2011


To translate from the Greek: you're potentially wasting bandwidth and CPU time serving images from your VPS (especially if you've got a lot of them). One way of mitigating the problem is to take any large, static resources like images and copy them to a server that is more suited for serving those kinds of files, like Amazon S3 or Cloudfront. Images served from those services will generally load faster---and they won't bog down your VPS performance or count against your bandwidth limit, since your users' browsers will be requesting them from a different server. You'll still need to pay the bandwidth costs for S3/Cloudfront, but generally those costs are tiny compared to what you'd pay in VPS overages.

If you're using WP Super Cache, then there's a plug-in that will automate most of the process for you (uploading your existing content to a CDN, hooking into the "new post" process to automatically copy images you upload to the CDN).
posted by aparrish at 11:00 AM on May 16, 2011


There is a fantastic Firefox plugin called YSlow, that inspects how the webserver performs and offers configuration suggestions. For example, if your server isn't telling the browser to cache your WP theme, that can be a source of lots of needless traffic and load. Yslow catches a lot of these sorts of things, and gives you both a grade for (comparison's sake), descriptions of why each factor matters, hints about how to get better grades.

Typical wins novices miss:
* compression
* cache Expiration controls
* minification
* Etags (usually only relevant with multiple servers)
posted by pwnguin at 12:51 PM on May 16, 2011


Thanks so much, everyone -- almost all of it is over my head but it does confirm my suspicion that my hosting plan should be able to handle the traffic.

I don't know anyone who can do all this performance analysis and fine-tuning for me ... any ideas on how I can find a reputable person to hire? I don't even know what such a person would be called.
posted by kmel at 4:38 PM on May 16, 2011


Any Linux system administrator should be able to handle this, but your challenge will likely be compensation. They'll want up front payment and you'll want payment after delivery. The nice thing about a tool like YSlow is that it gives you objective measures of improvement that you can tie compensation to.
posted by pwnguin at 10:45 PM on May 17, 2011


"Any linux sysadmin" might be able to tell you where the WP install is choking (hint: it's very unlikely to be serving static content), but it's going to take more than that to fix your problem. Optimizing WP is not a standard linux sysadmin duty, and while I'm sure one could probably muddle through, you're going to get more bang for your buck hiring a good WP consultant.

I'd recommend posting to MeFi jobs or WordPress Jobs.
posted by toomuchpete at 10:02 AM on May 18, 2011


If you were to hire me for such a job (I'm not available and I'm not a WP guru, so we're talking hypothetically here), I wouldn't take the job if I was to be compensated on the basis of YSlow results. YSlow is a useful tool, but it's a tool that gives suggestions for web page optimization, not server performance optimization. YSlow helps web designers and developers to make their sites use less bandwidth so the page loads faster, but that's not the same thing as using fewer resources on the server. In fact, a number of optimizations might improve YSlow results dramatically, but could actually use more memory, CPU, etc, and there are many techniques that could reduce your server load without meaningfully impacting the YSlow results.

In other words, I would try to find a competent professional and pay him/her for a reasonable amount of time to make improvements. YSlow isn't necessarily measuring what you're looking for here.
posted by zachlipton at 11:41 AM on May 18, 2011


« Older Help me recover from switching...   |  Unusual restrictions or rules ... Newer »
This thread is closed to new comments.