From 030268909fd171c4c196a139c5dabc6dde1b0512 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Tue, 15 Feb 2022 12:39:25 +0000 Subject: [PATCH 1/3] Enable complexity checking in complexity checking docs example --- docs/other/running_synapse_on_single_board_computers.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/other/running_synapse_on_single_board_computers.md b/docs/other/running_synapse_on_single_board_computers.md index ea14afa8b2df..250fe56274df 100644 --- a/docs/other/running_synapse_on_single_board_computers.md +++ b/docs/other/running_synapse_on_single_board_computers.md @@ -38,8 +38,7 @@ use_presence: false # joins a new remote room. If it is above the complexity limit, the server will # disallow joining, or will instantly leave. limit_remote_rooms: - # Uncomment to enable room complexity checking. - #enabled: true + enabled: true complexity: 3.0 # Database configuration From 3a85bd3f9d78bced925346f9105d5feda1ffef62 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Tue, 15 Feb 2022 12:41:56 +0000 Subject: [PATCH 2/3] changelog --- changelog.d/11998.doc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/11998.doc diff --git a/changelog.d/11998.doc b/changelog.d/11998.doc new file mode 100644 index 000000000000..33ab7b7880be --- /dev/null +++ b/changelog.d/11998.doc @@ -0,0 +1 @@ +Fix complexity checking config example in [Resource Constrained Devices](https://matrix-org.github.io/synapse/v1.54/other/running_synapse_on_single_board_computers.html) docs page. \ No newline at end of file From c30b24717f9bdbff5c89d0dd6fe2e6fca6ff2775 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Tue, 1 Mar 2022 17:29:38 +0000 Subject: [PATCH 3/3] Switch config comments to contextual descriptions, not sample_config lines --- .../running_synapse_on_single_board_computers.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/other/running_synapse_on_single_board_computers.md b/docs/other/running_synapse_on_single_board_computers.md index 250fe56274df..dcf96f0056ba 100644 --- a/docs/other/running_synapse_on_single_board_computers.md +++ b/docs/other/running_synapse_on_single_board_computers.md @@ -31,27 +31,29 @@ Anything that requires modifying the device list [#7721](https://github.com/matr Put the below in a new file at /etc/matrix-synapse/conf.d/sbc.yaml to override the defaults in homeserver.yaml. ``` -# Set to false to disable presence tracking on this homeserver. +# Disable presence tracking, which is currently fairly resource intensive +# More info: https://github.com/matrix-org/synapse/issues/9478 use_presence: false -# When this is enabled, the room "complexity" will be checked before a user -# joins a new remote room. If it is above the complexity limit, the server will -# disallow joining, or will instantly leave. +# Set a small complexity limit, preventing users from joining large rooms +# which may be resource-intensive to remain a part of. +# +# Note that this will not prevent users from joining smaller rooms that +# eventually become complex. limit_remote_rooms: enabled: true complexity: 3.0 # Database configuration database: + # Use postgres for the best performance name: psycopg2 args: user: matrix-synapse - # Generate a long, secure one with a password manager + # Generate a long, secure password using a password manager password: hunter2 database: matrix-synapse host: localhost - cp_min: 5 - cp_max: 10 ``` Currently the complexity is measured by [current_state_events / 500](https://github.com/matrix-org/synapse/blob/v1.20.1/synapse/storage/databases/main/events_worker.py#L986). You can find join times and your most complex rooms like this: