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

Shuting down a room with 4k+ users takes more than 2h #7651

Open
erdnaxeli opened this issue Jun 6, 2020 · 1 comment
Open

Shuting down a room with 4k+ users takes more than 2h #7651

erdnaxeli opened this issue Jun 6, 2020 · 1 comment
Labels
A-Performance Performance, both client-facing and admin-facing T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements. Z-Help-Wanted We know exactly how to fix this issue, and would be grateful for any contribution z-p3 (Deprecated Label)

Comments

@erdnaxeli
Copy link
Contributor

erdnaxeli commented Jun 6, 2020

Description

It is not actually an issue, more a painful behavior.

I tried to use the admin API to shut down a room with 4443 local members (no remote users) and 4450 state events. It worked but took 122 minutes!

Here is a screenshot showing the users joining the new roow, it is quite slow:
2020-06-06-185221_944x713_scrot

The leave rate from the previous room was similar.

I do not claim to understand exactly what happens, but this seems very long to me, in particular when we know that the API call is synchronous. I think this API should be asynchronous, like the purge history API is.

It should be noted that purging this room was surprisingly fast: it tooks only 52s.

Steps to reproduce

I don't think anyone actually want to reproduce it, but if you do here are the steps :p

  1. create a new room
  2. create 4k users and make them join the room (you probably want to script that part)
  3. save the room's ip
  4. curl -X POST https://<your HS domain/_synapse/admin/v1/shutdown_room/<room id>

Version information

  • Homeserver: cloud.cervoi.se

If not matrix.org:

  • Version: 1.14.0

  • Install method: apt

  • Platform: Debian 10, PostgreSQL 11, Python 3.7.3
@erdnaxeli erdnaxeli changed the title Shuting down a room with 4k+ users take more than 2h Shuting down a room with 4k+ users takes more than 2h Jun 6, 2020
@erikjohnston erikjohnston added improvement z-p3 (Deprecated Label) Z-Help-Wanted We know exactly how to fix this issue, and would be grateful for any contribution labels Jun 8, 2020
@erikjohnston
Copy link
Member

Unfortunately leaves being slow is a known performance problem, which would be nice to fix but I don't think huge improvements will be feasible soon.

However, converting this to an async API like the purge history API is definitely a good idea 👍

@DMRobertson DMRobertson added T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements. and removed z-enhancement labels Aug 25, 2022
@MadLittleMods MadLittleMods added the A-Performance Performance, both client-facing and admin-facing label Dec 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Performance Performance, both client-facing and admin-facing T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements. Z-Help-Wanted We know exactly how to fix this issue, and would be grateful for any contribution z-p3 (Deprecated Label)
Projects
None yet
Development

No branches or pull requests

4 participants