element-hq / element-hq/synapse

Provide list of all Synapse caches with default limits numbers and current sizes in bytes

Open
#8,811 0 comments 0 reactions 0 assignees View on GitHub
A-Docs T-Task Z-Help-Wanted z-p2
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

This issue has been migrated from [#8811](https://github.com/matrix-org/synapse/issues/8811).

---

**Description:**
In `homeserver.yaml` we have `caches` 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 maybe `event_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 for `getEvent` cache, and `caches.global_factor` value applies to it now? In `yaml` 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 parameter `event_cache_size` located in root, not inside `cache` 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 to `caches` subcategory, right?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.