Instant optimization problems

72 views
Skip to first unread message

wdarin s

unread,
Jul 7, 2017, 2:04:39 AM7/7/17
to mod-pagespeed-discuss
Hi all, I have a problem with mod_pagespeed. It work fine but after 3 times page refresh...how this can be solved?? I think that cached files are somehow removed or something else. Here's how I tested it:
Here are my google page speed insights tests:

1. First run of test: ~10 mobile and 0 on desktop
2. Second test after 30 sec. ~40 mobile, ~20 desktop
3. Third test after 30 sec. ~76 mobile and 90 on desktop
All other tests after this gives me the same result as third test.
I don't know how to make third result to be all the time I run the test.

Otto van der Schaaf

unread,
Jul 7, 2017, 2:43:03 AM7/7/17
to mod-pagespeed-discuss
Hi,

That is expected behaviour, as mod_pagespeed works with a deadline and may produce partially optimized results instead of making the visitor wait for background optimizations to complete. Having said that, it is possible to tune.

You need to configure LoadFromFile.

Subsequently, for in-place-resource-optimization:

ModPagespeedInPlaceWaitForOptimized on
ModPagespeedInPlaceRewriteDeadlineMs 10000

And for regular optimization:
ModPagespeedRewriteDeadlinePerFlushMs deadline_value_in_milliseconds

Otto


--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/06bea979-a424-44c0-965d-dc4ddb670311%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

wdarin s

unread,
Jul 7, 2017, 3:40:45 AM7/7/17
to mod-pagespeed-discuss
Yup, that solved the problem with images conversion and compression but gives me a huge server response time )) which is also bad... :-(

пятница, 7 июля 2017 г., 9:43:03 UTC+3 пользователь Otto van der Schaaf написал:
Hi,

That is expected behaviour, as mod_pagespeed works with a deadline and may produce partially optimized results instead of making the visitor wait for background optimizations to complete. Having said that, it is possible to tune.

You need to configure LoadFromFile.

Subsequently, for in-place-resource-optimization:

ModPagespeedInPlaceWaitForOptimized on
ModPagespeedInPlaceRewriteDeadlineMs 10000

And for regular optimization:
ModPagespeedRewriteDeadlinePerFlushMs deadline_value_in_milliseconds

Otto


On Fri, Jul 7, 2017 at 8:04 AM wdarin s <zara...@gmail.com> wrote:
Hi all, I have a problem with mod_pagespeed. It work fine but after 3 times page refresh...how this can be solved?? I think that cached files are somehow removed or something else. Here's how I tested it:
Here are my google page speed insights tests:

1. First run of test: ~10 mobile and 0 on desktop
2. Second test after 30 sec. ~40 mobile, ~20 desktop
3. Third test after 30 sec. ~76 mobile and 90 on desktop
All other tests after this gives me the same result as third test.
I don't know how to make third result to be all the time I run the test.

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

Otto van der Schaaf

unread,
Jul 7, 2017, 5:55:16 AM7/7/17
to mod-pagespeed-discuss
The module's default is to optimize the experience for your visitor, to not have them wait for optimizations to complete. The caches will warm up and optimizations should reach a steady state fairly quickly, if the site sees some actual traffic. 

Could you perhaps explain why it is bad that you may need to run PSI a couple of times before seeing the final score?

Otto

To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/45777e51-6bb1-433e-a073-1cfc4e639034%40googlegroups.com.

wdarin s

unread,
Jul 7, 2017, 6:17:01 AM7/7/17
to mod-pagespeed-discuss
Because the person who owns the site doesn't get it. He say that first result is the correct one. So other next results are not the one we should look at. He want that after first result the page show >90 points.

пятница, 7 июля 2017 г., 12:55:16 UTC+3 пользователь Otto van der Schaaf написал:
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

Otto van der Schaaf

unread,
Jul 7, 2017, 6:28:10 AM7/7/17
to mod-pagespeed-discuss
I see. So if you could somehow apply these settings only for the pagespeed user-agent, you could have both a happy site owner and happy visitors, right?  

I think that it is possible to achieve that with ngx_pagespeed with its script variable support [1], but I'm not sure if it can be accomplished with mod_pagespeed today.


Otto

To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/8449cb13-efbc-44d2-a0b6-0d964920c0f7%40googlegroups.com.

wdarin s

unread,
Jul 7, 2017, 7:37:00 AM7/7/17
to mod-pagespeed-discuss
Yes, but maybe there is some option to keep those good results cached on my server for a longer time. Right now cached and optimized page resources are kept only for about one hour. If I run same test after aprox. one hour the result are again bad. So I was thinking maybe there are some options that I need to set in order for mod_pagespeed that after the resources are cached and optimized, give those cached resources to users. This way solving the problem should work but I don't know if the cached page is not user individually stored and not system wide.

пятница, 7 июля 2017 г., 13:28:10 UTC+3 пользователь Otto van der Schaaf написал:
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

Otto van der Schaaf

unread,
Jul 7, 2017, 8:25:51 AM7/7/17
to mod-pagespeed-discuss
If you do not have LoadFromFile configured, pagespeed will fetch its inputs via http(s) and respect any cache TTL the origin specifies. To keep optimizations cached for a long time, you should either modify the http cache TTL to specify a long expiry, or set up LoadFromFile (in which case optimizations will be cached until a change is detected).

Additionally, you may have to check if the cache is sized OK:


(It's also good to set up the admin pages to keep an eye on cache health: https://modpagespeed.com/doc/admin#config).

Hope this helps!

Otto

To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/b2d5b56c-67f5-47e9-9b60-56fed8f507ae%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages