Sep 19, 2018

11 min read

The Top 5 (Wrong) Reasons You Don’t Monitor Your VPS

Written by

Vippy The VPS

I’ve been using virtual private servers for more than a decade, on and off, and only now have I come to realize the importance of VPS monitoring.

This change in mindset should be much of a surprise to those who read the Serverwise blog with any regularity. I haven’t been shy about being a bad, VPS-killing “sysadmin”, but I’m always looking for places to learn.

Enter this very blog. Beginning on or just before August 10, the page generation time for single.php templates in our Wordpress installation had jumped three-fold. Generating a page like this one went from roughly 400ms to nearly 1,200ms.

Given that a blink of the eye takes about 100ms, it’s a significant increase. We went from a slow blink to a legitimate microsleep. Plus, Google is starting to hammer SEO ranks for sites with slow load speeds.

I spent time diving into our Wordpress templates to resolve the issue. Based on Git commits, I hadn’t edited the single.php template for a least a month prior to increase, so I was able to rule it out as the culprit.

I did make two changes on August 10, which were to add some Mailchimp subscribe forms and a latest post area on the footer to match what we have on our homepage. I removed those and saw generation times improve to a degree, but not return to the 400ms or less level.

The culprit was, in the end, too many plugins, each of which wanted to make a handful of database calls. I removed many unnecessary plugins and made some tough choices about eliminating generally-unused features on this blog in favor of speed. I also ended up dumping dozens of extraneous database calls throughout our templates—why bother using functions like get_template_directory_uri(); or home_url when I know precisely what those static values will be?

As soon as I deployed these changes, our numbers improved significantly. Our web server now generates a single.php template in just over 300ms—lower than it had been when this investigation began.

I don’t want this to come off as an attempt at one of those technical postmortems wherein some incredibly smart engineer explains how they fixed an enormously complex issue with their code or infrastructure. I’m just relaying an anecdote for the rest of us.

Without monitoring, we wouldn’t have noticed this issue in the first place. We probably would have ended up spending dozens of ours

Continue reading this article
by subscribing to our newsletter.
Subscribe now