TTFB from clients is between 300-450 ms on our magento1 shop:
We do not see any bottlenecks on our hardware (16 cores xeon, 132gb ram, intel enterprise ssds) with php 6.30, mysql/mariadb on debian8. we have only 15-20 users in shop at the same time so the server is almost all the time on idle. still TTFB is too high.
Server version: 10.0.29-MariaDB-0+deb8u1 (Debian)
php is 5.6.30-debian8.0.17012
The setup is nginx -> apache2 with php-fpm
We use https only.
mysql is optimizied:
I tested with a dedicatet host on same network to get complete page with:
time wget https://www.shop.tld -O test.html
this takes around 350-500ms and loads 92kb data.
root@static ~ # time curl -X GET https://www.shop.tld/
HTTP/1.1 200 OK
Date: Wed, 22 Feb 2017 06:30:14 GMT
Content-Type: text/html; charset=UTF-8
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Set-Cookie: frontend=30ip7qsaqp3ic6lap1um86ojd6; expires=Wed, 22-Feb-2017 08:30:14 GMT; Max-Age=7200; path=/; domain=www.shop.tld; HttpOnly
Set-Cookie: frontend_cid=GyTAADSWtGWw5vIE; expires=Wed, 22-Feb-2017 08:30:14 GMT; Max-Age=7200; path=/; domain=www.shop.tld; secure; httponly
Also enabled code profiler:
Can anyone explain, howto reduce the times?
Do you realise that we know next to nothing about your store? We need quite a bit more information before anyone can help you:
Magento is 22.214.171.124 CE.
We do not use of FPC / Varnish / Redis. Just the caching of files Apache/NGINX provides.
php memory limit is 512M
We use enterprise SSD drives.
We already did quite some mysql tuning/optimization. Disabled all unused services on the machine. Checked webservers to always have enough workers running.
Tried to put magento temp files on ramdisk. Tried to remove nginx and only have apache in place.
Can you recommend a FPC extension?
Of course, FPC extensions are must-have these days. But keep in mind that FPC extensions may not work properly out of the box; they are configured to work well with clean Magento, but if you have 3rd party modules, you'll probably need additional adjustments.
The best solution would be using Varnish, but it comes at some price. You'll need to properly configure it on your server, I recommend you configuration where NGINX is in the front of 80/443 ports for SSL offload, then Varnish, and then NGINX with PHP-FPM. But it may be overkill if you're doing everything on one server.
Easier solution for you is to buy https://mirasvit.com/magento-extensions/full-page-cache.html. I highly recommend it. Also, it's very easy to configure it since you'll have an option in admin panel to set controller paths which will be cached. Also, you can set various dependencies in cache.xml, for example, if you need welcome block cached separately for every user, you just add customer_id as a dependency. Easy as that.
There is also one free solution, you can find it at: https://github.com/GordonLesti/Lesti_Fpc. I don't have too much experience with that extension, I've done only 1-2 Magento websites in the past, it worked well, too.
If this response was helpful to you, consider giving kudos to this post.
If this response solved your problem, click accept as solution to help others solve this issue
TTFB in ms - milliseconds