Make Synapse cache factor configurable
This commit is contained in:
parent
161854e6d7
commit
242f388af3
10
CHANGELOG.md
10
CHANGELOG.md
@ -1,3 +1,13 @@
|
||||
# 2018-09-27
|
||||
|
||||
## Synapse Cache Factor made configurable
|
||||
|
||||
The playbook now makes the Synapse cache factor configurable, through the playbook's `matrix_synapse_cache_factor` variable (having a default value of `0.5`).
|
||||
|
||||
Changing that value allows you to potentially decrease RAM usage or to increase performance by caching more stuff.
|
||||
Some information on it is available here: https://github.com/matrix-org/synapse#help-synapse-eats-all-my-ram
|
||||
|
||||
|
||||
# 2018-09-26
|
||||
|
||||
## Disabling Docker container logging
|
||||
|
@ -74,6 +74,13 @@ matrix_synapse_password_config_pepper: ""
|
||||
# Controls the number of events that Matrix Synapse caches in memory.
|
||||
matrix_synapse_event_cache_size: "100K"
|
||||
|
||||
# Controls cache sizes for Matrix Synapse via the SYNAPSE_CACHE_FACTOR environment variable.
|
||||
# Raise this to increase cache sizes or lower it to potentially lower memory use.
|
||||
# To learn more, see:
|
||||
# - https://github.com/matrix-org/synapse#help-synapse-eats-all-my-ram
|
||||
# - https://github.com/matrix-org/synapse/issues/3939
|
||||
matrix_synapse_cache_factor: 0.5
|
||||
|
||||
# A list of additional "volumes" to mount in the container.
|
||||
# This list gets populated dynamically based on Synapse extensions that have been enabled.
|
||||
# Contains definition objects like this: `{"src": "/outside", "dst": "/inside", "options": "rw|ro|slave|.."}
|
||||
|
@ -61,6 +61,13 @@
|
||||
dest: "{{ matrix_synapse_config_dir_path }}/{{ hostname_matrix }}.log.config"
|
||||
mode: 0644
|
||||
|
||||
- name: Ensure Synapse environment variables file created
|
||||
template:
|
||||
src: "{{ role_path }}/templates/env/env-synapse.j2"
|
||||
dest: "{{ matrix_environment_variables_data_path }}/synapse"
|
||||
owner: root
|
||||
mode: 0600
|
||||
|
||||
- name: Ensure matrix-synapse.service installed
|
||||
template:
|
||||
src: "{{ role_path }}/templates/systemd/matrix-synapse.service.j2"
|
||||
|
2
roles/matrix-server/templates/env/env-synapse.j2
vendored
Normal file
2
roles/matrix-server/templates/env/env-synapse.j2
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
SYNAPSE_CONFIG_PATH=/data/homeserver.yaml
|
||||
SYNAPSE_CACHE_FACTOR={{ matrix_synapse_cache_factor }}
|
@ -27,6 +27,7 @@ ExecStartPre=/bin/sleep 5
|
||||
{% endif %}
|
||||
ExecStart=/usr/bin/docker run --rm --name matrix-synapse \
|
||||
--log-driver=none \
|
||||
--env-file={{ matrix_environment_variables_data_path }}/synapse \
|
||||
--network={{ matrix_docker_network }} \
|
||||
-p 8448:8448 \
|
||||
{% if not matrix_nginx_proxy_enabled %}
|
||||
@ -38,7 +39,6 @@ ExecStart=/usr/bin/docker run --rm --name matrix-synapse \
|
||||
{% for volume in matrix_synapse_container_additional_volumes %}
|
||||
-v {{ volume.src }}:{{ volume.dst }}:{{ volume.options }} \
|
||||
{% endfor %}
|
||||
-e SYNAPSE_CONFIG_PATH=/data/homeserver.yaml \
|
||||
{{ matrix_docker_image_synapse }}
|
||||
ExecStop=-/usr/bin/docker kill matrix-synapse
|
||||
ExecStop=-/usr/bin/docker rm matrix-synapse
|
||||
|
Loading…
Reference in New Issue
Block a user