Friendica config optimization for limited resources
Hey everyone, and especially @Michael Vogel
I'd like to compile a list of settings for Friendica to work on limited resources. Based on settings I'm using on my Raspi 4 but with the knowledge of all of you, as I'm almost certain that I missed some optimization possibilities.
Personal user settings
- Account settings -> Social Media -> General Social Media Settings -> Followed content scope: select "only conversations my follows started". This is obviously a personal choice, but only follow (and importing) the postings from the accounts I follow and not also the content they interact with reduces the amount of postings that are imported into the system. If they think a posting is important enough to share it, then you'll see it.
Settings in the admin panel
Activate the "fast lane" worker. This will keep one worker process dealing only with the delivery of content. Afterall we want to share postings with contacts in a social network, so this should not suffer from other tasks the worker has to perform.
Limit public access
If non-logged in users have less access to potentially resource hungry parts of Friendica. This includes "Community pages for visitors" (None), "Disallow public access to addons listed in the apps menu.", "Only local search".
Discovery
Discovering potential contacts is great, but will use resources. So
- set "Discover followers/followings from contacts" to None and just to be sure deactivate "Discover contacts from other servers".
- Also "Only update contacts/servers with local data" should limit the data-waste filling up the database.
Remote content
Delete it automatically, as long as it is not protected by the users of the node. The settings for this are
- "Lifespan of remote items" and also
- limit the "Maximum age of items in the search table".
- The "Lifespan of raw conversation data" is kept for 90 days by default, but the description claims it is save to delete it after 14 days so, take the minimum save value.
Don't forget to select "Clean database" and "Periodically optimize tables". The optimization will actually free the space the table is reserving on the storage (else the database will fill up the reserved space before claiming more).
Relays
Relay server are great to get content into your node, especially on small nodes (likely those with limited resources). Fill the global community page and have nice channel content based on them. But those postings will also eat the resources of the server quickly. So...
- set the "Relay scope" to tags and define some tags your server should import. Also "Allow user tags" so that the user can set tags to follow from the relay. However
- set the "Lifespan of unclaimed items" to 1 (or another low value) so that these posting will get deleted quickly again
Display of content
Limit the amount of postings and comments that are shown on one page.
Settings in the config file
-
system -> fetch_perents = false
this will prevent Friendica to fetch missing parent posts -
system -> optimize_all_tables = true
this will optimizes all tables instead of only tables like workerqueue or the cache, so when things in the database are deleted, more space is freed.
What have I missed? I mean apart from optimizing the database settings and how the web server serves PHP content.