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:
- Removing un-needed modules or parts from the linux kernel and recompiling it. Although, I’m not too thrilled about that.
- Tweaking Apache Config
- 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.
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.
TMPFS – Linux Memory Partition