summaryrefslogtreecommitdiff
path: root/docs/getting_started/index.md
diff options
context:
space:
mode:
authorLibravatar Daenney <daenney@users.noreply.github.com>2024-01-21 11:35:52 +0100
committerLibravatar GitHub <noreply@github.com>2024-01-21 11:35:52 +0100
commit7f6b37ea4d315e3a0889601d156ea1b6692b33bd (patch)
tree2020ed535599eb6f4eafbb5b18922b09a0ab8b18 /docs/getting_started/index.md
parent[chore] Downgrade OTEL libraries to 1.20 (#2546) (diff)
downloadgotosocial-7f6b37ea4d315e3a0889601d156ea1b6692b33bd.tar.xz
[docs] Updates for DB, swap and HTTP/2 on nginx (#2547)
* [docs] Add warning about DBs on network storage * [docs] Mention tuning swappiness on Linux * [docs] Mention enabling HTTP/2 on nginx
Diffstat (limited to 'docs/getting_started/index.md')
-rw-r--r--docs/getting_started/index.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/getting_started/index.md b/docs/getting_started/index.md
index c01e1d37e..98b9a7251 100644
--- a/docs/getting_started/index.md
+++ b/docs/getting_started/index.md
@@ -12,6 +12,11 @@ Before deploying GoToSocial, it's important to think through a few things as som
GoToSocial supports both SQLite and Postgres and you can start using either. We do not currently have tooling to support migrating from SQLite to Postgres or vice-versa, but it is possible in theory.
+For databases to perform properly, they should be run on fast storage that operates with low and stable latency. It is possible to run databases on network attached storage, but this adds variable latency and network congestion to the mix, as well as potential I/O contention on the origin storage.
+
+!!! danger
+ The performance of Hetzner Cloud Volumes is not guaranteed and seems to have very volatile latency. You're going to have a bad time running your database on those with extremely poor query performance for even the most basic operations. Before filing performance issues against GoToSocial, make sure the problems reproduce with local storage.
+
SQLite is great for a single-user instance. If you're planning on hosting multiple people it's advisable to use Postgres instead. You can always use Postgres regardless of the instance size.
!!! tip
@@ -97,6 +102,12 @@ Unless you're experienced in doing this kind of tuning and troubleshooting the i
* less than 2GB of RAM: swap = RAM × 2
* more than 2GB of RAM: swap = RAM, up to 8G
+Linux swaps pretty early. This tends to not be necessary on servers and in the case of databases can cause unnecessary latency. Though it's good to let your system swap if it needs to, it can help to tell it to be a little more conservative about how early it swaps. Configuring this on Linux is done by changing the `vm.swappiness` [sysctl][sysctl] value.
+
+By default it's `60`. You can lower that to `10` for starters and keep an eye out. It's possible to run with even lower values, but it's likely unnecessary. To make the value persistent, you'll need to drop a configuration file in `/etc/sysctl.d/`.
+
+[sysctl]: https://man7.org/linux/man-pages/man8/sysctl.8.html
+
### Memory and CPU limits
It is possible to limit the amount of memory or CPU your GoToSocial instance can consume. Doing so can be done on Linux using [CGroups v2 resource controllers][cgv2].