Просмотр исходного кода

Upgrade Synapse Cache Autotune to auto configure memory use

pull/3017/head
Catalan Lover 2 лет назад
Родитель
Сommit
f2f3d2eba3
Не найден GPG ключ соответствующий данной подписи Идентификатор GPG ключа: 649BCCF930C07F70
1 измененных файлов: 15 добавлений и 4 удалений
  1. +15
    -4
      roles/custom/matrix-synapse/defaults/main.yml

+ 15
- 4
roles/custom/matrix-synapse/defaults/main.yml Просмотреть файл

@@ -544,18 +544,29 @@ matrix_synapse_password_config_localdb_enabled: true
# Controls the number of events that Synapse caches in memory.
matrix_synapse_event_cache_size: "100K"




# Controls cache sizes for Synapse.
# 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/matrix-org/synapse/issues/3939
# Defaults for timings of caches is from https://tcpipuk.github.io/synapse/deployment/synapse.html
# The idea with the timings used is that you get to evict soon but also you keep stuff around for a long time when its not forced out.
# Long cache lifetimes together with the low minimum TTL allows autotune to be the primary eviction method assuming size of cache is hit before we hit other caps.
matrix_synapse_caches_global_factor: 10
matrix_synapse_caches_expire_caches: true
matrix_synapse_caches_cache_entry_ttl: "30m"
matrix_synapse_caches_cache_entry_ttl: "1080m"
matrix_synapse_caches_sync_response_cache_duration: "2m"
matrix_synapse_caches_autotuning_max_cache_memory_usage: "2048M"
matrix_synapse_caches_autotuning_target_cache_memory_usage: "1024M"
matrix_synapse_caches_autotuning_min_cache_ttl: "5m"
matrix_synapse_caches_autotuning_min_cache_ttl: "30s"
# The Cache tune math used here is a derivative of the same math used to autotune sizes for postgres.
# The memtotal variable can in theory be overiden to make Synapse think it has less ram to work with.
# But if your at the point of considering that just override the math or put static values in.
matrix_synapse_memtotal_kb: "{{ ansible_memtotal_mb*1024|int }}"
matrix_synapse_caches_autotuning_max_cache_memory_usage: "{{ 2097152 if (matrix_synapse_memtotal_kb|int/8)/1024 >= 2048 else matrix_synapse_memtotal_kb|int/8 }}"
matrix_synapse_caches_autotuning_target_cache_memory_usage: "{{ 1048576 if (matrix_synapse_memtotal_kb|int/16)/1024 >= 1024 else matrix_synapse_memtotal_kb|int/16 }}"


# Controls whether Synapse will federate at all.
# Disable this to completely isolate your server from the rest of the Matrix network.


Загрузка…
Отмена
Сохранить