matrix-docker-ansible-deploy/roles/custom/matrix-synapse/tasks
Slavi Pantaleev d0cda27c97 Fix Synapse cache auto-tuning variables to use bytes, not KB
Fixup for https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3017

This reverts 1cd82cf068 and also multiplies results by `1024`
so as to pass bytes to Synapse, not KB (as done before).

1cd82cf068 was correctly documenting what we were doing (passing KB values),
but that's incorrect.

Synapse's Config Conventions
(https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#config-conventions)
are supposed to clear it up, but they don't currently state what happens when you pass a plain number (without a unit suffix).

Thankfully, the source code tells us:
bc1db16086/synapse/config/_base.py (L181-L206)

> If an integer is provided it is treated as bytes and is unchanged.
>
> String byte sizes can have a suffix of ...
> No suffix is understood as a plain byte count.

We were previously passing strings, but that has been improved in 3d73ec887a.

Regardless, non-suffixed values seem to be treated as bytes by Synapse,
so this patch changes the variables to use bytes.

Moreover, we're moving from `matrix_synapse_memtotal_kb` to
`matrix_synapse_cache_size_calculations_memtotal_bytes` as working with
the base unit everywhere is preferrable.

Here, we also introduce 2 new variables to allow for the caps to be
tweaked:

- `matrix_synapse_cache_size_calculations_max_cache_memory_usage_cap_bytes`
- `matrix_synapse_cache_size_calculations_target_cache_memory_usage_cap_bytes`
2024-02-14 13:39:40 +02:00
..
ext
goofys
rust-synapse-compress-state Use devture_postgres_container_network for all rust-synapse-compress-state tasks 2024-02-08 11:46:59 +02:00
synapse Added extra systemd service arguments to synapse workers and proxy companion 2024-01-24 13:14:34 -06:00
import_media_store.yml
import_synapse_sqlite_db.yml
init.yml Rename Synapse worker preset name (room-workers -> specialized-workers) 2024-01-20 12:40:55 +02:00
main.yml
register_user.yml
self_check_client_api.yml
self_check_federation_api.yml
setup_install.yml
setup_uninstall.yml
update_user_password.yml
validate_config.yml Fix Synapse cache auto-tuning variables to use bytes, not KB 2024-02-14 13:39:40 +02:00