Differences

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

Link to this comparison view

Last revisionBoth sides next revision
docs:improve-performance [2020-09-20 19:19] – external edit 127.0.0.1docs:improve-performance [2022-06-24 14:31] Tobias
Line 1: Line 1:
-How to improve the performance of a Friendica site +====== How to improve the performance of a Friendica site ======
-==============+
  
-[Home](help)+Feel free to ask in the [[https://forum.friendi.ca/profile/helpers|Friendica support forum]if you need some clarification about the following instructions or if you need help in any other way.
  
-Feel free to ask in the [Friendica support forum](https://forum.friendi.ca/profile/helpers) if you need some clarification about the following instructions or if you need help in any other way. +===== System configuration =====
- +
-System configuration +
---------+
  
 Please go to /admin/site/ on your system and change the following values: Please go to /admin/site/ on your system and change the following values:
  
-    Set "JPEG image quality" to 50.+<code> 
 +Set "JPEG image quality" to 50
 +</code> 
 +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't influences image quality too much. +<code> 
- +Set "OStatus conversation completion interval" to "never"
-    Set "OStatus conversation completion interval" to "never"+</code> 
- +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 At post arrival” instead.
-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 "At post arrivalinstead. +
- +
-    Enable "Use MySQL full text engine"+
  
 +<code>
 +Enable "Use MySQL full text engine"
 +</code>
 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+<code> 
 +rendertime 
 +</code> 
 +==== rendertime ====
  
-### rendertime+This addon doesn’t speed up your system. It helps to analyze your bottlenecks.
  
-This addon doesn't speed up your system +When enabled you see some values at the bottom of every pageThey show your performance problems.
-It helps to analyze your bottlenecks.+
  
-When enabled you see some values at the bottom of every page. +<code> 
-They show your performance problems.+Performance: Database: 0.244, Network: 0.002, Rendering: 0.044, Parser: 0.001, I/O: 0.021, Other: 0.237, Total: 0.548
  
-    Performance: Database: 0.244, Network: 0.002, Rendering: 0.044, Parser: 0.001, I/O: 0.021, Other: 0.237, Total: 0.548 +Database: This is the time for all database queries 
- +Network: Time that is needed to fetch content from external sites 
-    Database: This is the time for all database queries +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 :) +</code> 
-    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. +
-Enable the module "mod_expires" by typing in "a2enmod expires" as root. +
-Please add the following lines to your site configuration in the "directory" context.+
  
- ExpiresActive on ExpiresDefault "access plus 1 week"+This module tells the client to cache the content of static files so that they aren’t fetched with every request. Enable the module “mod_expires” by typing in “a2enmod expires” as root. Please add the following lines to your site configuration in the “directory” context.
  
-Also see the Apache [2.2](http://httpd.apache.org/docs/2.2/mod/mod_expires.html) / [2.4](https://httpd.apache.org/docs/2.4/mod/mod_expires.htmldocumentation.+<code> 
 +ExpiresActive on ExpiresDefault "access plus 1 week" 
 +</code> 
 +Also see the Apache [[http://httpd.apache.org/docs/2.2/mod/mod_expires.html|2.2]] / [[https://httpd.apache.org/docs/2.4/mod/mod_expires.html|2.4]] documentation.
  
-### Compress content+==== Compress content ====
  
-This module compresses the traffic between the web server and the client. +This module compresses the traffic between the web server and the client. Enable the module mod_deflate” by typing in a2enmod deflate” as root.
-Enable the module "mod_deflateby typing in "a2enmod deflateas root.+
  
-Also see the Apache [2.2](http://httpd.apache.org/docs/2.2/mod/mod_deflate.html) / [2.4](https://httpd.apache.org/docs/2.4/mod/mod_deflate.htmldocumentation.+Also see the Apache [[http://httpd.apache.org/docs/2.2/mod/mod_deflate.html|2.2]] / [[https://httpd.apache.org/docs/2.4/mod/mod_deflate.html|2.4]] documentation.
  
-PHP +===== PHP =====
---------+
  
-### FCGI+==== FCGI ====
  
-When using Apache think about using 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.
-In a Debian-based distribution you will need to install the packages named "php5-cgiand "libapache2-mod-fcgid".+
  
 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://www.day32.com/MySQL/) and [mysqltuner.pl](http://mysqltuner.plthat analyze your database server and give hints on values that could be changed.+There are scripts like [[http://www.day32.com/MySQL/|tuning-primer.sh]] and [[http://mysqltuner.pl|mysqltuner.pl]] that analyze your database server and give hints on values that could be changed.
  
 Please enable the slow query log. This helps to find performance problems. Please enable the slow query log. This helps to find performance problems.
  
  • Last modified: 2022-07-18 09:13