Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit eb4aaa1

Browse files
authored
Add detail to cache_autotuning config option documentation (#12776)
1 parent ab2a615 commit eb4aaa1

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

changelog.d/12776.doc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Add additional info to documentation of config option `cache_autotuning`.
2+

docs/usage/configuration/config_documentation.md

+9-4
Original file line numberDiff line numberDiff line change
@@ -1130,14 +1130,19 @@ Caching can be configured through the following sub-options:
11301130
* `cache_autotuning` and its sub-options `max_cache_memory_usage`, `target_cache_memory_usage`, and
11311131
`min_cache_ttl` work in conjunction with each other to maintain a balance between cache memory
11321132
usage and cache entry availability. You must be using [jemalloc](https://github.com/matrix-org/synapse#help-synapse-is-slow-and-eats-all-my-ramcpu)
1133-
to utilize this option, and all three of the options must be specified for this feature to work.
1133+
to utilize this option, and all three of the options must be specified for this feature to work. This option
1134+
defaults to off, enable it by providing values for the sub-options listed below. Please note that the feature will not work
1135+
and may cause unstable behavior (such as excessive emptying of caches or exceptions) if all of the values are not provided.
1136+
Please see the [Config Conventions](#config-conventions) for information on how to specify memory size and cache expiry
1137+
durations.
11341138
* `max_cache_memory_usage` sets a ceiling on how much memory the cache can use before caches begin to be continuously evicted.
11351139
They will continue to be evicted until the memory usage drops below the `target_memory_usage`, set in
1136-
the flag below, or until the `min_cache_ttl` is hit.
1137-
* `target_memory_usage` sets a rough target for the desired memory usage of the caches.
1140+
the setting below, or until the `min_cache_ttl` is hit. There is no default value for this option.
1141+
* `target_memory_usage` sets a rough target for the desired memory usage of the caches. There is no default value
1142+
for this option.
11381143
* `min_cache_ttl` sets a limit under which newer cache entries are not evicted and is only applied when
11391144
caches are actively being evicted/`max_cache_memory_usage` has been exceeded. This is to protect hot caches
1140-
from being emptied while Synapse is evicting due to memory.
1145+
from being emptied while Synapse is evicting due to memory. There is no default value for this option.
11411146

11421147
Example configuration:
11431148
```yaml

0 commit comments

Comments
 (0)