2007-10-16 00:26:11
107 votes, rating 5.4
For a while now, I've been staring myself blind at what causes the lag I've seen on the site from time to time (usually at our peak times).. I checked CPU usage and didn't notice any long streaks of 100%, I checked disk reads and writes, with no significant access either way, and I checked bandwidth to the server (from within my LAN, that's pretty easy). Memory status was fine as well, so I just couldn't figure out what the problem was.. The server had more than enough resources to handle the load, but I still experienced lag.. I'm sure most of you who use the site at peak times (10pm to midnight server time) felt it as well...
Then I got reports of weird several-minutes-to-load-a-page lag again and looked at things again.. Same thing really. CPU wasn't overloaded, Memory status was fine, no massive disk thrashing, no significant bandwith congestion.
Did some searches for how to identify web server bottlenecks and randomly ran into a post mentioning some configuration settings I haven't looked at in ages (basically since the start of FUMBBL almost 5 years ago) and it dawned on me that these settings had the potential to create exactly the type of lag I have been experiencing lately.
I took a peek in the config, and the options were indeed set too low. After a quick reconfigure and web server restart, the site went back to the speedy "instant load" I'm used to. I hope that the rest of you also feel the difference.
All at the cost of a bit of searching online and a quick reconfigure. :)
Oh, and for those of you interested in what I did, I changed the options "KeepAliveTimeout" and "MaxClients". Those of you who this may be of interest to can just check the Apache documentation to see what these options actually do. I'm too lazy to explain it :)