From e9f636ea59ed12866168d0e6984348dc9b47e79d Mon Sep 17 00:00:00 2001 From: Daenney Date: Wed, 22 Nov 2023 19:06:30 +0100 Subject: [PATCH] [docs] Add a warning about SQLite cache sizes (#2378) * [docs] Add a warning about SQLite cache sizes * [docs] Fix admonition text * [docs] Lorde the indenting * [docs] Rework the text a bit --- docs/configuration/database.md | 9 +++++++++ example/config.yaml | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/docs/configuration/database.md b/docs/configuration/database.md index 294420a36..cb9c90759 100644 --- a/docs/configuration/database.md +++ b/docs/configuration/database.md @@ -46,6 +46,9 @@ GoToSocial makes use of ULIDs (Universally Unique Lexicographically Sortable Ide ## Settings +!!! danger "SQLite cache sizes" + More is not necessarily better for caches. They need to be tuned to the workload. The defaults should be plenty for most instances and you shouldn't change it. If you do change it, ensure you mention this when requesting help in the GoToSocial Help channel. + ```yaml ############################ ##### DATABASE CONFIG ###### @@ -156,6 +159,12 @@ db-sqlite-synchronous: "NORMAL" # SQLite only -- unused otherwise. # If set to empty string or zero, the sqlite default (2MiB) will be used. # See: https://www.sqlite.org/pragma.html#pragma_cache_size +# +# More is not necessarily better for caches. They need to be tuned to the +# workload. The defaults should be plenty for most instances and you shouldn't +# change it. If you do change it, ensure you mention this when requesting help +# in the GoToSocial Help channel. +# # Examples: ["0", "2MiB", "8MiB", "64MiB"] # Default: "8MiB" db-sqlite-cache-size: "8MiB" diff --git a/example/config.yaml b/example/config.yaml index a62d5940e..e7364eb93 100644 --- a/example/config.yaml +++ b/example/config.yaml @@ -229,6 +229,12 @@ db-sqlite-synchronous: "NORMAL" # SQLite only -- unused otherwise. # If set to empty string or zero, the sqlite default (2MiB) will be used. # See: https://www.sqlite.org/pragma.html#pragma_cache_size +# +# More is not necessarily better for caches. They need to be tuned to the +# workload. The defaults should be plenty for most instances and you shouldn't +# change it. If you do change it, ensure you mention this when requesting help +# in the GoToSocial Help channel. +# # Examples: ["0", "2MiB", "8MiB", "64MiB"] # Default: "8MiB" db-sqlite-cache-size: "8MiB"