matrix-docker-ansible-deploy/docs/configuring-playbook-synapse-auto-compressor.md
2025-01-22 01:38:26 +09:00

2.2 KiB

Setting up synapse-auto-compressor (optional)

The playbook can install and configure synapse_auto_compressor for you.

It's a CLI tool that automatically compresses Synapse's state_groups database table in the background.

See the project's documentation to learn what it does and why it might be useful to you.

Adjusting the playbook configuration

Add the following configuration to your inventory/host_vars/matrix.example.com/vars.yml file:

matrix_synapse_auto_compressor_enabled: true

Installing

After configuring the playbook, run it with playbook tags as below:

ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,start

The shortcut commands with the just program are also available: just install-all or just setup-all

just install-all is useful for maintaining your setup quickly (2x-5x faster than just setup-all) when its components remain unchanged. If you adjust your vars.yml to remove other components, you'd need to run just setup-all, or these components will still remain installed. Note these shortcuts run the ensure-matrix-users-created tag too.

Usage

After installation, synapse_auto_compressor will run automatically every day at 00:00:00 (as defined in matrix_synapse_auto_compressor_calendar by default).

Manually execute compression

Sometimes it can be helpful to execute compression as you'd like, avoiding to wait until 00:00, like when you test your configuration.

If you want to execute it immediately, log in to the server with SSH and run systemctl start matrix-synapse-auto-compressor.

This will not return until the compression is done, so it can possibly take a long time. Consider using tmux if your SSH connection is unstable.