Media Temple DV

I am no longer using Media Temple as my web host, so comments have been closed.

Though it’s typically applied to software, I tend to apply the YAGNI mentality to other things, as well. That is to say that I’d rather wait and upgrade when I need something rather than pay for something that I may never need.

Case in point: A couple of weeks ago, I outgrew my current host and needed to upgrade so I ended up going with Media Temple DV hosting.

In most shared hosting environments, you use whatever configuration they give you; however, because of the nature of the DV environment, the server is completely yours. That means that you’re responsible for tweaking Apache, PHP, and MySQL to make sure that it’s working best for your needs.

So what would a migration to a VPS environment be without a little bit of tweaking?

WordPress on Media Temple DV

Before actually sharing my MySQL configuration (because that was largely the thing I tweaked the most), I thought I’d also share the specifics of my setup just so you’re familiar with how I have things setup:

So there’s nothing too extraordinary about this particular setup. For what it’s worth, I did install W3TC and MaxCDN on the shared environment prior to moving on a VPS.

The Initial Setup

WIth that in place, one of the first things that I noticed as soon as I’d log in to my dashboard is that I’d have a warning that the install was using nearly 100% of my available RAM (which is 1GB).

Media Temple DV RAM Warning

After doubling-checking with support to make sure that there was nothing out of the ordinary with my migration, I then looked at the following two articles to help provide some initial tuning to my environment:

Though this did yield some improvement, I still wasn’t content with the performance.

Tweaking MySQL Even More

After that, I installed mysqltuner.pl – note that you will need SSH access for this – and then followed the recommendations that were shared at the end of the script. Unfortunately, I didn’t grab a screenshot so I can’t show the initial recommendations that the script made.

Anyway, this lead to the following /etc/my.cnf configuration file:


 [mysqld]
 # Basic settings
 user = mysql
 datadir = /var/lib/mysql
 socket = /var/lib/mysql/mysql.sock

# Security settings
 local-infile = 0
 symbolic-links = 0

# Memory and cache settings
 query_cache_type = 1
 query_cache_limit = 24M
 query_cache_size = 2M
 thread_cache_size = 4
 table_cache = 48
 tmp_table_size = 128M
 max_heap_table_size = 128M
 join_buffer_size = 8M
 key_buffer_size = 128M
 max_connections = 4
 wait_timeout = 300

# Innodb settings
 innodb_buffer_pool_size = 128M
 innodb_additional_mem_pool_size = 3M
 innodb_log_buffer_size = 3M
 innodb_thread_concurrency = 8

[mysqld_safe]
 # Basic safe settings
 log-error = /var/log/mysqld.log
 pid-file = /var/run/mysqld/mysqld.pid

If you’re comparing the default my.cnf configuration file with what you see above, you’ll notice that what’s above is significantly smaller. That’s okay – it simply leaves out a lot of the variables that are either unneeded or that are commented out in the default file.

You can see the dip in the RAM usage below (it’s toward the very end of the graph):

Media Temple DV RAM Usage

Secondly, if you opt to make changes to your environment, make sure that you do so after backing up the initial copy of my.cnf.

Is It Perfect?

I’d love to say yes, but the truth is that it’s not. There are still some spikes in the RAM usage, though it’s not nearly what it was, and I believe that there are further improvements to be made.

Unfortunately, this is one of those areas where I’m not as versed as I’d like to be so I’m constantly making little tweaks to the configuration to try to make it as performant as possible.

There’s a great question and answer for this on Server Fault which I also think is a great resource regardless of what tier of DV you’re using.

Hopefully, the configuration above will help you, but I’m always open to suggestions to make mine – and others – better. Finally, I’ll be updating this post as time goes on with the tweaks that I’ve made to my.cnf as I continue to get comfortable in the new environment.

Category:
Articles
Tags:

Join the conversation! 15 Comments

  1. I’ve got several sites on our MT DV server.. let me know if you have trouble navigating the Plesk system!

  2. I have about 100 WP sites on MT DV’s. The uptime is great and rarely have I had to troubleshoot anything. The ability to SSH has ruined me – I can’t go back to a system where I don’t have that option :)

    Great option on tweaking MySQL – will have to see if that makes sense for us.

    Thanks as always for the post Tom!

    • Agreed – one a person has used SSH for a significant amount of time or for significant changes, it’s hard to go back.

      At the very least, check out `mysqltuner.pl` and see if it doesn’t expose any potential recommendations.

      Anyway, thanks for the comment Lars :).

    • I have recently put one WP site on my DV getting about 10k hits a day and it’s maxing out my CPU on tier two. How do you have over 100 sites on one DV server.

      • Good question! I only have a single site on the DV server =T. I’m afraid I can’t be much help.

        • Should have clarified. Multiple dv’s and mostly low traffic sites. For the higher traffic stuff, those have their own dv. I have run into the cpu issue and just upgraded the server when needed.

          • Thanks for the clarification. I have done some apache tuning and it helped but I am still surprised how much CPU the site I am running is taking up. I am now at Tier 4 and its at like 80% for one site with a moderate amount of plugins and custom work.

            • This could have to do with a plugin that’s running a process constantly, running frequent queries, or perhaps even running on a single page load (and this would definitely cause some spike in the CPU usage if it’s a heavily hit site and the plugin runs on each page load).

  3. Why did you choose to manage a DV instead of going with a WordPress managed host? I had the same decision to make and opted out of managing a DV.

    • For me, it was an issue of price and the ability to have a bit more control.

      I may go WordPress managed host in the future, but I was content to deal with the overhead – at least for this single site – for now.

  4. Nice post and coverage about MT DV. I’m planning to trial them out.
    I found that another faster way to boost performance on top of proper configuration is to go with hosting that using SSDs instead of normal harddrive or SAS.

    I used this site to figure out some good ones http://serverbear.com/

    • Ah, cool – thanks for that link.

      Also, you’re right regarding SSD’s. If they have ’em, that’s awesome. At some point, a person’s internet connection can become the biggest bottleneck of which we can’t do much about =T.

  5. I’m on a DV at MT too, and I’ve been meaning to look into tuning, but I can’t wrap my head around it. MT recently came out with a service where one of their techs will do a one off tuning to your site. Price seems high, but might be worth it.

    • Yeah, I think having a service like that isn’t a bad idea – I think I’m gonna stick with working on tuning it myself for now if for nothing else that refining my own setup and keeping this post as a good reference ;).

Comments are closed.