0

I am working with Cart2cart to import a large catalog of products. We have so far done a demo migration of 2 configurable products and about 2k simply products that are associated with them.

Before going ahead with the full import I noticed that the site was slow to load initially. I did some tests and found that the ttfb was the longest portion and consistently 2 seconds or a little more than 2 seconds. the total time to load the page for the first time according to tests is between 8 and 12 seconds.

I changed the magento mode to production mode, and that seems to have taken about 0.7 seconds off the ttfb (it was about 2.7 seconds before).

This is a very vanilla install of magento 2.1.5. The only customization has been the product import.

I uploaded a test txt file to check if it was the server and it loads instantly and has no ttfb for all test websites so it is not the server I don't think (I have asked the host as well and they told me it is not the server and that I can check using this txt method).

Another thing, after loading the webpage/product page for the first time reloading it is very fast, but still is 2 seconds for the TTFB.

Before going ahead with more customization and the full product catalog import I wanted to see if there was anything I can do to bring down that TTFB? I imagine after the database is much larger and the website is using a theme, with more addons things will only get much worse.

What else can I do?

1
  • there are lots of things to check, but , there is no information about your webstack.
    – MagenX
    Commented Mar 9, 2017 at 12:20

1 Answer 1

2

basically there are many things you can do without throwing more hardware in.

just to name some basics

  • use php7
  • use production mode
  • use redis for session storage and backend cache
  • use varnish for fullpage cache or if you cant use redis also

for cached pages we have a TTFB of 30 to 100 ms on staging system with 1 CPU and 2 GB RAM, althouth mostly less then 500 MB of RAM are utilized

but honestly even without redis and varnish 2 seconds seem really long. do you already have any custom extensions?

8
  • Thanks for the reply David, Is PHP 7 stable with Magento 2? We are currently on 5.6.30. I switched to product mode and am still getting a 2-3 second ttfb. Our host is Nexcess and we are on the starting shared hosting plan SIP 100 which I believe is plenty powerful enough for such a basic setup. There are no custom extensions unless maybe the cart2cart import uses something I am unaware of. here is a link to my last test: gtmetrix.com/reports/gostwear.nextmp.net/vL5LSusz
    – Sackling
    Commented Mar 7, 2017 at 18:49
  • yes, magento2 supports php 7.0.x (not 7.1.x yet) and it gives a really huge performance boost for php. Still, when a page is cached, it should be faster. Basically I would say, that nexcess knows what they are doing, but if they did not recommend you to switch to php7, they consulted you really bad. Commented Mar 7, 2017 at 18:52
  • I will ask about 7.0, I can actually make the change myself from the nexcess admin panel but will confirm with them first. My initial request was for them to enable gzip which they did. I have varnish cache enabled in admin with TTL at 86400. Css and JSS minified and combined.
    – Sackling
    Commented Mar 7, 2017 at 19:03
  • Switching to 7.0 seems to have given a pretty nice jump in page load time. TTFB is still pretty high at 0.9 seconds on the low size and 1.5 on the high now but on a whole a big improvement so thank you for recommending that. The person I have a ticket with said I can switch but that it would not have a big effect, which I think was incorrect it had a pretty large effect. He said that Magento 2 is still in a state of development and that we would basically have to live with the long ttfb until things improve in that regard.
    – Sackling
    Commented Mar 7, 2017 at 20:33
  • Sorry to pile on, I'm not sure anyone will even read this lol but gtmetrix has been reporting the lack of gzip, so has google page insight. I know that it is enabled but it looks like certain files are not being gzipped for instance the minified JS is a big culprit. Is there anything that needs to be done to gzip the minified files?
    – Sackling
    Commented Mar 7, 2017 at 21:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.