Performance issues solved (for now!)

I’m delighted to say that the server is now zipping along very nicely.

First off I merged the excellent CherryPy Status Tool into my code. This quickly revealed that the performance problem was not with the pages that CherryPy was producing (and by implication MySQL was also in the clear).

I then had a suspicion that the it might be a network problem. But when I ran Apache benchmark from the localhost the server was still slow. I then tried running ab again but this time on an Apache server that was serving plain HTML - and this was also very slow!

It was now pretty clear that the problem was with Apache. I stared by enabling compression by using mod deflate. The statistics are very impressive for the speed-up.

This didn’t solve the problem for me, so the next step was to enable mod info so I could see what was happening. I also set ExtendedStatus On to give me a report that I could understand! The report was very clear, I had ran out of workers.

I was using the Debian default prefork MPM which had the MaxClients set to 20. I doubled this to 40 and suddenly the server began to fly!

I’ve now got some pretty cool tools set up for measuring my performance bottlenecks and I’ve also made some good optimisations so I think I’m all ready for lots more users.

Leave a Reply

You must be logged in to post a comment.