mod_pagespeed - internal cache purge issue - pagespeed

I use mod_pagespeed on my Nginx-Webserver.
When I try to test some of my pages with Google Pagespeed Insights(https://developers.google.com/speed/pagespeed/insights) there are:
1) Many errors shown the first time I do this, when the page is not opened manually with a browser before.
2) At the second scan - or if I open my page manually with a browser before - Google Pagespeed Insights shows me 90+% instantly.
Some of my sites do not have very large traffic, cause they are niche specific. I do this speed-optimation mostly for ranking purpuses. Now I am worried that Google doesn't see the 90+% when they test my site, because the first scan shows 70-80% and many errors...
Ok... so I think mod_pagespeed purges its internal cache after a while and when the first one opens the site there are no optimized files and because optimation takes to much time, the first user gets some files without full optimation. Right?
My approach nr.1:
I have done some optimation so keep the cache for 12h, but my tests show me that it doesn't work. Are here any mistakes in my attempt?
#experimental mweber 400mb 12h
pagespeed FileCacheSizeKb 409600;
pagespeed FileCacheCleanIntervalMs 43200000;
pagespeed FileCacheInodeLimit 500000;
My approach nr.2:
My hoster give me the advice to warm up the cache with a wget-script, which opens my pages from time to time. I tried that but it doesn't show any effect, so are there any requirements or parameters I have to use with wget, so mod_pagespeeed starts optimation of files?
Would be great to get some tipps and advices from you! ty :)

wget will not trigger any caching, if caching was only triggered via request then wget would not access the files to trigger them anyway as it does not process html to trigger requests on the assets.
Why are you clearing the cache so soon?

Related

Wordpress site slow at random intervals

I have a WordPress site hosted in a server. I also verified the server configs everything is perfect. No space or ram issues.
When I start to load my site URL. In my networks tab, I see that the first request was "instant-loan/" which took 1min and rest all requests come faster after that. Ofcourse they loaded from cache in the image I shared but if I open in incognito also the rest of the requests are in miliseconds. This happens in all pages,
What could be the issue here? I have been searching for a possible cause for a very long time.
I have performed a site performance test in google insights and GT. They both gave the same below results:
Page loading: 35sec.
They only say to optimize images and js content.
The total page size is 6mb.
214 requests are beeing processed.
[NEW EDIT]
Below is the performance result. It shows a lot of idle time and js image rendering seems to happen quite fast. A max of 4 sec to render, load the site. Thus I assume there is something wrong with the server. I have minified CSS and JS. Also, use compressed images only. Is this because of any mysql connection issue ?? Has anyone faced it?

how to fix Enable compression for t.dtscout.com/…i google insights

I'm try to optimize my site & get a good score in Google insights Test
But Now it's showing this
Enable compression for the following resources to reduce their transfer size by 1.1KiB (55% reduction).
Compressing http://t.dtscout.com/…i/?l=http%3A%2F%2Fkatmoviehd.co.in%2F&j= could save 1.1KiB (55% reduction).
Hide details
Test Site - KatmovieHD.co.in/
Gzip compression is already enabled and I don't know how to Fix this Issue ..
Issue Image
Simply remove Histats counter from your website and then the problem will be solved. Histats uses a very aggressive tracking system that can cause your page sometimes to load forever although your website has already loaded. Not to mention other downsides like some antiviruses that can block access to your website. I highly recommend Google Analytics as they do provide same features and even more.

First Byte Time scores F

I recently purchased a new theme and installed wordpress on my GoDaddy hosting account for my portfolio. I am still working on it, but as of right now I sometimes get page load speeds of 10-20seconds, and others 2 seconds (usually after the page has been cached). I have done all that I believe I can (without breaking the site) to optimize my performance speed (reducing image sizing, using a free CDN, using W3 Total Cache, etc).
It seems that my main issue is this 'TTFB' wait time I get whenever I go to a new page that hasn't been cached yet. How I can fix this? Is it the theme's fault? Do I NEED to switch hosting providers? I really don't want to go through the hassle of doing that and paying So much more just to have less than optimal results. I am new to this.
My testing site:
http://test.ninamariephotography.com/
See my Web Page Results here:
http://www.webpagetest.org/result/161111_9W_WF0/
Thank you in advance to anyone for your help:)
Time To First Byte should depend on geography. I don't think that's your problem. I reran your test and got a B.
I think the issue is your hosting is a tiny shared instance, and you're serving static files. Here are some ideas to speed things up.
Serve images using an image-serving service. Check out imgix which is $3/m. It could help in unexpected ways serving images off an external domain depending on HTTP protocol version and browser version, and how connections are shared.
Try lossy compression. You lose some image detail, but you also lose some file size. Check out compressor.io for an easy tool.
Concatenate and minify scripts. You have a number of little javascript files that load individually. Consider joining them together and minifying. I don't know the tool chain for Wordpress, perhaps there's a setting?
If none of that helps, you should experiment with different a hosting choice.

Quickiest way to determine why a site is sluggish?

I just picked up a client who's Wordpress web site takes anywhere between 8 to 22 seconds to START loading. The loading delay also occurs when using the Wordpress backend so I'd like to fix the loading issue first before starting my work (template re-design). What's the quickest yet efficient way to determine why this Wordpress site is taking so long to start loading?
Thanks in advance
P.S. - They currently have a caching plugin installed (WP Super Cache) which I assume the previous web developer installed to help with the loading issue but it only helps with the front-end and not the back-end.
Try to run some test like YSlow and Google Page Speed and read their results and suggestions.
Google Speed Online is helping me a lot with analysis of my websites.
http://pagespeed.googlelabs.com/
I use browsermob. They use real browsers to test the site load performance. Shows very nice graphs showing how long each and every request took. Also shows how many requests happen in parallel. As they use real browser, you can see how long it will take to load on a real browser. Then you can choose from which location you want to test. You can choose a UK location to test how fast your page loads from UK.
By the way, I am in no way related to browsermob. I just happen to be a satisfied user of this.
And it is free.
Your server is probably loading far too many modules and is thrashing the disks as it's run out of memory.
You need to both reduce how much memory each PHP instance consumes and limit how many PHP instances can run simultanouesly to ensure you don't use virtual memory for your PHP instances.
I've written a detailed answer to a very similar problem here on Stack Overflow:
How can I figure out why my Wordpress pages load so slowly?
Well, i have came across a similar situation, such things happen when your website is hosted on a GridHosting server, which means it changes according to the server load, but sometimes the things are just opposite the scenario, the best way to check why it is slow is to first ping the website at random interval , so in this way you will know if the distance is the cause or the packet dropping is the issue, secondly, you need to make sure your server's configurations is good, i.e; request your host about a RAW log of your website, in this way you can know what is it taking long for your server to response, and the least best method is to check and make sure that your DNS resolves in a good time, and try to use some free CDN services like CloudFlare.
Hope this helps.

Very large drupal page execution time

I'm on VPS hosting with dreamhost and am experiencing very high page load times. Here is the output from Devel module for mysql queries.
Executed 190 queries in 227.67 milliseconds. Page execution time was 21969.43 ms.
Using the module profiling at http://2bits.com/articles/measuring-memory-consumption-by-drupal-bootstrap-and-modules.html it seems ok:
total: 304.15
So if the modules are taking 304ms and the mysql is taking 227ms, where could the other 21 seconds be going?!
Here is the url http://5oup.net
As always any help very much appreciated!
James
You are not compressing your JavaScript of CCS files, it shouldn't be the cause to such a slow page load. It seems that you have your site setup for development mode, which is quite ineffective for a production site.
I tried browsing around, and I didn't find any page that was as slow as you describe. But the point above is a major point for performance improvement.
Some ad hoc testing on the home page gives me about 8-12 seconds per request (forced reload to exclude local caching). According to firebug, the biggest waits are due to loading all the images for the rotation, closely followed by the separate and uncompressed css and js files.
With local caching, this goes down to 1-4 seconds, with most of the time being spent on waiting for the server to actually respond with a '304 - not modified' for all the files involved.
So your first goal should be reduction of the number of separate files:
For the js and css files, combining them into single files and turning on compression should already help quite a lot - check your site settings under admin/settings/performance.
For the rotation images, this would require more work, as you would either have to combine them into a sprite or add the logic to only load one with the page itself and pull the additional ones later on via js.
You should try the css/js combination first and see if you really need more tweaking after that.
I found the very high page load on the home page was down to simplexml_load_file(), which for some reason was not enabled on my host.

Resources