-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add detail to cache_autotuning
config option documentation
#12776
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Add info to documentation of config option `cache_autotuning`. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1122,14 +1122,18 @@ Caching can be configured through the following sub-options: | |
* `cache_autotuning` and its sub-options `max_cache_memory_usage`, `target_cache_memory_usage`, and | ||
`min_cache_ttl` work in conjunction with each other to maintain a balance between cache memory | ||
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) | ||
to utilize this option, and all three of the options must be specified for this feature to work. | ||
to utilize this option, and all three of the options must be specified for this feature to work. This option | ||
defaults to off, enable it by providing values for the sub-options listed below. Please note that the feature will not work | ||
and may cause unstable behavior (such as excessive empyting of caches) if all of the values are not provided. | ||
When providing values for memory usage use M for MB and K for KB. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this line necessary after #12777? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it makes sense from a user-friendly standpoint, just in case someone was linked to this option or hadn't looked over the full manual. I did change it to say KiB and MiB and linked the comment to the config convention section for completeness. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That makes sense -- my only concern is if we end up supporting GiB in the future. Perhaps this line should point to the size definition section instead? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great point, I've updated it, let me know what you think. |
||
* `max_cache_memory_usage` sets a ceiling on how much memory the cache can use before caches begin to be continuously evicted. | ||
They will continue to be evicted until the memory usage drops below the `target_memory_usage`, set in | ||
the flag below, or until the `min_cache_ttl` is hit. | ||
* `target_memory_usage` sets a rough target for the desired memory usage of the caches. | ||
the setting below, or until the `min_cache_ttl` is hit. There is no default value for this option. | ||
* `target_memory_usage` sets a rough target for the desired memory usage of the caches. There is no default value | ||
for this option. | ||
* `min_cache_ttl` sets a limit under which newer cache entries are not evicted and is only applied when | ||
caches are actively being evicted/`max_cache_memory_usage` has been exceeded. This is to protect hot caches | ||
from being emptied while Synapse is evicting due to memory. | ||
from being emptied while Synapse is evicting due to memory. There is no default for this option. | ||
H-Shay marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Example configuration: | ||
```yaml | ||
|
Uh oh!
There was an error while loading. Please reload this page.