docs(perf-tuning): Add notaries batch size advise + copyedits from comments

performance.md is now performance.mdx
This commit is contained in:
stratself
2026-03-30 11:45:18 +00:00
parent edd80b2600
commit f7d558baa6
@@ -8,14 +8,11 @@ This page aims to outline various performance tweaks for Continuwuity and their
Please see the dedicated DNS tuning guide.
<!-- TODO: Write DNS tuning page and link it here -->
## Cache capacities
If you have unused memory to spare, consider increasing the `cache_capacity_modifier` value to a larger number, as to allow more data to be stored in hot memory. This would _significantly_ speed up many intensive operations such as state resolutions, and also results in decreased CPU usage and disk I/O. Start with a baseline of `cache_capacity_modifier = 2.0` and tune up until you find a satisfactory RAM usage.
On the other hand, if your system doesn't have a lot of RAM, consider decreasing the cache capacity modifier to something smaller than `1.0` to avoid low-memory issues (at the cost of higher load on disk/CPU). The recommendation also works if your system has very few RAM compared to the number of cores, as cache capacities tend to scale according to the latter.
If you have unused memory to spare, consider increasing the `cache_capacity_modifier` value to a larger number, as to allow more data to be stored in hot memory. This would _**significantly**_ speed up many intensive operations such as state resolutions, and also results in decreased CPU usage and disk I/O. Start with a baseline of `cache_capacity_modifier = 2.0` and tune up until you find a satisfactory RAM usage.
On the other hand, if your system doesn't have a lot of RAM, consider decreasing the cache capacity modifier to something smaller than `1.0` to avoid low-memory issues (at the cost of higher load on disk/CPU). The recommendation also works if your system has very little RAM compared to the number of CPU cores, as cache capacities tend to scale according to number of cores.
## Disabling some features
@@ -28,7 +25,7 @@ allow_outgoing_read_receipts = false
allow_incoming_typing = false
```
Outgoing presence updates is also considered expensive and is disabled by default(`allow_local_presence = false`).
Outgoing presence updates is also considered expensive and has been disabled by default(`allow_outgoing_presence = false`).
For even more savings, you may wish to disable _all_ processing of typing notifications, read markers, and presence entirely. This can be done by also disabling the local and incoming events for these features.
@@ -103,7 +100,13 @@ Consult these documentations for more information on compression tuning and leve
## Other tweaks
You may consider exposing Continuwuity on a UNIX socket instead of a port if your reverse proxy is on the same machine, as this would reduce TCP overhead between them.
### UNIX sockets
If your homeserver and the reverse proxy lives on the same machine, you may consider exposing Continuwuity on a UNIX socket instead of a port. This would reduce TCP overhead between the two programs.
<details>
<summary>Example config with Caddy</summary>
```toml
### in continuwuity.toml ###
@@ -123,3 +126,9 @@ https://matrix.example.com {
# reverse_proxy unix+h2c//run/continuwuity/continuwuity.sock
}
```
</details>
### Increased batch size for notary queries
To speed up initial room joins, consider increasing `trusted_server_batch_size` to something higher than `1024`. Start with doubling to `2048` until you find a suitable value.