To improve performance of the SBGrid Web site I’ve been using Google’s Pagespeed Module for Apache. There is a module available for both Apache & NGinx, and it can improve the performance of a Web site using a number of methods such as minimizing the number of JavaScript and CSS files that need to be downloaded.
We were seeing random 404 errors on Google Pagespeed auto-generated JavaScript and CSS files on the SBGrid’s Web site. These would only occur after the Web server was running for 2 days or more.
The fix for us was to increase Pagespeed’s caches and to give the host (it’s a VM) more RAM.
These are the values that we set:
- ModPagespeedFileCacheSizeKb
- Set the target size (in kilobytes) for file cache.
- ModPagespeedLRUCacheKbPerProcess
- Set the total size, in KB, of the per-process in-memory LRU cache.
- ModPagespeedLRUCacheByteLimit
- Set the maximum byte size entry to store in the per-process in-memory LRU cache.
This is what we set them to:
ModPagespeedFileCacheSizeKb 102400 ModPagespeedLRUCacheKbPerProcess 1024 ModPagespeedLRUCacheByteLimit 16384
Use these with care and make sure that your host has enough RAM to fit everything into memory without paging.
Original Image from my Flickr Feed.
References:
- http://www.the-art-of-web.com/system/mod-pagespeed-settings/
- https://developers.google.com/speed/pagespeed/module/