Specify a Vary: Accept-Encoding header
peter_booth at me.com
Mon Jul 24 07:23:38 UTC 2017
Right now this Rails website is almost too slow to tune, and so
you will need to make some radical changes that you might later choose to undo.
You should run the rails app in production mode, which, by default will cache everything.
That should give you th breathing room needs dto run other tools.
> On Jul 21, 2017, at 6:58 AM, Peter Booth <peter_booth at me.com> wrote:
> It looks as if the static content is being served by the Rails asset pipeline rather than directly by nginx
> and the impact is enormous. It took 25s for the base page - but it also took
> another 25s for the http://cryonics.org.au/assets/application.js <http://cryonics.org.au/assets/application.js> resource
> and another 20s for http://cryonics.org.au/assets/bg.gif <http://cryonics.org.au/assets/bg.gif>
> and another 20s for http://cryonics.org.au/assets/front.jpg <http://cryonics.org.au/assets/front.jpg>
> See https://www.webpagetest.org/result/170720_M2_1T8G/1/details/#waterfall_view_step1 <https://www.webpagetest.org/result/170720_M2_1T8G/1/details/#waterfall_view_step1> for a detailed breakdown.
> In some ways Rails is the antithesis of nginx. Whilst nginx is fast out of the box with default
> configuration, rails is stunningly slow without a lot of tweaking. There are many tools that
> can help with Ruby / Rails tuning.
> The one’s that I find most useful are New Relic - for its visualization of how slow vs fast
> requests vary, rack-mini-profiler and the bullet gem. I have heard good things about
> Skylight and about Scout but haven’t tried either myself.
> Good luck,
>> On Jul 20, 2017, at 8:45 AM, Richard Stanway <r1ch+nginx at teamliquid.net <mailto:r1ch+nginx at teamliquid.net>> wrote:
>> The issue is not with your page size or gzip (or anything nginx
>> related actually). Your Rails backend is generating the content far
>> too slow. You should investigate why your backend is so slow.
>> time_namelookup: 0.004209
>> time_connect: 0.241082
>> time_appconnect: 0.000000
>> time_pretransfer: 0.241121
>> time_redirect: 0.000000
>> time_starttransfer: 20.519778
>> time_total: 20.568794
>> On Thu, Jul 20, 2017 at 5:44 AM, Philip Rhoades <phil at pricom.com.au <mailto:phil at pricom.com.au>> wrote:
>>> I have moved my (very low hit) web sites from a Digital Ocean server to my
>>> own Fedora 25 x86-64 server with 8GB RAM and an ADSL2+ upload speed of only
>>> about 1Mbit/sec.
>>> The plain HTML and Jekyll sites response times are not too bad but the Rails
>>> sites are very slow.
>>> https://tools.pingdom.com <https://tools.pingdom.com/>
>>> takes more than a minute to test one of my Rails sites:
>>> http://cryonics.org.au <http://cryonics.org.au/>
>>> so it appears that I need to do something for all the Rails sites at least
>>> but ALL sites report a value of 50 or less for the condition in the Subject
>>> of this mail - I tried putting:
>>> gzip on;
>>> gzip_min_length 1100;
>>> gzip_buffers 4 32k;
>>> gzip_vary on;
>>> in the nginx server conf for cryonics.org.au <http://cryonics.org.au/> and restarted nginx but it did
>>> not make any difference.
>>> Suggestions about how to improve the situation?
>>> Philip Rhoades
>>> PO Box 896
>>> Cowra NSW 2794
>>> E-mail: phil at pricom.com.au <mailto:phil at pricom.com.au>
>>> nginx mailing list
>>> nginx at nginx.org <mailto:nginx at nginx.org>
>> nginx mailing list
>> nginx at nginx.org <mailto:nginx at nginx.org>
> nginx mailing list
> nginx at nginx.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nginx