Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
docs:improve-performance [2020-09-20 19:19] – external edit 127.0.0.1 | docs:improve-performance [2022-07-18 09:13] (current) – [Database] Tobias | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | How to improve the performance of a Friendica site | + | ====== |
- | ============== | + | |
- | * [Home](help) | + | Feel free to ask in the [[https:// |
- | Feel free to ask in the [Friendica support forum](https:// | + | ===== System configuration |
- | + | ||
- | System configuration | + | |
- | -------- | + | |
Please go to / | Please go to / | ||
- | | + | < |
+ | Set "JPEG image quality" | ||
+ | </ | ||
+ | This value reduces the data that is send from the server to the client. 50 is a value that doesn’t influences image quality too much. | ||
- | This value reduces the data that is send from the server to the client. 50 is a value that doesn' | + | < |
- | + | Set " | |
- | Set " | + | </ |
- | + | If you have many OStatus contacts then completing of conversations can take some time. Since you will miss several comments in OStatus threads, you maybe should consider the option | |
- | If you have many OStatus contacts then completing of conversations can take some time. Since you will miss several comments in OStatus threads, you maybe should consider the option | + | |
- | + | ||
- | Enable "Use MySQL full text engine" | + | |
+ | < | ||
+ | Enable "Use MySQL full text engine" | ||
+ | </ | ||
When using MyISAM (default) or InnoDB on MariaDB 10 this speeds up search. | When using MyISAM (default) or InnoDB on MariaDB 10 this speeds up search. | ||
- | Addons | + | ===== Addons |
- | -------- | + | |
Active the following addons: | Active the following addons: | ||
- | | + | < |
+ | rendertime | ||
+ | </ | ||
+ | ==== rendertime ==== | ||
- | ### rendertime | + | This addon doesn’t speed up your system. It helps to analyze your bottlenecks. |
- | This addon doesn' | + | When enabled you see some values at the bottom of every page. They show your performance problems. |
- | It helps to analyze | + | |
- | When enabled you see some values at the bottom of every page. | + | < |
- | They show your performance problems. | + | Performance: |
- | Performance: | + | Database: This is the time for all database queries |
- | + | Network: Time that is needed to fetch content from external sites | |
- | | + | Rendering: Time for theme rendering |
- | Network: Time that is needed to fetch content from external sites | + | Parser: The time that the BBCode parser needed to create the output |
- | Rendering: Time for theme rendering | + | I/O: Time for local file access |
- | Parser: The time that the BBCode parser needed to create the output | + | Others: Everything else :) |
- | I/O: Time for local file access | + | Total: The sum of all above values |
- | Others: Everything else :) | + | </ |
- | Total: The sum of all above values | + | ===== Apache Webserver |
- | + | ||
- | Apache Webserver | + | |
- | -------- | + | |
The following Apache modules are recommended: | The following Apache modules are recommended: | ||
- | ### Cache-Control | + | ==== Cache-Control |
- | This module tells the client to cache the content of static files so that they aren't fetched with every request. | + | This module tells the client to cache the content of static files so that they aren’t fetched with every request. Enable the module |
- | Enable the module | + | |
- | Please add the following lines to your site configuration in the "directory" | + | |
- | ExpiresActive on ExpiresDefault " | + | < |
+ | ExpiresActive on ExpiresDefault " | ||
+ | </ | ||
+ | Also see the Apache [[http:// | ||
- | Also see the Apache [2.2](http:// | + | ==== Compress content ==== |
- | ### Compress content | + | This module compresses the traffic between the web server and the client. Enable the module “mod_deflate” by typing in “a2enmod deflate” as root. |
- | This module compresses | + | Also see the Apache [[http:// |
- | Enable the module "mod_deflate" by typing in " | + | |
- | Also see the Apache [2.2](http:// | + | ===== PHP ===== |
- | PHP | + | ==== FCGI ==== |
- | -------- | + | |
- | ### FCGI | + | When using Apache think about using FCGI. In a Debian-based distribution you will need to install the packages named “php5-cgi” and “libapache2-mod-fcgid”. |
- | + | ||
- | When using Apache think about using FCGI. | + | |
- | In a Debian-based distribution you will need to install the packages named "php5-cgi" | + | |
Please refer to external documentation for a more detailed explanation how to set up a system based upon FCGI. | Please refer to external documentation for a more detailed explanation how to set up a system based upon FCGI. | ||
- | ### Database | + | ==== Database |
- | There are scripts like [tuning-primer.sh](http:// | + | There are scripts like [[http:// |
Please enable the slow query log. This helps to find performance problems. | Please enable the slow query log. This helps to find performance problems. | ||
+ | |||
+ | If you are using MariaDB 10.5 (e.g. included in Debian 11 / Bullseye) you can gain some performance by setting '' | ||