-
Notifications
You must be signed in to change notification settings - Fork 37.7k
assumeutxo: keep cache when flushing snapshot (#17487 followup) #27008
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
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d6f54da
to
2834617
Compare
Thanks for the look @Sjors. I also realized that there were two outlier calls where we weren't asserting that Flush()/Sync() has succeeded, so I've fixed those. |
Benchmark results available here: bitcoin#17487 (comment)
We've historically done this check in most places, so make sure we're doing it uniformly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback @Sjors.
2834617
to
937016b
Compare
re-utACK 937016b |
From my testing of #15606 - without this PR - I get the impression that flushing isn't working, specifically that RAM is not freed up. It could just be confusion on my end from rebase hell, but I'd like to make sure we're not obscuring a bug by merging this. (I initially assumed the main assumeutxo PR already contained this PR because RAM didn't go down) |
@Sjors how did you detect that RAM wasn't being freed? Did you verify that the flush did not happen based on an absence of logs? Measures of memory can be deceptive; I remember bitcoinperf spuriously detecting an increase in memory usage because once claimed, the process' resident set size (RSS) doesn't necessarily go down upon free. |
@jamesob using the system monitor desktop app in Ubuntu, and I believe also based on the cache size log messages. I'll double check this next time I run it. |
Actually this is broken at the moment, since although we don't flush after snapshot load, we do flush (and not sync) in the MaybeRebalanceCaches() -> FlushStateToDisk() call right after activating the chainstate snapshot. Will close this and think about how to rework it. |
Make use of #17487.
Benchmark results available here:
#17487 (comment)