-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Provide list of all Synapse caches with default limits numbers and current sizes in bytes #8811
Comments
It could be nice to implement this as a CLI command that prints the current defaults for everything, just to ensure it's always up-to-date. We'd gladly review PRs that do this, but we're not sure we'll be able to implement that on this side in the near future. |
I have found the list of cache names and per-cache max limits in Synapse prometheus metrics, here is cli command to lookup:
where
And here is filter by current number of values per each cache:
Here is list of all default values (with
So maybe we can simply reuse same function, that outputs this statistics for prometheus, in some command-line argument? |
Also will be good to lookup memory usage size for each cache type, but this info seems missed in Prometheus metrics. |
Seems here #9881 is implemented memory measurement for caches. |
Description:
In
homeserver.yaml
we havecaches
section, where can fill cache factors - global, or per_cache.But I can't find the way to lookup list of all cache names (best with short description) that use Synapse, with default values in numbers, and exact name for config file parameter.
For example, what is default number for
get_users_who_share_room_with_user
- 100, 1000, or 10000? If we will have the default numbers, we will can calculate result using simple math.Other problem is cache name, for example, the
*getEvent*
cache must be named in yaml file as*getEvent*
,getEvent
,get_event
,_get_event_
(with replacing*
to_
), or maybeevent_cache_size
- what is right version?Also we need the way to lookup current cache size in bytes, not only in objects count, to understand which cache eats most of RAM, when we try to solve "Synapse eats all my RAM" problem.
P. S. And separate question about root parameter
event_cache_size
- is this limit forgetEvent
cache, andcaches.global_factor
value applies to it now? Inyaml
comment there are "Not affected by caches.global_factor." but I set it to 500K, and see in Prometheus that*getEvent*
grows to 1600K with global_factor = 4.0!Also in current
homeserver.yaml
template parameterevent_cache_size
located in root, not insidecache
category, - is this right?Regarding this change https://github.com/matrix-org/synapse/pull/6391/files/2619891343cc55b307ae36e6dda6247b2d6a5f73#diff-bfb2b1823a1f152109d0007dc9c8c6e83a99ea81ffa6edc08ecca5fc8b3475daR75 -
event_cache_size
variable in must be moved from the root tocaches
subcategory, right?The text was updated successfully, but these errors were encountered: