Around we go

So, it looks like I’ve gone full circle.

About a week and a half ago, I noticed some major increases in response times from my server.  Even when working in the terminal.  Any command had a 5 second delay from when it executed.  My site wouldn’t load in under 10 seconds.  It was timing out when checking my email, and I was getting error emails sent on the various processes I was running.  

After a few days of this, I bit the bullet and upgraded from an OpenVZ package to a Xen HVM package.  OpenVZ has the drawback of when you setup the virtual machine containers, if you bork one setting, everyone on the node suffers.  It’s possible that someone else’s container was doing something they shouldn’t have done (like running a Java application), or just a REALLY high traffic site.  Don’t get me wrong, OpenVZ is a good system, it just failed me, so YMMV.  Regardless, moving to Xen assured me my own dedicated resources (i.e. processor, physical allocation of memory, physical allocation of hard drive).  It truly runs like a dedicated server (on low resources, lol).  It even has it’s own kernel package (which can be frustrating as hell, let me tell you).

When I moved packages, I also decided to move to Debian.  Debian is the base for Ubuntu, and tends to be a *little* more up to date in terms of it’s packages compared to RHEL/CentOS.  I really like RHEL-based distros, but the archaic nature of the package manager is a bit disconcerting sometimes.  Debian and RHEL are the predominant Linux packages for server deployment – everything else runs in 6-12 month release cycles.  Debian and RHEL have major upgrades every few years.

I’m finding that I really like Debian so far.  One of the great things is the apache2-mpm-itk module.  Under RHEL, in order to have users set up with their own files served through apache (really more of the advanced stuff, like PHP), I had to use suPHP or suEXEC to run PHP.  Not terribly fast, and neither of those methods seemed to want to unload from memory with any urgency.  ITK seems to have solved that for now.

ITK is based on the popular mpm-prefork package, which “forks” another apache process to serve pages.  Where itk differs is that it forks it as the user who owns the files.  Meaning, apache runs as user mike when it serves a php page owned by mike.  This is important from the standpoint that it doesn’t require a ton of configuration, specific file ownership, or anything else like that.  It requires a single line in the VirtualHost configuration file identifying the user and group.  That’s it!

This also makes life simple from the standpoint that it won’t affect “system” type of applications (like phpmyadmin), which are fine to be served by the default user account that runs apache.

All in all, I can’t complain so far.  One or two minor hiccups along the way, but otherwise, I’m set.  =)