Menu

Google Pagespeed 1.1 Performance with PHP

For the past week I’ve been testing out the performance of the new Google Pagespeed module for Apache, mod_pagespeed, and with the memory locking option turned on, the performance was a definite improvement for static pages. The fact is, though, there are much faster web servers for static content, and CDNs make scaling static pages very, every easy. Standard testing procedure, though, is to start as simple as possible, and test every variation separately. The next step, then is to test how Pagespeed works on dynamic pages.

As before, this new test uses our own corporate site, except now the pages use PHP to attach the header and footer. Calls to outside services like analytics were removed to concentrate the test just on this server, and the think time is 4 seconds per page.

  1. https://www.webperformance.com
  2. https://www.webperformance.com/load-testing
  3. https://www.webperformance.com/load-testing-services

The superficial reason for the performance is CPU load, which starts to consume the server at around 400 users.

Conclusions

I expected to see that mod_pagespeed added more overhead than running plain PHP. This was clearly not the case, since by around 450 users mod_pagespeed was markedly faster than the default. PHP has never been known for its high performance, which explains PHP accelerators like APC and Zend Optimizer. This is obviously not a comprehensive analysis, so its likely the performance greatly depends on page content. The only way to know what the effects will be on your server is to do a load test and compare.

Reproducing the Results

The server I used to test was an EC2 m1.large virtual server running Red Hat Enterprise Linux Server release 6.3 (Santiago). The mod_pagespeed module was installed via yum and used version mod-pagespeed-stable.x86_64 1.1.23.2-2258. Apache was configured to use mod_disk_cache and the following pre-fork MPM settings:


StartServers 20
MinSpareServers 25
MaxSpareServers 100
ServerLimit 8192
MaxClients 8192
MaxRequestsPerChild 10000


The test case consisted of these three pages from our site with the PHP removed so that PHP didn’t enter into the performance equation, configured for think times of 4 seconds and connection speeds of 5Mb/s:
https://www.webperformance.com
https://www.webperformance.com/load-testing
https://www.webperformance.com/load-testing-services

Note that I tried to use the worker MPM but could not get it to run with mod_pagespeed without crashes. You’ll want to be sure to apply these ulimit changes as well.

Add Your Comment

You must be logged in to post a comment.

Resources

Copyright © 2018 Web Performance, Inc.

A Durham web design company

×

(1) 919-845-7601 9AM-5PM EST

Just complete this form and we will get back to you as soon as possible with a quote. Please note: Technical support questions should be posted to our online support system.

About You
What you Need