Configuring a Media Temple (dv) Base for WordPress

Configuring a Media Temple (dv) Base for WordPress

This article applies to an older version of the Media Temple (dv) service from 2007. You may want to check Media Temple’s knowledge base for updated information.

I’m running a (dv) Base system from Media Temple, which is their 256MB version. This is their lowest-end server configuration, which is actually a virtual server sharing the same hardware.

As my blog has grown in popularity, when I switched over I got enough traffic to overwhelm the server. It turned out that the base configuration isn’t tuned to work within the guaranteed 256MB of memory allocated. It’s configured to run on a considerably larger server, and grabs extra memory as needed if it’s available from the global memory pool. This is all fine and dandy when memory is available, but if it ISN’T, the server will start to chug.

After making the following tweaks to my server setup, one of my articles was dugg and the server was hit by 2750 pageloads per hour for a few hours. This is a pretty significant amount of traffic, and the server had no problems staying up. In fact, it barely broke a sweat. Keep in mind though that in addition to the server tweaks below, I also had optimized my wordpress installation with WP-Cache, which reduces server load significantly. You can read more about this in WordPress and Shared Hosting.

Anyway, here’s what I’ve done to get my DV in line. I’ll write about the WordPress issues a little later. If this article convinces ya to get a (dv), refer my site when you order so I get a little reward from Media Temple :-)

Check for Memory Faults

The virtual server is a product called “Virtuozzo”, and there’s a special file that tells you how much memory you’re allowed to use. When you exceed that amount of memory, a fault is generated. Ideally, you don’t want any faults.

To check up on this, you can use Plesk (under Virtuozzo) or login to your server and type cat /proc/user_beancounters into the command shell. The column that’s of most immediate use to you is failcnt, which tells you how many times a program has tried to get some memory to do something, but wasn’t able to do so. The values should all be 0.

I’ll fill this section in a little later, because it’s kind of tricky to understand and I don’t entirely get it. Here’s a cheesy script I use to constantly monitor the user_beancounters to see if they’re going up (I just open a second shell window):

#!/bin/sh
while true ; do cat /proc/user_beancounters ; sleep 1 ; done

When you run this script, it just cats the output every second (see image). If you’re monitoring other parts of the server, you might see some overall patterns in what seems to be causing the memory usage. There’s some more information at the very end of this post (with screenshots) to help orient you.

Apache Configuration

The default configuration for Apache allowed too many instances of httpd to spawn. Since each instance takes between 20MB and 40MB, you don’t want more than your available memory to be created. If I figure on allowing 128MB available out of my 256MB, and each Apache instance takes 20MB, that means I can’t have too many of them active at once. In actuality, the memory usage reported by ps aux under the VSZ and RSS headings isn’t the real picture of memory usage (see this article for some insight into this), so I can actually have more instances. I experimentally determined that 20 seemed to be enough without pushing the server too hard.

The pertinent settings are in the prefork section of /etc/httpd/conf/httpd.conf. Make sure you save a backup of the file. Here’s what my prefork section looks like (SAVE A BACKUP BEFORE YOU EDIT!)

<ifModule prefork.c>
StartServers 1
MinSpareServers 1
MaxSpareServers 3
ServerLimit 20
MaxClients 20
MaxRequestsPerChild  4000
</ifModule>

UPDATE: On the week of August 21, 2007, I noticed that my memory allocation was exceeded regularly by about 100MB or so. It seems that the way (MT) is calculating physical memory use is also taking virtual memory into account. I had to drop ServerLimit from 20 to 6 to maintain responsiveness. I have a ticket open to see if this is a bug or not (virtual memory is disk-based, so you’d think it wouldn’t count against your physical memory allocation). :END UPDATE

UPDATE:Chris McKee points out that Media Temple has a performance tuning knowledge base article with some recommendations for the Apache configuration. My settings are much more conservative, designed to avoid memory swapping altogether.

I also disabled modules that I wasn’t using by commenting them out. I reduced the memory footprint of each httpd instance by a bit. Every bit helps! The lines with the # in front are disabled modules.

LoadModule access_module modules/mod_access.so
LoadModule auth_module modules/mod_auth.so
# LoadModule auth_anon_module modules/mod_auth_anon.so
# LoadModule auth_dbm_module modules/mod_auth_dbm.so
# LoadModule auth_digest_module modules/mod_auth_digest.so
# LoadModule ldap_module modules/mod_ldap.so
# LoadModule auth_ldap_module modules/mod_auth_ldap.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
# LoadModule mime_magic_module modules/mod_mime_magic.so
# LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule expires_module modules/mod_expires.so
# LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
# LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
# LoadModule dav_module modules/mod_dav.so
# LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
# LoadModule asis_module modules/mod_asis.so
# LoadModule info_module modules/mod_info.so
# LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
# LoadModule imap_module modules/mod_imap.so
LoadModule actions_module modules/mod_actions.so
# LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
# LoadModule proxy_module modules/mod_proxy.so
# LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
# LoadModule proxy_http_module modules/mod_proxy_http.so
# LoadModule proxy_connect_module modules/mod_proxy_connect.so
# LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
# LoadModule disk_cache_module modules/mod_disk_cache.so
# LoadModule file_cache_module modules/mod_file_cache.so
# LoadModule mem_cache_module modules/mod_mem_cache.so
# LoadModule cgi_module modules/mod_cgi.so
LoadModule logio_module /usr/lib/httpd/modules/mod_logio.so

After you make these changes, type apachectl configtest to make sure you haven’t screwed something up. If you get the Syntax OK go-ahead, then apachectl restart will restart the server and reread the configuration.

Note: Your website might actually use some of the modules that I’m not using, so be careful.

Note: ps -A -o pid,vsz,rss,pmem,time,comm shows memory usage (VSZ and RSS) roughly, though it’s not really accurate.

SMTP connections

SMTP is used to receive mail addressed to mailboxes on your server. It’s also used to send mail to other people from your email account.

By default, the number of incoming SMTP connections was set to “unlimited”. When I was getting hammered by spam, this created a LOT of simultaneous connections, each of which took up memory. I limited the number of instances to 10 by editing /etc/xinetd.d/smtp_psa, from the default of 0 (unlimited).

I also noticed that when a secure SMTP connection (SMTPS) occured, the SMTPS daemon would use 100% CPU. I don’t use secure SMTP, so I denied all SMTPS connections to prevent spammers connecting to the secure port from creating this problem. That file is /etc/xinetd.d/smtps_psa.

After you make these changes, type /etc/init.d/xinetd restart to tell the server to re-read and use the new configuration information.

POP3 and IMAP SSL

Since I don’t use SSL for IMAP or POP (these are services that email programs use to download your mail), I disabled these scripts as well by commenting out the lines that start with report_action "Starting imap-ssl" and report_action "Starting pop3-ssl". I will have to look back at these later to see if they really make a difference.

To restart the services, type /etc/init.d/courier-imap restart.

MySQL Configuration

Although I wasn’t sure if MySQL was a problem, I decided to configure it to run in a smaller memory footprint. I’m not an expert in MySQL configuration, so I just used the “medium” memory configuration as a starting point. You can find the my-medium.cnf file, suitable for a 64MB instance, in /usr/share/doc/mysql-server-4.1.20/. The changes I made were in the [mysqld] section of the file /etc/my.cnf

[mysqld]
set-variable=local-infile=0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
skip-bdb

set-variable = max_allowed_packet=1M
set-variable = key_buffer=16M
set-variable = table_cache=64
set-variable = sort_buffer=512K
set-variable = net_buffer_length=8K

set-variable = myisam_sort_buffer_size=8M

I basically added the set-variable commands.

When I was importing my WordPress database, I also had to increase max_allowed_packet to 16MB. It turned out that there was an inefficiency in my WordPress setup that actually was the source of this problem: The Tan Tan Reports plugin created a very large entry in the wp-options database table. I removed the plugin and its data from the wordpress database table and I was able to reduce it back to 1MB. This was very important from a memory usage perspective too; MySQL allocates extra memory for inter-process communication (like, between MySQL and WordPress), and this caused memory failures in the user_beancounters!

After you make these changes, type /etc/init.d/mysqld restart to reload the MySQL configuration.

Additional Optimizations

There are some additional things I did, like disabling spamassassin (21MB), limiting the number of plesk connections (another 30MB), and disabling named (1MB). You can read about these additional optimizations over here.

Screenshots

See this page for some screens and descriptions of how I am monitoring memory usage the old-fashioned way.

30 Comments

  1. Hung 18 years ago

    Hey David,
    I checked this out after my own dv started eating up all available memory. Hopefully your tips will save me from having to upgrade. Thanks!

  2. Jaimie 18 years ago

    Thanks I was just going to write a post about what I have been trying to do to run many WP off the DV base plan.  I will try you suggestions.  Basically I’m getting QoS hits on privvmpages.  When I look at the beancounters I have tons failcnt values on this.

    I have installed APC hoping that it would help but not sure.

  3. Matt 18 years ago

    Just wanted to say thanks for the great guide and help via email also.  It seems to me that the base config is not well setup by default to run on just 245mb ram.
    After following your guide and disabling as much as I can my ram now stays under 200mb most of the time (was always over 260mb before).  But I am still getting the odd yellow / black warning on privmpages and kmemsize.  kmemsize is only 13mb, I would like to increase this.
    Thanks again for the great guide!

  4. Jaimie 18 years ago

    I just wanted to follow-up my post.  I made the changes that you recommended and also install APC and have stopped the QoS alerts.  The one thing that I’m trying to figure out is the best configuration for APC based on the DV Base plan.

    Once I figure that out I will make a post about it show that others can see.  But it will take some time as I’m a Windows developer and this is all new to me.

  5. Dave Seah 18 years ago

    Jaime: I’m not familiar with APC, so I’ll have to look into that. Glad it’s getting under control!

    Matt: As far as I can figure out, if kmemsize and privvmpages are going yellow/black, there probably is some process you’re running that’s going nuts periodically and consuming a lot of memory in bursts. If you’re running any other kinds of servers, you should check their configuration as well.

  6. Matt 18 years ago

    Thanks Dave, things seem good right now.
    I also moved a large popular image gallery to the server, this pushed mysql process upto around 10% all the time.
    I enabled the mysql query cache (which is now fully supported in WP 2.1) this dropped the mysql usage down to about 3%, a vast improvement.
    I am also looking into APC, (thanks jamie) I would love some sort of caching for my gallery so a php cache would be very nice.  For WP wp-cache2 works wonders.

  7. Jaimie 18 years ago

    For me the QoS seemed to be coming from UTW so I have disabled it from my blogs.

    Here is where I got APC from:
    http://pecl.php.net/package/APC

    Before you start this you should know that it is fairly involved to setup.  This is far from a simple plugin.  Having said that if you have time and some patience it is not that hard.

    Make sure that you request to have the Developer Tools installed on your DV and also request your Root password as you will need it.

    I used this version of Putty (it is really nice):
    http://www.xs4all.nl/~whaa/putty/

    For the install I did a mix of what is in the documentation and what I found here :
    http://www.vbulletin.com/forum/showthread.php?t=165367

    I had install wp-cache2 but removed them as it does not play nice with APC.  Some people have a work around but for me just APC seems to be working out.  Plus it is server wide and works for all PHP pages.

    I just need to figure out how to configure it to work in the DV enviro that the DV Base provides as I think that the setting that I have are not the best.

  8. Ma2T 18 years ago

    Hey Dave,

    Thanks again for your tips, after weeks of tweaking apache / mysql and now installing XCache (Similar to APC eAccelerator). My server is humming along very well, I kinda feel like pushing to harder lol.
    Memory useage is staying low, server is very fast.
    Im running 15 wordpress installations, 5 image galleries with no probs. (With one blog getting 25,000 page views a day)
    After installing XCache, my server load is as low as 0.10-0.20 instead of 3-4 during peak. After 3hours of running the cache it has had cached php 510,162 hits.

  9. Ss 18 years ago

    Thank you sir, I’m in this same boat and just applied all your tweaks, hopefully my privvmpages stop failing in the “black” zone. So far so good. Thank you!

  10. jorge 18 years ago

    Jaimie, do you have any more details about installing apc in a mediatemple server ? i keep getting errors when i try to run phpize

  11. Chris McKee 17 years ago

    Nice article but MediaTemple do actually supply one in their holy grail of a knowledge base.

    http://kb.mediatemple.net/article.php?id=246

    It even gives “recommended” optimization settings based on the package your on.

    Chris

  12. Dave Seah 17 years ago

    Chris: Thanks for the link! I hadn’t realized they’d written anything like this, because at the time I was having these problems I had scoured their knowledge base for optimizations and any tech notes related to the (dv), which their “holy grail knowledge base” doesn’t make particularly easy to find. At the time I wrote this article, this is what that article stub had. The later update has the (dv) 3 specific information in it, though you’d need to know that you HAD an apache MaxClients issue to know why your server was crashing in the first place. And why Media Temple tech support, in my various tickets, NEVER ONCE pointed me to this KB article is now extremely irking.

    There are additional optimizations in my article that aren’t mentioned too, so overall it is still relevent.

  13. Chris McKee 17 years ago

    David: You work quick. No sooner had I posted this (after sifting through their Knowledge Base) did I realize that first and foremost a Virtual server is in no way made equal to a real dedicated server (which I moved from). Secondly mt’s knowledge base actually advises unsafe practices, so much so I spent most of yesterday removing a worm from my system and getting the culprits hosting removed.
    As I code my sites in PHP5 I had to use their CGI wrapper method to use it (as Plesk UNIX combos don’t come with PHP5 natively installed) which advises the risky practice of removing PHP safemode on the accounts that require this, something I rushed into.
    This allowed a worm on to my system using a backdoor in PHP.

    Funnily media temples response to my ticket was silence.

    Anyway, with reference to your optimizations, as you state quite rightly your optimizing for your own usage.
    Personally I host other sites and I would add that it’s important that people understand what they’re changing within the httpd.conf (apache config) file before blindly copying other peoples values (as many do).

    Chris

  14. Rich 17 years ago

    Dave,

    I have seen a serious change in my (dv) performance this last week to two.  Similar to your mem issue.  Let me know if you hear anything on your ticket and I will keep you in the loop also.

    R.

  15. Chris McKee 17 years ago

    After Five Days there was still no response, help or even acknowledgment of the fact.
    The hole probably could have been fixed by killing off their slow update system, using atomicrocketturtles YUM updates to update the PHP to 5 and turning php safemode back on.

    Either way I’ve switched back to me old host (aplus) who have been nothing but helpful, and at least this way I can guarantee that when I need to get the server reset or reloaded at 2am on a Sunday they will actually do it.

    Same cost better service, hardware server. Luckily I was within my 30days with MediaTemple so they’ll be refunding every penny.

    Good Luck

    Chris

  16. Chris McKee 17 years ago

    Almost forgot to mention, the decrease in performance with regards to higher CPU utilization was apparently due to a Distributed Denial of Service attack over quite a large range of media temple IP’s.

    Could be worth having a look at the server logs, and installing BFD, SPRI & SIM to protect from brute force attacks, set the priority of processes so the system doesn’t become overwhelmed and reset any services that have crashed or are faulty (like a lightweight version of watchdog)
    http://www.rfxnetworks.com/proj.php

    Don’t bother trying to install APF, the fact that the server is virtual and you have no real kernel, and media temple control the Virtuozzo and therefore you have no control over the service it self (and the ability to modify its limits) means it’s impossible to install APF.
    I have written a guide which works for most virtual servers, and It was written with media temple in mind, but once you’ve configured the iptables and APF you will have a running error in the iptables repository as virtuozzo’s basic setting for the max number of ip’s is 200… APF starts with 200 IP’s.

    But all in all I would advise anyone who wants to secure the use of the server properly without the hassle to just pay someone else to do it, its only usually $70. Granted I’m British so that’s only 30 quid, but with all the niggling little differences between using a virtual server and a hardware server it’s worth leaving it to someone who will take 5 minutes to do it (then sifting through your root folder to see what scripts they used and backing up the configs).

    As I’m now on FC7 I’ve once again had to manually harden the server which took 4 hours but was a hell of a lot easier then on a virtual server.

  17. Dave Seah 17 years ago

    Rich: MT support was helpful, but not ultimately helpful enough. I eventually got it through to them that I had seen a change in my memory utilization. In the meantime, I had narrowed it down to MySQL…when I launched it, that’s where all the memory went…even without httpd up. It may be that the tables have grown to a point where it’s going to be hoggy. I closed the ticket after an MT person suggested it might be interprocess communication (I am getting periodic othersockbuff failures, everything else is 0 count in the ubcs)

    Chris: That’s great that you were able to find another host. What kind of DDOS were you being hit by? Whenever I look at the securelog I get depressed at the number of jerks out there knocking on my server…I’ve just dropped some services and limited the number of smtp connections that I allow. I should look into hardening the server by getting someone to do it for me and showing me the ropes. That would be a good investment in time.

  18. Chris Mckee 17 years ago

    There’s a pretty simple article on securing your server here though on (mt) I would advise omitting the installation of apf as described previously.

    http://www.web-hosting-control-panel-addons.com/description.php/HOW-TO_setup_a_PLESK_Dedicated_Server/6/

    Finding a new host wasn’t difficult as I was originally with Aplus anyway, I was drawn to mediatype by the big names that use it (moth to the marketing flame effect).

    Anyway, if your having database issues, other then optimizing it (which is probably the more obvious one to do in PHPMyAdmin) and turning on query cache (my support article I originally sent)
    Try installing SPRI (http://www.rfxnetworks.com/spri.php) System Priority, it knocked down my memory & CPU utilization.

    As for the DDOS; the system was battered with scripts trying to find a backhole (which with a dodgy PHP5 implementation used by Mediatemple wasn’t hard). Eventually they got a file on the server which luckily couldn’t access outside of that folder, but it did hammer the resources trying to access QMail and the user directories.

    I wasn’t too annoyed at that, I was more annoyed by MediaTemples complete ignorance and lack of support.
    They seem happy to reply to simple requests (albeit slowly and usually answering a question with another question), but the moment the proverbial hits the fan they’re useless.

    Modsecurity (http://www.modsecurity.org/) is another fantastic way to secure your server, but once again you have to watch out for the possible pitfalls of installing on a live virtual server (or any live server).
    Might be worth installing a virtual machine at home installing virtuozzo (if there’s a demo, I’ve not checked this) and testing it with that.

    As for services, I had ACUNETT.com do mine on the first server (which I then crawled through to work out how to do it myself) for a reasonable price ($50), if you want drop me an email and I’ll forward one of the techs MSN address, it’s how I interrogated them prior to using their service :o)

  19. Arman 17 years ago

    Hey guys.

    I can see that there’s a lot of discussion on a number of topics in this blog post. I’m here to help clarify a few things, and also to let you know that we’ve addressed some of the concerns expressed here. The tone of this comment is really not intended to be condescending or negative, I really just wanted to jump in and give my 2 cents on the matter.

    @Chris McKee:

    “Secondly mt’s knowledge base actually advises unsafe practices […] I spent most of yesterday removing a worm from my system […] I had to use their CGI wrapper method to use it […] which advises the risky practice of removing PHP safemode on the accounts that require this, something I rushed into. This allowed a worm on to my system using a backdoor in PHP.”

    <ol>
    <li>Article header advises that this is for ADVANCED USERS ONLY. We make it clear that it’s not for the faint of heart. Also, this is on a per-domain basis only.</li>
    <li>Just by running PHP as a CGI you do not make yourself vulnerable to exploits you otherwise wouldn’t be exposed to. Furthermore, using suexec is actually more secure, since any files generated by PHP are owned by your user and not the web server.</li>
    <li>The switch in Plesk actually controls PHP 4’s safe_mode value and not for PHP5, so there was really no point for it to be in the article to begin with. See #5.</li>
    <li>The real place where PHP safe_mode is disabled is in the php.ini for the PHP5 installation in the /opt/php51 directory hierarchy. This is because the PHP5 packages are provided by atomicrocketturtle.com and that is the default configuration that it comes in. So yes, php safe_mode is disabled by default, but not because of the switch in Plesk.</li>
    <li>In light of 3 and 4, the KB article has been updated: http://kb.mediatemple.net/article.php?id=260</li&gt;
    <li>None of the PHP code we put on the server is vulnerable to exploits. It was most likely something you put on your server which wasn’t written securely. In such cases, it does not matter whether you were using PHP5 or PHP4, or even (mt) hosting – you put bad code up anywhere with safe_mode off and bad things WILL happen.</li>
    </ol>

    “Funnily media temples response to my ticket was silence […] After Five Days there was still no response, help or even acknowledgment of the fact.”

    I searched your name and your website in our entire system to try finding the details of your issue, however I was not able to find a trace of you ever contacting us or even holding an account with (mt). Perhaps you had it under a different name? I’m not saying you’re making all of this up, I just want to know why it took 5 days for us to get back to you.

    “The hole probably could have been fixed by killing off their slow update system, using atomicrocketturtles YUM updates to update the PHP to 5 and turning php safemode back on.”

    You’re more than free to manage updates on your own. That’s why the Update Option Program came to be. Also, see my point above regarding the explanation as to how PHP5’s safe_mode was off by default – it was an ART package that had this setting by default! Again, the server is 100% secure when we give it to you, and although the PHP5 is put on there by us, it must be enabled in order to have any sort of impact on your server, the KB article addresses this detail now.

    “I wasn’t too annoyed at that, I was more annoyed by MediaTemples complete ignorance and lack of support. […] They seem happy to reply to simple requests (albeit slowly and usually answering a question with another question), but the moment the proverbial hits the fan they’re useless.”

    Many of these items you’re talking about fall outside of our Scope of Support. Installing third-party software that wasn’t designed to run on a VPS, troubleshooting custom or third-party PHP scripts that weren’t written with security in mind, configuring and installing additional modules to your server – we can’t realistically be expected to support every customization under the sun. We try our best to help, but at the end of the day the (dv) IS a self-managed product and works fine for the majority of applications out there. For custom jobs it’s recommended to A) Know what you’re working with, or B) Hire someone who can manage these items for you.

    All that being said, it’s really great to see the community taking time out of their own routine to share their knowledge with articles like this and the countless other ones that have been crafted, not just here on Dave’s blog but on a number of different blogs and forums. I’d like to mention that we’re working on a new forum for you all to collaborate together in one place. Any current (mt) customer is welcome to apply for the beta we’re holding for (mt) Forums. Just go to http://www.mediatemple.net/labs/ to fill out the app if you’d like to participate in the early stages.

    Arman Z. – (mt) Media Temple, Inc. – http://www.mediatemple.net/

  20. Chris McKee 17 years ago

    Nice to see you pay more attention to your reputation as seen on other websites then you do support requests… anyway, with regards to your reply, the actual php that allowed the script to be uploaded to the server was in fact a standard include in an old piece of uni work that was still hanging around on the site, notably this same piece had been linked in on the site for over 4 years, but always on servers with PHP Safe Mode turned on.
    Yes I acknowledge suexec restricts script permissions to the site its applied to, what was more annoying was that, as you’ve admitted, you were telling people to disable security needlessly for the wrong version of PHP and that safe-mode is disabled in the PHP5 config.
    Realistically its about time you made the default configuration PHP5 anyway considering PHP4 was discontinued as of 13-Jul-2007, and in fact ends its support life-cycle at the beginning of next year.

    “the server is 100% secure when we give it to you”
    Minus firewall, brute-force detection, and basically only containing standard Plesk features.

    “Many of these items you’re talking about fall outside of our Scope of Support. Installing third-party software that wasn’t designed to run on a VPS”

    I’m assuming that’s with regards to the APF install, that was annoying, and a learning experience, but in fact APF is built to run on a virtual server (you can turn off the kernel access requirement) what I needed was the limit changing because I didn’t (obviously) have access to the limits on the Virtual server, if it was a default of 250 rather then 200 it would have ran fine.

    “troubleshooting custom or third-party PHP scripts that weren’t written with security in mind”

    As you said you couldn’t even find my account (which really doesn’t surprise me) and if you do you’ll find I never asked for support with scripting.
    Just a basic acknowledgement of the fact the server had been breached.

    “For custom jobs it’s recommended to A) Know what you’re working with, or B) Hire someone who can manage these items for you.”

    Or C) buy a server that can actually be fully configured.

    Last but not least, my account WAS under this name.
    The system was ok, the service was slow, and price wise it’s no better or worse then many other packages out there.
    As for the list of testimonials, as a lot of these are hosted on complex or the high spec DV, testimonials are worthless.

    Ta for the interest all the same.

  21. Dave Seah 17 years ago

    Chris, I appreciate the time you’re taking to outline and support your issues, but statements like “Nice to see you pay more attention to your reputation as seen on other websites then you do support requests” are less than substantive. I think your points, snide tone aside, are otherwise excellent and relevant to the issue of server configuration (though more so on security, which is a different topic) so I am letting them stand.

  22. Chris McKee 17 years ago

    Ye’ sorry about that, anger bubbling to surface.
    If this were a forum, I’d probably of edited it once the urge to get a cheap shot in had passed.

    Thanks anyway.

  23. Jonathan 17 years ago

    Great article. Does anyone know how to install XCache on a Media Temple (DV) base? Yesterday I tried installing it (along with PHP5 and MySQL5) and I ended up breaking my DV (httpd would not restart). I got it reprovisioned last night so now I’m back at square one. I tried to follow the advice/instructions here: http://www.jasonlitka.com/2006/12/20/php-caching-and-acceleration-with-xcache/ but it didn’t really work out for me. Also I used yum to upgrade to PHP5 MySQL5 following the instructions here: http://blog.ascaniocolonna.com/?p=9

    I’m happy sticking with php4 so long as x-cache works—I only upgraded to 5 because it sounds like the latest version of x-cache is more stable on 5.

    Any help anyone can offer would be greatly appreciated.

  24. Robby Grossman 17 years ago

    Hey, thanks so much for putting this guide together. The thought of doing a full migration was a scary one for me, but these guidelines have made things go much quicker and smoother than I’d expected.

    One question: did you ever hear back from media temple about how the memory allocation is calculated regarding physical/virtual memory? I’ll be pretty bummed if “virtual” memory counts as memory rather than diskspace; I think it is reasonable to take “dedicated” memory to be physical, no?

    —Robby

  25. Dave Seah 17 years ago

    Robby: Awesome, glad it helped! I didn’t hear back about the virtual memory being allocated as physical. I think what might be happening is that the virtual memory is actually in use so much that it practically IS physical memory now. Much of MySQL’s memory usage is related to the buffering for each database.

  26. Tim Linden 17 years ago

    Dave

    I just started using Media Temple’s dv and found your article while searching for installing apc on media temple. Didn’t really find much, and struggled a bit getting it going, but I eventually did. So I wrote up how to do it on my site:

    http://www.timlinden.com/blog/media-temple/installing-apc-cache-on-media-temple/

    Thanks for sharing your tips, I hope to share more as I come across them!

    Tim

  27. Liam Quade 14 years ago

    I’m currently on their Grid Service but I want to upgrade to their virtual servers. I’m just wondering what plan you are on now and how it’s all setup. As well as the average monthly and daily visitors you get. I’m just curious so I know if the virtual servers are right for me.

  28. Author
    Dave Seah 14 years ago

    Tim: Thanks for sharing! I actually just installed APC a few months ago myself!

    Liam: I’m on the Rage plan, though I think given the current level of Base (dv) 4.0 would be pretty adequate. The server hosts multiple sites, and I estimate that the total number of monthly pageloads is around 250,000 on average, serving a mix of WordPress and Phorum installations. I’m also using caching as well, which helps load. Otherwise, it’s a pretty ordinary (dv) configuration, tweaked to my standards. I also just installed APC, but I’m not sure it’s actually make much of a difference.

  29. Erik 13 years ago

    Thanks for the great writeup! I’ve been messing with DV3.5 for about a year now and have gone from base, to rage due to memory hogging plugins, back down to base. Memory issues don’t seem to be the problem anymore with my recent downgrade back to base, after optimization of mysql, installing memcached, and other tweaks. However, I can’t get rid of the QoS Alert “othersockbuf”.

    There isn’t much information out there on it so I was wondering what you knew? All I could find is that I should reduce the socket connections? But no info on how to do this.

    Any help would be awesome.

    Erik

  30. Author
    Dave Seah 13 years ago

    Erik: The information in Monitoring my Media Temple DV might help you track down the othersockbuf error. It’s related to interprocess communication. In my case, the problem was a very large table entry that exceeded the limit…it was a poorly written plugin. The article has more detail in it that I don’t quite remember :) I’ve also seen plugins do stupid things like read entire files into memory just so it could do a download count.