forked from matrix-org/dendrite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new next steps page to the documentation
- Loading branch information
1 parent
660f783
commit e2a6477
Showing
1 changed file
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- | ||
title: Next steps | ||
parent: Installation | ||
has_toc: true | ||
nav_order: 10 | ||
permalink: /installation/start/nextsteps | ||
--- | ||
|
||
# Next steps | ||
|
||
Now that you have Dendrite running, the following tweaks will improve the reliability | ||
of your installation. | ||
|
||
## File descriptor limit | ||
|
||
Most platforms have a limit on how many file descriptors a single process can open. All | ||
connections made by Dendrite consume file descriptors — this includes database connections | ||
and network requests to remote homeservers. When participating in large federated rooms | ||
where Dendrite must talk to many remote servers, it is often very easy to exhaust default | ||
limits which are quite low. | ||
|
||
We currently recommend setting the file descriptor limit to 65535 to avoid such | ||
issues. Dendrite will log immediately after startup if the file descriptor limit is too low: | ||
|
||
``` | ||
level=warning msg="IMPORTANT: Process file descriptor limit is currently 1024, it is recommended to raise the limit for Dendrite to at least 65535 to avoid issues" | ||
``` | ||
|
||
UNIX systems have two limits: a hard limit and a soft limit. You can view the soft limit | ||
by running `ulimit -Sn` and the hard limit with `ulimit -Hn`: | ||
|
||
``` | ||
$ ulimit -Hn | ||
1048576 | ||
$ ulimit -Sn | ||
1024 | ||
``` | ||
|
||
Increase the soft limit before starting Dendrite: | ||
|
||
``` | ||
ulimit -Sn 65535 | ||
``` | ||
|
||
The log line at startup should no longer appear if the limit is sufficient. | ||
|
||
If you are running under a systemd service, you can instead add `LimitNOFILE=65535` option | ||
to the `[Service]` section of your service unit file. | ||
|
||
## DNS caching | ||
|
||
Dendrite has a built-in DNS cache which significantly reduces the load that Dendrite will | ||
place on your DNS resolver. This may also speed up outbound federation. | ||
|
||
Consider enabling the DNS cache by modifying the `global` section of your configuration file: | ||
|
||
``` | ||
dns_cache: | ||
enabled: true | ||
cache_size: 4096 | ||
cache_lifetime: 600s | ||
``` | ||
|
||
## Time synchronisation | ||
|
||
Matrix relies heavily on TLS which requires the system time to be correct. If the clock | ||
drifts then you may find that federation no works reliably (or at all) and clients may | ||
struggle to connect to your Dendrite server. | ||
|
||
Ensure that the time is synchronised on your system by enabling NTP sync. |