|
|
|
@@ -557,13 +557,35 @@ matrix_synapse_caches_global_factor: 10 |
|
|
|
matrix_synapse_caches_expire_caches: true |
|
|
|
matrix_synapse_caches_cache_entry_ttl: "1080m" |
|
|
|
matrix_synapse_caches_sync_response_cache_duration: "2m" |
|
|
|
|
|
|
|
# Controls how much memory this role thinks is available for cache-size-related calculations. |
|
|
|
# By default, all of the server's memory is taken into account, but you can adjust this. |
|
|
|
# You can also go for directly adjusting cache-sizes (matrix_synapse_cache_autotuning_max_cache_memory_usage, matrix_synapse_cache_autotuning_target_cache_memory_usage) instead of adjusting this. |
|
|
|
matrix_synapse_cache_size_calculations_memtotal_bytes: "{{ (ansible_memtotal_mb * 1024 * 1024) | int }}" |
|
|
|
|
|
|
|
# Controls the cap to use for matrix_synapse_cache_autotuning_max_cache_memory_usage. |
|
|
|
matrix_synapse_cache_size_calculations_max_cache_memory_usage_cap_bytes: "{{ (2 * 1024 * 1024 * 1024) }}" # 2GB |
|
|
|
|
|
|
|
# Controls the cap to use for matrix_synapse_cache_autotuning_target_cache_memory_usage. |
|
|
|
matrix_synapse_cache_size_calculations_target_cache_memory_usage_cap_bytes: "{{ (1 * 1024 * 1024 * 1024) }}" # 1GB |
|
|
|
|
|
|
|
matrix_synapse_cache_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_cache_autotuning_max_cache_memory_usage: "{{ (2097152 if (matrix_synapse_memtotal_kb|int/8)/1024 >= 2048 else matrix_synapse_memtotal_kb|int/8) | int }}" |
|
|
|
matrix_synapse_cache_autotuning_target_cache_memory_usage: "{{ (1048576 if (matrix_synapse_memtotal_kb|int/16)/1024 >= 1024 else matrix_synapse_memtotal_kb|int/16) | int }}" |
|
|
|
|
|
|
|
matrix_synapse_cache_autotuning_max_cache_memory_usage: |- |
|
|
|
{{ |
|
|
|
[ |
|
|
|
(((matrix_synapse_cache_size_calculations_memtotal_bytes | int) / 8) | int), |
|
|
|
(matrix_synapse_cache_size_calculations_max_cache_memory_usage_cap_bytes | int), |
|
|
|
] | min |
|
|
|
}} |
|
|
|
|
|
|
|
matrix_synapse_cache_autotuning_target_cache_memory_usage: |- |
|
|
|
{{ |
|
|
|
[ |
|
|
|
(((matrix_synapse_cache_size_calculations_memtotal_bytes | int) / 16) | int), |
|
|
|
(matrix_synapse_cache_size_calculations_target_cache_memory_usage_cap_bytes | int), |
|
|
|
] | min |
|
|
|
}} |
|
|
|
|
|
|
|
# Controls whether Synapse will federate at all. |
|
|
|
# Disable this to completely isolate your server from the rest of the Matrix network. |
|
|
|
|