From 1cae31372c65e6db1d57cd35f37d79d3c85cab36 Mon Sep 17 00:00:00 2001 From: Charles Wright Date: Fri, 2 Sep 2022 13:04:21 -0500 Subject: [PATCH] Make Conduit's rocksdb_max_open_files parameter configurable, and set it to a higher default value --- roles/matrix-conduit/defaults/main.yml | 5 +++++ roles/matrix-conduit/templates/conduit/conduit.toml.j2 | 3 +++ 2 files changed, 8 insertions(+) diff --git a/roles/matrix-conduit/defaults/main.yml b/roles/matrix-conduit/defaults/main.yml index df1a87d9..48a1ed1b 100644 --- a/roles/matrix-conduit/defaults/main.yml +++ b/roles/matrix-conduit/defaults/main.yml @@ -36,6 +36,11 @@ matrix_conduit_template_conduit_config: "{{ role_path }}/templates/conduit/condu # Max size for uploads, in bytes matrix_conduit_max_request_size: 20_000_000 +# Maximum number of open files for Conduit's embedded RocksDB database +# See https://github.com/facebook/rocksdb/wiki/RocksDB-Tuning-Guide#tuning-other-options +# If not specified, Conduit defaults to a relatively low value of 20 +matrix_conduit_rocksdb_max_open_files: 64 + # Enables registration. If set to false, no users can register on this server. matrix_conduit_allow_registration: false diff --git a/roles/matrix-conduit/templates/conduit/conduit.toml.j2 b/roles/matrix-conduit/templates/conduit/conduit.toml.j2 index 6f479084..15691440 100644 --- a/roles/matrix-conduit/templates/conduit/conduit.toml.j2 +++ b/roles/matrix-conduit/templates/conduit/conduit.toml.j2 @@ -34,6 +34,9 @@ port = {{ matrix_conduit_port_number }} # Max size for uploads max_request_size = {{ matrix_conduit_max_request_size }} +# Max number of open files for the RocksDB database +rocksdb_max_open_files = {{ matrix_conduit_rocksdb_max_open_files }} + # Enables registration. If set to false, no users can register on this server. allow_registration = {{ matrix_conduit_allow_registration | to_json }}