0

I configured pagespeed to cache js and css files to improve server performance. But sometimes server loads and performance lag is quite visible. So want to tune pagespeed. I increased pagespeed's ModPagespeedFileCacheSizeKb configuration from 100KB to 512KB. After doing this the cleanup frequency reduces (once in every 5 hrs). Below is the pagespeed log:

[Wed Apr 30 16:06:37 2014] [info] [mod_pagespeed 1.3.25.4-2941 @25845] File cache size is 526295040 and contains 62559 inodes; no cleanup needed.
[Wed Apr 30 17:11:56 2014] [info] [mod_pagespeed 1.3.25.4-2941 @4420] File cache size is 553115648 and contains 65117 inodes; beginning cleanup.
[Wed Apr 30 17:12:02 2014] [info] [mod_pagespeed 1.3.25.4-2941 @4420] File cache cleanup complete; freed 150609920 bytes
[Wed Apr 30 18:12:19 2014] [info] [mod_pagespeed 1.3.25.4-2941 @14154] File cache size is 448905216 and contains 54087 inodes; no cleanup needed.
  1. My question is how to measure the correct cache size so that no cleanup from the pagespeed is needed ??

  2. Why there is incremental cache and inode size on every cleanup call? what does it signify?

Ladadadada
  • 26,337
  • 7
  • 59
  • 90

1 Answers1

1

Look in your pagespeed.conf file, there are some control/monitoring panels built in that you can enable and access. It gives you usage statistics which you'll find useful for tuning those parameters.

See these around line 286 onwards;

    # This page lets you view statistics about the mod_pagespeed module.
<Location /mod_pagespeed_statistics>
    Order allow,deny
    # You may insert other "Allow from" lines to add hosts you want to
    # allow to look at generated statistics.  Another possibility is
    # to comment out the "Order" and "Allow" options from the config
    # file, to allow any client that can reach your server to examine
    # statistics.  This might be appropriate in an experimental setup or
    # if the Apache server is protected by a reverse proxy that will
    # filter URLs in some fashion.
    Allow from all
    #Allow from 127.0.0.1
    SetHandler mod_pagespeed_statistics
</Location>

# Enable logging of mod_pagespeed statistics, needed for the console.
ModPagespeedStatisticsLogging off

<Location /pagespeed_console>
    Order allow,deny
    Allow from all
    #Allow from 127.0.0.1
    SetHandler pagespeed_console
</Location>

Also, if you're tuning server performance, using file based caching is slow as the filesystem is by far the biggest bottleneck in performance. Instead, install Memcached server if you can, as Pagespeed has built in support for it and will give you an instant and fairly massive performance boost.

    ModPagespeedMemcachedServers localhost:11211
i-CONICA
  • 648
  • 1
  • 9
  • 22