Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Presence] Huge spike in CPU usage/Federation traffic approximately every 25 minutes #15878

Open
matrixbot opened this issue Dec 21, 2023 · 1 comment

Comments

@matrixbot
Copy link
Collaborator

matrixbot commented Dec 21, 2023

This issue has been migrated from #15878.


There is a timeout for when to send a ping over federation every 25 minutes that keeps a user from being marked 'offline' before the 30 minute timeout hits.

Federation spike 1

This appears to be the replication notifier system ramping up and queueing a bunch of federation sending requests over approximately 1 minute worth of time(give or take a few seconds)

Images

Federation spike 2

Federation spike 3

Federation spike 4

There is a database hit during this to get_current_hosts_in_room(), I'm not personally convinced it's contributing to the seriousness of this situation(but included here for completeness).

Images:

Federation spike 5

UPDATE: Additional information from the other side of the slash in the title

The large spike in traffic caused by queueing and then sending all those requests looks like this:
Federation spike 7

@matrixbot matrixbot changed the title Dummy issue [Presence] Huge spike in CPU usage/Federation traffic approximately every 25 minutes Dec 22, 2023
@matrixbot matrixbot reopened this Dec 22, 2023
@realtyem
Copy link
Contributor

This can be closed as it is the nature of how presence updates are sent. To change this would require a spec change to use a meshing network of communication, which would probably be a privacy violation(never mind how brittle it could end up). Someone else's homeserver shouldn't be handling/forwarding my presence for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants