Skip to content

Synapse 1.53#1273

Merged
babolivier merged 4 commits into
masterfrom
babolivier/synapse1.53
Feb 22, 2022
Merged

Synapse 1.53#1273
babolivier merged 4 commits into
masterfrom
babolivier/synapse1.53

Conversation

@babolivier
Copy link
Copy Markdown

@babolivier babolivier commented Feb 22, 2022

And it's a chunky one.

To be merged only once 1.53 is released.

Preview: https://pr1273--matrix-org-previews.netlify.app

Copy link
Copy Markdown
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great in general!


To avoid being overly intensive on resources by making too many queries to the database, Synapse maintains several in-memory caches to store data it needs to use frequently. However, this comes with the inconvenience that, if Synapse needs to store too much data, these caches can become fairly big and occupy too much space in the host's memory.

Historically, Synapse has been dealing with this issue by having set sizes for each cache, either hardcoded or set in the configuration, and evicting the oldest items when exceeding this size. But relying just on this solution alone comes with its own issues. For example, adding an entry to the cache that Synapse will only rarely use might cause it to evict other entries that it needs to use more often, thus forcing Synapse to query the database for them again.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Historically, Synapse has been dealing with this issue by having set sizes for each cache, either hardcoded or set in the configuration, and evicting the oldest items when exceeding this size. But relying just on this solution alone comes with its own issues. For example, adding an entry to the cache that Synapse will only rarely use might cause it to evict other entries that it needs to use more often, thus forcing Synapse to query the database for them again.
Historically, Synapse has dealt with this issue by having set sizes for each cache, either hardcoded or set in the configuration, and evicting the oldest items when exceeding this size. But relying just on this solution alone comes with its own issues. For example, adding an entry to the cache that Synapse will only rarely use might cause it to evict other entries that it needs to use more often, thus forcing Synapse to query the database for them again.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we haven't done anything to address the fact that a new cache entry might evict more useful entries, so the last sentence here is wrong.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed that sentence entirely since it's not needed and a bit confusing anyway.

@babolivier babolivier requested a review from richvdh February 22, 2022 13:41
@thibaultamartin
Copy link
Copy Markdown
Contributor

Can I get a tweetable summary in the advocacy room when this is merged :) ?

@babolivier babolivier merged commit 8667385 into master Feb 22, 2022
@babolivier babolivier deleted the babolivier/synapse1.53 branch February 22, 2022 13:53
babolivier added a commit that referenced this pull request Feb 22, 2022
This doesn't impact anything on the public website (it doesn't look like Gatsby uses the file tree we have in the repo to generate URLs), but I realised while writing #1273 that the blog post for Synapse 1.52 was in the directory for January instead of February.
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.

3 participants