-
Notifications
You must be signed in to change notification settings - Fork 68
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
Increase default dbcache to ∞ #70
Comments
Currently testing this on a laptop with the following specs:
Started a full IBD from scratch with Bitcoin Knots v26.1.knots20240325 and the following options in bitcoin.conf: assumevalid=0 Will provide an update after it syncs or if there are issues. UPDATE 05/10/2024: IBD took about 33 hours and 19 minutes. Start: 2024-05-09T09:49:53Z This was done in one go with no interruptions. |
Cool, syncing |
Hmm I was almost done syncing and needed to shut down gracefully. I ran I turned the system back on and it started rolling forward from block 1 :/ My system has about 13GB ram, so I'm not sure how the cache is 20GB. Is it using swap?
|
The log shows it was killed, so the rolling forward is expected at that point I guess. :( I suppose that indicates maybe this requires benchmarking the disk and making sure we never cache more than it can write in N=30 minutes. That |
I guess people need to keep in mind that flushing to disk will take a loooong time heh
Yeah, unless we expect users to know not to use
No, the Another question, why is the cache 20GB? Isn't the entire utxoset like 12GB? |
I was slightly afraid this would happen given that I kept seeing this message...
How are we able to put off flushing to disk indefinitely? I guess the cache stores more than just the current utxoset? |
The only reason this could have worked, is because Knots checks free memory often and flushes if it's getting low. So it would be a bug to activate swap (aside from the OS deciding swap is optimal anyway). It might be good to have further testing monitor swap usage and desktop usability while it syncs.
Size on disk is not necessarily size in memory. I would expect them to be closer, but I haven't ever compared. Perhaps this is another area things could be optimised? Obvious differences (coins.h class Coin) are that we store the height (in memory and disk) even when it's not strictly needed, and we only compress the UTXO set on disk.
The log message is about the final disk sync after IBD completes. It might still sync periodically before that. Maybe comment on bitcoin#15218 that the message is confusing, so it gets addressed.
I don't think it does. |
Yesterday I did a full IBD on my local network and I happened to run What I saw during the flush is that the chainstate dir kept growing and shrinking continuously, like Based on that it seemed like the dbcache holds some sort of log data structure that then applies to the chainstate sequentially, not the latest utxo set directly 🤔 |
Bitcoin Knots already detects low-memory situations and flushes caches when there's only 10 MB left. It would be nice to just leave the UTXO cache unbound for optimal performance.
But is 10 MB enough? Or will it cause problems?
Testing requested :)
Just set dbcache=1048576 and let me know if you run into issues (maybe re-sync too)
The text was updated successfully, but these errors were encountered: