How to reduce TTFB (Time to First byte) of my magento application?

↘锁芯ラ 提交于 2019-12-04 21:06:28

Just caches don't improve performance, they reduce hardware utilization for repeated requests.

While implementing the Will Farrell's other suggestions, you need to identify those parts of Magento code that are slow. For that, you will need to enable Magento Profiler – the built in Magento tool that lets you see what Magento is doing and on what it spends most of the page load time.

here is the details method how to enable and use Magento profiler:

http://tutorialmagento.com/how-to-reduce-time-to-first-byte-ttfb-and-speed-up-magento

The main changes to be made are:

  1. Gzipping Components (compression)
  2. Optimizing Images
  3. Using a content delivery network (CDN)
  4. Minifying your JavaScript and CSS
  5. Minimize the amount of HTTP requests

Before: 3.5 to 5.5 seconds (depending on time of day)

After: 1.5 to 2.5 seconds (depending on time of day)

Reference

Few things to get you started:

  • Enable Full Page Cache in Magento
  • Upgrade PHP: 5.7 is way should be able to cut the TTFB in half, if you're stuck using a lower version try adding HHVM. Checkout http://zsuraski.blogspot.ca/ for some benchmarks.
  • Add DB cache: memcached, redis for sessions, they're a life saver.
  • Remove DB logging. Magento loves to hit the DB
  • Use nginx to server you pages over apache
  • HTTP/2: As a bonus add in SPDY (soon to be replaced with HTTP/2, so keep an eye out)
  • Varnish server can be added between nginx and your php layer.

There are many more micro optimizations. A good goal is to have the page, above the fold, render in <100ms.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!