Optimizing Apache

Before I get into the specifics of why I’m a complete dumbass, I want to say that I’m not always this dumb. Sometimes you research a problem, settle on a few things to test and implement them only to find out the real problem is how stupid you are. The following entry describes how I “optimized” our web server at work.

Like all problems it started with a trip to Google and lots of reading. The following are great introductions to tuning Apache.

  1. Performance-tuning Apache is a brief HOWTO on simple steps you can take to get load under control.
  2. A short Google Answer thread on KeepAlive and KeepAliveTimeout that gives some insight into those directives.

After making appropriate changes to my httpd.conf and reloading Apache I saw a slight dip in load from about 10 to 7. Still, I thought, it was way too high for the hardware we were running on. A few more tweaks and I got the load down to 6. After some more discussion with a friend I decided to sanity check myself and see if both processors were being used by Linux.

A quick check of /proc/cpuinfo resulted in a big slap on the forehead – I had not installed the SMP enabled kernel. I had an entire CPU sitting idle. I quickly installed my SMP kernel and rebooted to find the load dropped to a mere 1.5.

For the non-geeks out there I’ll translate: Joe is a moron.

2 thoughts on “Optimizing Apache

  1. I should laugh here, but have done similarly stupid things in the past. So I will just say, “Glad to see you’re server is a bit more controlled now.”.

    Now you should think about getting a test server setup so you can do custom recompiles of EVERYTHING. It would be nice to see that box running under 1.5 … (And hey, if you are feeling really brave, you could try out some of those Apache source modifications.)

    Hope it continues to run well!

    ~R

Leave a Reply

Your email address will not be published. Required fields are marked *