Question

I am using pagespeed_console to monitor my ngx_pagespeed performance, and in the long run I'll use this data to finetune ngx_pagespeed.

https://developers.google.com/speed/pagespeed/module/console

Just two days and a couple of hits and my log size is 2.4mb.

I could be wrong but I dont think these pagespeed logs can be rotate using logrotate. Might break the whole thing?

Also I would like to know if anyone has any thoughs on performance impact of using pagespeed log and pagespeed console on a production server. It is a ec2 small running a few wordpress websites for my company. It runs nginx, apc, php5-fpm, fastcgi_cache and pagespeed console.

Best regards.

Était-ce utile?

La solution

AFAIK, writing the log should not cause performance problems. Let us know if you notice any.

You are correct that logrotate cannot be used for rotating the logs, instead mod_pagespeed uses its own logsize management. (Currently it just clears the file when it gets too big, but we may do log rotation etc. in the future).

You can control the max log size with pagespeed StatisticsLoggingMaxFileSizeKb, which defaults to 100MB in version 1.6 (I noticed this is not documented, I'll get documentation up for that soon). You can also increase the logging interval (thus decreasing the rate we fill the log) with pagespeed StatisticsLoggingIntervalMs, defaults to 1 minute (60000).

We recently discovered performance problems reading 10MB+ log files, so the new defaults will be 1MB max log size and log interval of 10 minutes. This only comes up when viewing the /pagespeed_console page, but can lead to upwards of 10s latency viewing that page with large log files. With the new defaults we should have only a 0.1s delay and still store about 2 weeks of logs.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top