<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">It looks as if the static content is being served by the Rails asset pipeline rather than directly by nginx </div><div class="">and the impact is enormous. It took 25s for the base page - but it also took </div><div class="">another 25s for the <span style="font-family: verdana, tahoma, helvetica; orphans: 2; widows: 2; background-color: rgb(255, 255, 255);" class=""><a href="http://cryonics.org.au/assets/application.js" class="">http://cryonics.org.au/assets/application.js</a> resource</span></div><div class="">and another 20s for <span style="font-family: verdana, tahoma, helvetica; orphans: 2; widows: 2; background-color: rgb(255, 255, 255);" class=""><a href="http://cryonics.org.au/assets/bg.gif" class="">http://cryonics.org.au/assets/bg.gif</a></span></div><div class=""><span style="font-family: verdana, tahoma, helvetica; orphans: 2; widows: 2; background-color: rgb(255, 255, 255);" class="">and another 20s for </span><span style="font-family: verdana, tahoma, helvetica; orphans: 2; widows: 2; background-color: rgb(255, 255, 255);" class=""><a href="http://cryonics.org.au/assets/front.jpg" class="">http://cryonics.org.au/assets/front.jpg</a></span></div><div class=""><br class=""></div><div class="">See <a href="https://www.webpagetest.org/result/170720_M2_1T8G/1/details/#waterfall_view_step1" class="">https://www.webpagetest.org/result/170720_M2_1T8G/1/details/#waterfall_view_step1</a> for a detailed breakdown.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">In some ways Rails is the antithesis of nginx. Whilst nginx is fast out of the box with default </div><div class="">configuration, rails is stunningly slow without a lot of tweaking. There are many tools that </div><div class="">can help with Ruby / Rails tuning.</div><div class=""><br class=""></div><div class="">The one’s that I find most useful are New Relic - for its visualization of how slow vs fast </div><div class="">requests vary, rack-mini-profiler and the bullet gem.  I have heard good things about </div><div class="">Skylight and about Scout but haven’t tried either myself. </div><div class=""><br class=""></div><div class="">Good luck,</div><div class=""><br class=""></div><div class="">Peter</div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On Jul 20, 2017, at 8:45 AM, Richard Stanway <<a href="mailto:r1ch+nginx@teamliquid.net" class="">r1ch+nginx@teamliquid.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">The issue is not with your page size or gzip (or anything nginx<br class="">related actually). Your Rails backend is generating the content far<br class="">too slow. You should investigate why your backend is so slow.<br class=""><br class="">            time_namelookup:  0.004209<br class="">               time_connect:  0.241082<br class="">            time_appconnect:  0.000000<br class="">           time_pretransfer:  0.241121<br class="">              time_redirect:  0.000000<br class="">         time_starttransfer:  20.519778<br class="">                            ----------<br class="">                 time_total:  20.568794<br class=""><br class=""><br class="">On Thu, Jul 20, 2017 at 5:44 AM, Philip Rhoades <<a href="mailto:phil@pricom.com.au" class="">phil@pricom.com.au</a>> wrote:<br class=""><blockquote type="cite" class="">People,<br class=""><br class="">I have moved my (very low hit) web sites from a Digital Ocean server to my<br class="">own Fedora 25 x86-64 server with 8GB RAM and an ADSL2+ upload speed of only<br class="">about 1Mbit/sec.<br class=""><br class="">The plain HTML and Jekyll sites response times are not too bad but the Rails<br class="">sites are very slow.<br class=""><br class="">Using:<br class=""><br class="">  <a href="https://tools.pingdom.com" class="">https://tools.pingdom.com</a><br class=""><br class="">takes more than a minute to test one of my Rails sites:<br class=""><br class="">  <a href="http://cryonics.org.au" class="">http://cryonics.org.au</a><br class=""><br class="">so it appears that I need to do something for all the Rails sites at least<br class="">but ALL sites report a value of 50 or less for the condition in the Subject<br class="">of this mail - I tried putting:<br class=""><br class="">  gzip on;<br class="">  gzip_min_length  1100;<br class="">  gzip_buffers  4 32k;<br class="">  gzip_types    text/plain application/x-javascript text/xml text/css;<br class="">  gzip_vary on;<br class=""><br class="">in the nginx server conf for <a href="http://cryonics.org.au" class="">cryonics.org.au</a> and restarted nginx but it did<br class="">not make any difference.<br class=""><br class="">Suggestions about how to improve the situation?<br class=""><br class="">Thanks,<br class=""><br class="">Phil.<br class="">--<br class="">Philip Rhoades<br class=""><br class="">PO Box 896<br class="">Cowra  NSW  2794<br class="">Australia<br class="">E-mail:  <a href="mailto:phil@pricom.com.au" class="">phil@pricom.com.au</a><br class="">_______________________________________________<br class="">nginx mailing list<br class=""><a href="mailto:nginx@nginx.org" class="">nginx@nginx.org</a><br class="">http://mailman.nginx.org/mailman/listinfo/nginx<br class=""></blockquote>_______________________________________________<br class="">nginx mailing list<br class=""><a href="mailto:nginx@nginx.org" class="">nginx@nginx.org</a><br class="">http://mailman.nginx.org/mailman/listinfo/nginx<br class=""></div></div></blockquote></div><br class=""></body></html>