• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Really high TTFB as of late

UnS3eN

Basic Pleskian
Hi Guys,

Getting really high Time-To-First-Byte as of late. Sometimes over 40 seconds (even from localhost):
Code:
# curl -s -w '\nLookup time:\t\t%{time_namelookup}\nConnect time:\t\t%{time_connect}\nSSL handshake time:\t%{time_appconnect}\nPre-Transfer time:\t%{time_pretransfer}\nRedirect time:\t\t%{time_redirect}\nStart transfer time:\t%{time_starttransfer}\n\nTotal time:\t\t%{time_total}\n' -o /dev/null http://domain.tld/

Lookup time:            0.054
Connect time:           0.054
SSL handshake time:     0.000
Pre-Transfer time:      0.054
Redirect time:          0.000
Start transfer time:    41.255

Total time:             41.312

Have about 50 Wordpess sites on it and 5 HTML sites served by Apache/Fast-CGI. No issue on the HTML sites, only the Wordpress sites are affected, even just blank installs with nothing in them. Setting up nginx proxy doesn't improve things by a lot.

Host: VMware 5.5.0
Guest: CentOS 6.9 (Final)
Plesk: Onyx Version 17.5.3 Update #44
CPU: Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz (8 vCores allocated)
RAM: 12GB
vNIC: VMXNET 3

Any thoughts on the matter? I already lost track of things I tried so far, so a fresh pair of eyes/brain would be appreciated.
 
Experimented a bit with FastCGI and FPM - setting the hosting options to serve all content via nginx with FPM seems to dramatically improve the TTFB times:

Code:
# curl -s -w '\nLookup time:\t\t%{time_namelookup}\nConnect time:\t\t%{time_connect}\nSSL handshake time:\t%{time_appconnect}\nPre-Transfer time:\t%{time_pretransfer}\nRedirect time:\t\t%{time_redirect}\nStart transfer time:\t%{time_starttransfer}\n\nTotal time:\t\t%{time_total}\n' -o /dev/null http://ckp-dev.plesk.4pm.ie/

Lookup time:            0.002
Connect time:           0.002
SSL handshake time:     0.000
Pre-Transfer time:      0.002
Redirect time:          0.000
Start transfer time:    0.027

Total time:             0.029

Is apache really this bad at handling multiple wordpress sites at the same time? Seem a bit bizarre there is so much improvement when switching to FPM.
 
Checking your site here > Pingdom Tools
looks like you need to turn on caching, fix your header and other items.

Wordpress, even on a heavy theme should take under 500ms to load using Plesk with Apache/PHP-FPM.

Disable caching in WP plugins and handle things from the server side for a major improvement.

Lastly, once you get things in order and you've got an ssl on your site, force http/2 to increase speed to under 200ms.
 
I use WP Rocket and the rocket-nginx config along with http/2, nginx PHP-FPM and redis object cache. No issues with performance and get good pingdom, google page speed insights and gtmetrix scores. I suggest this setup :).

Lookup time: 0.012
Connect time: 0.013
SSL handshake time: 0.206
Pre-Transfer time: 0.206
Redirect time: 0.000
Start transfer time: 0.265

Total time: 0.272
 
Back
Top