cancel
Showing results for 
Search instead for 
Did you mean: 

TTFB too high - howto read Code Profiler values

TTFB too high - howto read Code Profiler values

Dear Users,

 

TTFB from clients is between 300-450 ms on our magento1 shop:

 

Connection Setup TIME
Queueing
3.28 ms
Stalled
0.95 ms
Request/Response TIME
Request sent
0.12 ms
Waiting (TTFB)
484.61 ms
Content Download
1.21 ms
Explanation

 

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

apache2-mpm-prefork                2.4.10-10+deb8u7

sw-nginx                           1.11.1-debian8.0.16080

 

The setup is nginx -> apache2  with php-fpm

 

We use https only.

 

mysql is optimizied:

 

https://nopaste.me/view/0a2de1ca

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
Server: nginx
Date: Wed, 22 Feb 2017 06:30:14 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
X-Frame-Options: SAMEORIGIN
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
Vary: Accept-Encoding
X-Powered-By: PleskLin


real    0m0.418s
user    0m0.008s
sys    0m0.000s

 

Also enabled code profiler:

 

https://nopaste.me/view/880d96f9

 

Can anyone explain, howto reduce the times?

 

Thank you.

 

Stefan

5 REPLIES 5

Re: TTFB too high - howto read Code Profiler values

Do you realise that we know next to nothing about your store? We need quite a bit more information before anyone can help you:

 

  1. What version of Magento you're using?
  2. CE or EE?
  3. Cacheing, what do you use? FPC / Varnish / Redis, do you use any of these?
  4. What's your PHP memory limit?
  5. Do you use SSD or HDD drives?
  6. What effort you already made to speed up your installation?
Tanel Raja

Re: TTFB too high - howto read Code Profiler values

Magento is 1.9.2.2 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?

 

Thank you!

Re: TTFB too high - howto read Code Profiler values

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

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

Re: TTFB too high - howto read Code Profiler values

Why do you think your TTFB is too high?

300-450ms is good TTFB. In fact a fresh copy of Magento 1.9 will give you TTFB around that value.

Re: TTFB too high - howto read Code Profiler values

TTFB in ms - milliseconds

 

 

cheers

------------
MagenX - Magento and Server optimization