Skip to content
New issue

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

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

Already on GitHub? # to your account

Cache: Heuristic to avoid storing large transactions? #330

Open
jamadden opened this issue Aug 14, 2019 · 0 comments
Open

Cache: Heuristic to avoid storing large transactions? #330

jamadden opened this issue Aug 14, 2019 · 0 comments

Comments

@jamadden
Copy link
Member

Things like rebuilding catalogs can produce large transactions. While those transactions can use savepoints to reduce their internal memory usage, at the end of the transaction the local cache will currently store everything, up until its limit, potentially flushing out lots of other useful data (Especially if these are new objects, we have no idea if they'll be needed soon.) This can also take a long time in a way that blocks event loops (though it does grab and release an internal lock a lot so there is opportunity for thread/greenlet switching; but it also reads from disk).

We have a rough heuristic around the checkpoints to try to avoid polling large transactions. Perhaps we can do something similar-ish here: if the stored data is more than x% of the available cache space, don't bother?

@jamadden jamadden added this to the 3.0 milestone Aug 28, 2019
@jamadden jamadden removed this from the 3.0 milestone Oct 20, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant