I've written a little about apache optimization, but here's me turning a shuddering system into something otherworldly...
Pre-environment (slow):
1) bl30p with both a mysql database and an apache server using the prefork multi-processing module (MPM).
2) ServerLimit 256 (the default)on apache
3) MaxClients 300 (tweeked)
4) mysql max_connections 300
The result of that: it didn't work. Only after stopping/starting apache - and paying attention to the output - did I realize why my connections were taking 10 seconds to serve me pages. You see, "ServerLimit" is a directive in "prefork" (and I think the other MPMs) which isn't even written in the httpd.conf file! And its default is 256. This FORCES MaxClients to go from 300, where I set it, to 256. So I shot that value up to 450 for both and....it still failed. Why?! Because mysql's "max_connections" was still at 300. Thus, we could get more apache hits, but there were too many for mysql. We increased that too and it worked.
Post-environment (faster):
1) bl30p with both a mysql database and an apache server using the prefork multi-processing module (MPM).
2) ServerLimit 450 (tweaked)on apache
3) MaxClients 450 (tweeked)
4) mysql max_connections 450
Wednesday, September 14, 2005
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment