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

Partial revert #17044 to fix sql performance regression #17154

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

csett86
Copy link

@csett86 csett86 commented May 4, 2024

For details see #17129. Compared to a full revert, we
keep the class method instroduced in #17129, as its used
elsewhere by now

Fixes: #17129
Signed-off-by: Christoph Settgast csett86_git@quicksands.de

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
    • Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
  • Code style is correct
    (run the linters)

@csett86 csett86 requested a review from a team as a code owner May 4, 2024 16:02
@CLAassistant
Copy link

CLAassistant commented May 4, 2024

CLA assistant check
All committers have signed the CLA.

For details see element-hq#17129. Compared to a full revert, we
keep the class method instroduced in element-hq#17129, as its used
elsewhere by now

Fixes: element-hq#17129
Signed-off-by: Christoph Settgast <csett86_git@quicksands.de>
@erikjohnston
Copy link
Member

@csett86 have you tried this and seen that it helps? The queries should basically be the same so am a bit confused how the revert would help, but if you've confirmed it does then I'll have a deeper look

@csett86
Copy link
Author

csett86 commented May 8, 2024

Yes @erikjohnston, I have deployed this for 10 days now and it helps immensely: #17129 (comment)

This is on a public homeserver with a reasonable amount of rooms and active users, where postgres was maxing out without this revert. See the issue #17129 for details and others reporting the same.

@csett86 csett86 changed the title Partial revert #17044 to fix sql performace regression Partial revert #17044 to fix sql performance regression May 8, 2024
@erikjohnston
Copy link
Member

Hi @csett86, I would be very interested to know if the patch in #17169 helps?

@PhieF
Copy link

PhieF commented May 11, 2024

@csett86 I can confirm your mr also fixes my problem, I'm using your patch on a docker build, io is back to normal as well as cpu usage, thanks !

@reivilibre
Copy link
Contributor

We don't currently think this is safe, but we're still looking into how to fix the performance regression in a safe way.

@reivilibre reivilibre removed the request for review from a team May 29, 2024 11:31
@PhieF
Copy link

PhieF commented Jun 1, 2024

@reivilibre for now I'm keeping this patch on my server, without it it is fully unusable (both synapse and other services)

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

Successfully merging this pull request may close these issues.

Very long query times for get_auth_chain_difference_chains
5 participants