Question

Using Apache Bench, the home page of my site can only handle 0.42 requests per second. A simple phpinfo() page can handle 31.99 requests per second, which seems really slow for such a simple script. Obviously my home page handling 0.42 requests is not acceptable.

I'm running Apache 2.2 on Windows Server 2008. 4 GB RAM, 2.4 GHz Intel Xeon CPU.

The site is built on the PHP CMS Expression Engine with a MySQL database. Expression Engine has really aggressive page caching, so the home page is for all intents and purposes static (there is some processing going on, but it just ends up storing a static file on the hard drive). I have SQL caching turned on as well (200 mb allocated). When the page isn't cached, there is 84 queries on the home page, which doesn't seem too crazy.

Anyone have any obvious ideas as to how I can make this thing run better? Some kind of php.ini, my.ini or httpd.conf setting I should check out?

Was it helpful?

Solution

You can use a reverse proxy, like Varnish, because the fastest application is the application, that is not executed. Especially the ESI-Support is quite cool to speed up highly dynamic pages.

OTHER TIPS

That's pretty poor. On the machine I'm sitting at I get 42 pages/sec using ab -c 30 -n 1000 http://localhost/phpinfo.php and this is a much more basic machine which is doing lots of other stuff too. It is running Linux though ;)

Are you sure that the bottleneck is the PHP? If so, then try using an opcode cache. Apart from that it's the usual tuning process.

there is 84 queries on the home page, which doesn't seem too crazy.

OMG! Maybe not on your planet. If you're expecting any volume of traffic then you should be looking at ESI frames.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top