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 Add matrix_synapse_additional_loggers_auto and matrix_synapse_additional_loggers_custom 2023-08-30 12:53:20 +03:00
goofys Add matrix_synapse_uid, matrix_synapse_gid and matrix_synapse_username 2023-02-17 17:16:50 +02:00
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 Add matrix_synapse_uid, matrix_synapse_gid and matrix_synapse_username 2023-02-17 17:16:50 +02:00
import_synapse_sqlite_db.yml Restore --tags=import-synapse-sqlite-db support 2023-05-02 13:34:42 +03:00
init.yml Rename Synapse worker preset name (room-workers -> specialized-workers) 2024-01-20 12:40:55 +02:00
main.yml Fix Synapse sub-component (worker, S3, ..) uninstallation 2023-08-29 14:53:28 +03:00
register_user.yml /usr/local/bin/matrix-synapse-register-user -> /matrix/synapse/bin/register-user 2022-11-27 09:26:18 +02:00
self_check_client_api.yml Replace most import_tasks calls with include_tasks for improved performance 2022-11-24 11:33:45 +02:00
self_check_federation_api.yml Replace most import_tasks calls with include_tasks for improved performance 2022-11-24 11:33:45 +02:00
setup_install.yml Add some missing install-all/install-synapse tags to Synapse role 2023-07-28 08:40:49 +03:00
setup_uninstall.yml Fix Synapse sub-component (worker, S3, ..) uninstallation 2023-08-29 14:53:28 +03:00
update_user_password.yml Switch from matrix-postgres to com.devture.ansible.role.postgres 2022-11-27 08:04:31 +02:00
validate_config.yml Fix Synapse cache auto-tuning variables to use bytes, not KB 2024-02-14 13:39:40 +02:00