1 How to improve the performance of a Friendica site
6 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.
11 Please go to /admin/site/ on your system and change the following values:
13 Set "JPEG image quality" to 50.
15 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.
17 Set "OStatus conversation completion interval" to "never".
19 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.
21 Enable "Use MySQL full text engine"
23 When using MyISAM (default) or InnoDB on MariaDB 10 this speeds up search.
28 Active the following addons:
34 This addon doesn't speed up your system.
35 It helps to analyze your bottlenecks.
37 When enabled you see some values at the bottom of every page.
38 They show your performance problems.
40 Performance: Database: 0.244, Network: 0.002, Rendering: 0.044, Parser: 0.001, I/O: 0.021, Other: 0.237, Total: 0.548
42 Database: This is the time for all database queries
43 Network: Time that is needed to fetch content from external sites
44 Rendering: Time for theme rendering
45 Parser: The time that the BBCode parser needed to create the output
46 I/O: Time for local file access
47 Others: Everything else :)
48 Total: The sum of all above values
53 The following Apache modules are recommended:
57 This module tells the client to cache the content of static files so that they aren't fetched with every request.
58 Enable the module "mod_expires" by typing in "a2enmod expires" as root.
59 Please add the following lines to your site configuration in the "directory" context.
61 ExpiresActive on ExpiresDefault "access plus 1 week"
63 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.html) documentation.
67 This module compresses the traffic between the web server and the client.
68 Enable the module "mod_deflate" by typing in "a2enmod deflate" as root.
70 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.html) documentation.
77 When using Apache think about using FCGI.
78 In a Debian-based distribution you will need to install the packages named "php5-cgi" and "libapache2-mod-fcgid".
80 Please refer to external documentation for a more detailed explanation how to set up a system based upon FCGI.
84 There are scripts like [tuning-primer.sh](http://www.day32.com/MySQL/) and [mysqltuner.pl](http://mysqltuner.pl) that analyze your database server and give hints on values that could be changed.
86 Please enable the slow query log. This helps to find performance problems.