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

RoomHierarchyRestServlet hammers the DB way too hard #11919

Closed
ara4n opened this issue Feb 5, 2022 · 3 comments
Closed

RoomHierarchyRestServlet hammers the DB way too hard #11919

ara4n opened this issue Feb 5, 2022 · 3 comments
Labels
A-Spaces Hierarchical organization of rooms T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements.

Comments

@ara4n
Copy link
Member

ara4n commented Feb 5, 2022

Looking at the resource graphs for the main synapse process on attendees.fosdem.org, by far the largest resources (by 10x) are being consumed by RoomHierarchyRestServlet, which is hammering away at get_room_version at ~75Hz, and averaging 150ms of db time per transaction:

Screenshot 2022-02-05 at 16 07 34

Feels like we're missing a cache, given the room hierarchy is hardly going to be changing much, and the room version even less(!)

@squahtx squahtx added the A-Spaces Hierarchical organization of rooms label Feb 5, 2022
@clokep
Copy link
Member

clokep commented Feb 7, 2022

Looking at the resource graphs for the main synapse process on attendees.fosdem.org

Note that this API is safe to go to workers.

Feels like we're missing a cache, given the room hierarchy is hardly going to be changing much

The hierarchy depends on the requester, so is a bit hard to cache efficiently.

and the room version even less(!)

This is #11706 and is a regression. There's a fix at #11808.

@clokep
Copy link
Member

clokep commented Feb 7, 2022

Maybe related: #11694.

@clokep clokep added the T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements. label Feb 7, 2022
@clokep
Copy link
Member

clokep commented Oct 21, 2022

I think this was essentially a duplicate of #11706 and not specifically related to the hierarchy endpoint.

@clokep clokep closed this as completed Oct 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Spaces Hierarchical organization of rooms T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements.
Projects
None yet
Development

No branches or pull requests

3 participants