瀏覽代碼

Minor cleanups

synapse-cache-tuning
Slavi Pantaleev 2 年之前
父節點
當前提交
116e9fad86
共有 3 個檔案被更改,包括 3 行新增4 行删除
  1. +1
    -1
      docs/maintenance-synapse.md
  2. +1
    -2
      roles/custom/matrix-synapse/defaults/main.yml
  3. +1
    -1
      roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2

+ 1
- 1
docs/maintenance-synapse.md 查看文件

@@ -74,7 +74,7 @@ Synapse's presence feature which tracks which users are online and which are off

If you have enough compute resources (CPU & RAM), you can make Synapse better use of them by [enabling load-balancing with workers](configuring-playbook-synapse.md#load-balancing-with-workers).

Tuning Synapse's cache factor can help reduce RAM usage. [See the upstream documentation](https://github.com/element-hq/synapse#help-synapse-is-slow-and-eats-all-my-ram-cpu) for more information on what value to set the cache factor to. Use the variable `matrix_synapse_caches_global_factor` to set the cache factor.
Tuning Synapse's cache factor can help reduce RAM usage. Use the variable `matrix_synapse_caches_global_factor` to set the cache factor.

[Tuning your PostgreSQL database](maintenance-postgres.md#tuning-postgresql) could also improve Synapse performance. The playbook tunes the integrated Postgres database automatically, but based on your needs you may wish to adjust tuning variables manually. If you're using an [external Postgres database](configuring-playbook-external-postgres.md), you will aslo need to tune Postgres manually.



+ 1
- 2
roles/custom/matrix-synapse/defaults/main.yml 查看文件

@@ -548,8 +548,7 @@ matrix_synapse_event_cache_size: "100K"
# Raise this to increase cache sizes or lower it to potentially lower memory use.
# To learn more, see:
# - https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#caching
# - https://github.com/element-hq/synapse#help-synapse-eats-all-my-ram
# - https://github.com/element-hq/synapse/issues/3939
# - https://github.com/matrix-org/synapse/issues/3939
matrix_synapse_caches_global_factor: 10
matrix_synapse_caches_expire_caches: true
matrix_synapse_caches_cache_entry_ttl: "30m"


+ 1
- 1
roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2 查看文件

@@ -760,7 +760,7 @@ federation_domain_whitelist: {{ matrix_synapse_federation_domain_whitelist|to_js
# The number of events to cache in memory. Not affected by
# caches.global_factor.
#
event_cache_size: "{{ matrix_synapse_event_cache_size }}"
event_cache_size: {{ matrix_synapse_event_cache_size | to_json }}

caches:
# Controls the global cache factor, which is the default cache factor


Loading…
取消
儲存