1 Mar 2009

A Question of Speed and Technological Progress


At my company, we have some really old web servers that host our website. They are from late 2004 and early 2005. Now, at the time, I am sure they were quite expensive.

Recently, we wanted to move to newer web servers and we bought the basic Dell R200 rack servers. Now, arguably they are quite cheap, but thinking about it they will definitely be faster then 4 year old servers, right?
Well, that’s what my predecessor thought when he bought those servers and I myself didn’t think about it till we wanted to start using them.

We noticed that the new servers are at least twice as slow as old servers and that just completely baffled us. No one saw it coming. I mean, the old servers are optimized and tweaked and the new servers just have an un-tweaked but clean install of Ubuntu server with apache.

So what’s going on exactly? How is it that when hardware is so cheap and supposedly so fast, that we now have to spend some time going into configurations, messing around with things, benchmarking and basically spending man hours on something that is supposed to be quite basic. I mean, I even used my cure-all method and threw some memory at the new servers to get them to 8Gb and it still didn’t work.

Anyway, so now we have to start spending time on speeding up the servers. Things that have been suggested were:
  1. Removing un-needed modules or parts from the linux kernel and recompiling it. Although, I’m not too thrilled about that.
  2. Tweaking Apache Config
  3. And my suggestion which was put everything in memory with TMPFS. Again, I like memory, I’m from a MySQL background.

From my experience, PHP isn’t usually the bottleneck. So I need to look at the whole puzzle to see where the bottlenecks are.

For my part, I have looked at the MySQL server and we also monitor it with Nagios. I am not seeing any particular slowness from it and Nagios isn’t telling me that its being overused, but I guess I could still run some benchmarks on it.

Anyway, it’s a big mystery to us why it is as slow as it is compared to some 4 year old servers. Granted, the servers we have now are quite inexpensive, but we are still very surprised.


Conclusion

Moore`s law doesn't apply to web servers and cheap hardware will always be cheap.

I’ll leave some links that I found recently and we will try to use them to speed up the web servers.

Slashdot Effect
Apache Tweaks

TMPFS – Linux Memory Partition






2 comments:

  1. The Dell R200 Server are a piece of junk!

    We have bought one(unfortunately) and now found the best thing to do with it(except for getting rid of it) was to make it a telephony PBX(asterisk)for three users...

    ReplyDelete
  2. Wow what a sad sounding story! I still don't understand why the latest fad the last 4-5 years has been to move towards linux distributions that most resemble windows.

    I've run servers on almost every flavor of linux and BSD, if all you need your server to do is be a web server, than nothing can beat openBSD, but the fastest I've seen is one of the optimized distributions, arch-linux is probably the fastest, gentoo is bloated but can be trimmed down however you like..

    I've found that when there is a speed issue like this, where you KNOW it's much faster, its never the hardware and always a configuration issue.

    The best way to deal with servers is start with a totally clean and lean install, then install apps AS NEEDED and only when needed, much better security this way also.

    A lot of the new linux stuff is very very slow as they are right in the middle (going on 2 years) of the biggest kernel/hardware transition ive seen.. a LOT of the newer stuff is bloated and needs refactoring..

    ReplyDelete