-
Notifications
You must be signed in to change notification settings - Fork 35.7k
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
During IBD, when doing pruning, prune 10% extra to avoid pruning again soon after #11658
Conversation
…n soon after Pruning forces a chainstate flush, which can defeat the dbcache and harm performance significantly.
// values, we should not prune too rapidly. | ||
// So when pruning in IBD, increase the buffer a bit to avoid a re-prune too soon. | ||
if (IsInitialBlockDownload()) { | ||
// Since this is only relevant during IBD, we use a fixed 10% |
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.
BTW, why 10%, in IBD could be even more no?
Some IRC discussion. |
Pruning forces a chainstate flush, which can defeat the dbcache and harm performance significantly. During IBD we now prune based on the worst case size of the remaining blocks, but no further than the minimum prune size of 550 MB. Based on @luke-jr's bitcoin#11658.
Pruning forces a chainstate flush, which can defeat the dbcache and harm performance significantly. During IBD we now prune based on the worst case size of the remaining blocks, but no further than the minimum prune size of 550 MB. Based on @luke-jr's bitcoin#11658.
tACK ac51a26 (although I rebased it on master). This performs better than master in my tests so far: #12404 (comment) @promag wrote:
I tried this in #12404 and there seems to be negative side effects that I can't explain. I'd say this PR is a safer choice for now. @luke-jr you may want to borrow the release note I added to my PR, though that can be done later. |
I'm currently racing two Orange Pi's with 2 GB memory. This PR means cache rarely grows beyond 300 MB, but it's still a bit faster than master; after 5 days it's at 2018-01-27 vs. master is still at 2017-11-25. |
utACK ac51a26. This should be a safe first improvement. We can later make the overshoot value configurable or smarter, but this should already be a lot better. |
utACK ac51a26. Improvement looks good. |
utACK ac51a26 |
utACK ac51a26 |
…d pruning again soon after ac51a26 During IBD, when doing pruning, prune 10% extra to avoid pruning again soon after (Luke Dashjr) Pull request description: Pruning forces a chainstate flush, which can defeat the dbcache and harm performance significantly. Alternative to #11359 Tree-SHA512: 631e4e8f94f5699e98a2eff07204aa2b3b2325b2d92e8236b8c8d6a6730737a346e0ad86024e705f5a665b25e873ab0970ce7396740328a437c060f99e9ba4d9
Post-merge tested ACK. I ran this on some memory-constrained Linodes (dbcache=1000, prune=5000, and both connect= to a single nearby fully synced node; 2GB memory, 50GB disk), and saw a reasonably consistent 15% performance increase compared to not having this patch. |
How use this ? |
@martinpgaunt it just works, if you download Bitcoin Core 0.17 when it comes out in a couple of weeks (or a bit later). |
…n soon after Summary: Pruning forces a chainstate flush, which can defeat the dbcache and harm performance significantly. Backport of Bitcoin Core PR11658 bitcoin/bitcoin#11658 Test Plan: ``` make check ``` Reviewers: Fabien, #bitcoin_abc, deadalnix, jasonbcox Reviewed By: #bitcoin_abc, jasonbcox Differential Revision: https://reviews.bitcoinabc.org/D3986
…n soon after Summary: Pruning forces a chainstate flush, which can defeat the dbcache and harm performance significantly. Backport of Bitcoin Core PR11658 bitcoin/bitcoin#11658 Test Plan: ``` make check ``` Reviewers: Fabien, #bitcoin_abc, deadalnix, jasonbcox Reviewed By: #bitcoin_abc, jasonbcox Differential Revision: https://reviews.bitcoinabc.org/D3986
…n soon after Summary: Pruning forces a chainstate flush, which can defeat the dbcache and harm performance significantly. Backport of Bitcoin Core PR11658 bitcoin/bitcoin#11658 Test Plan: ``` make check ``` Reviewers: Fabien, #bitcoin_abc, deadalnix, jasonbcox Reviewed By: #bitcoin_abc, jasonbcox Differential Revision: https://reviews.bitcoinabc.org/D3986
…to avoid pruning again soon after ac51a26 During IBD, when doing pruning, prune 10% extra to avoid pruning again soon after (Luke Dashjr) Pull request description: Pruning forces a chainstate flush, which can defeat the dbcache and harm performance significantly. Alternative to bitcoin#11359 Tree-SHA512: 631e4e8f94f5699e98a2eff07204aa2b3b2325b2d92e8236b8c8d6a6730737a346e0ad86024e705f5a665b25e873ab0970ce7396740328a437c060f99e9ba4d9
…to avoid pruning again soon after ac51a26 During IBD, when doing pruning, prune 10% extra to avoid pruning again soon after (Luke Dashjr) Pull request description: Pruning forces a chainstate flush, which can defeat the dbcache and harm performance significantly. Alternative to bitcoin#11359 Tree-SHA512: 631e4e8f94f5699e98a2eff07204aa2b3b2325b2d92e8236b8c8d6a6730737a346e0ad86024e705f5a665b25e873ab0970ce7396740328a437c060f99e9ba4d9
…to avoid pruning again soon after ac51a26 During IBD, when doing pruning, prune 10% extra to avoid pruning again soon after (Luke Dashjr) Pull request description: Pruning forces a chainstate flush, which can defeat the dbcache and harm performance significantly. Alternative to bitcoin#11359 Tree-SHA512: 631e4e8f94f5699e98a2eff07204aa2b3b2325b2d92e8236b8c8d6a6730737a346e0ad86024e705f5a665b25e873ab0970ce7396740328a437c060f99e9ba4d9
…to avoid pruning again soon after ac51a26 During IBD, when doing pruning, prune 10% extra to avoid pruning again soon after (Luke Dashjr) Pull request description: Pruning forces a chainstate flush, which can defeat the dbcache and harm performance significantly. Alternative to bitcoin#11359 Tree-SHA512: 631e4e8f94f5699e98a2eff07204aa2b3b2325b2d92e8236b8c8d6a6730737a346e0ad86024e705f5a665b25e873ab0970ce7396740328a437c060f99e9ba4d9
…to avoid pruning again soon after ac51a26 During IBD, when doing pruning, prune 10% extra to avoid pruning again soon after (Luke Dashjr) Pull request description: Pruning forces a chainstate flush, which can defeat the dbcache and harm performance significantly. Alternative to bitcoin#11359 Tree-SHA512: 631e4e8f94f5699e98a2eff07204aa2b3b2325b2d92e8236b8c8d6a6730737a346e0ad86024e705f5a665b25e873ab0970ce7396740328a437c060f99e9ba4d9
Pruning forces a chainstate flush, which can defeat the dbcache and harm performance significantly.
Alternative to #11359