Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
litespeed_wiki:ttfb [2018/11/12 16:32]
Erwin Venekamp [High resource usage]
litespeed_wiki:ttfb [2018/11/12 16:40]
Erwin Venekamp [Insufficient caching]
Line 13: Line 13:
  
 ===== Many queries ===== ===== Many queries =====
-Your TTFB may be high if your website makes very many database queries, or consists of very unoptimized application code (such as PHP). A common example of this is WordPress websites that use dozens of plugins. If possible, look into reducing the workload for your application. Caching may also help alleviate this: consider using [[litespeed_wiki:​cache:​|LiteSpeed Cache]] if you aren't already.+Your TTFB may be high if your website makes very many database queries, or consists of very unoptimized application code (such as PHP). A common example of this is WordPress websites that use dozens of plugins. If possible, look into reducing the workload for your application ​by disabling plugins or unnecessary features.
  
 +===== Insufficient caching =====
 +Caching is a good idea for almost all database-driven applications:​ serving a cached version of a dynamic page will lead to a vastly reduced workload, and improved TTFB. This is especially beneficial if your website has many database queries that can't be avoided or reduced.
 +
 +LiteSpeed offers one of the most effective caching plugins for many popular CMSes: [[litespeed_wiki:​cache:​|LiteSpeed Cache]].
 ===== Slow databases ===== ===== Slow databases =====
 For database-driven websites, a high TTFB can be caused by a slow database. There can be several reasons for this: most commonly, either very old versions of MySQL, or lack of configuration tuning. Occasionally,​ it also happens when the latency on remote database servers is too high. It's strongly recommended to use the newest version of MySQL available to you, as each release brings major performance improvements,​ and to consider optimizing your configuration using such tools as http://​mysqltuner.pl For database-driven websites, a high TTFB can be caused by a slow database. There can be several reasons for this: most commonly, either very old versions of MySQL, or lack of configuration tuning. Occasionally,​ it also happens when the latency on remote database servers is too high. It's strongly recommended to use the newest version of MySQL available to you, as each release brings major performance improvements,​ and to consider optimizing your configuration using such tools as http://​mysqltuner.pl
  • Admin
  • Last modified: 2018/11/12 16:43
  • by Erwin Venekamp