bitcoinknots / bitcoin

Bitcoin Knots enhanced Bitcoin node/wallet software
MIT License
200 stars 60 forks source link

Increase default dbcache to ∞ #70

Open luke-jr opened 2 months ago

luke-jr commented 2 months ago

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)

tchjntr commented 1 week ago

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 blockfilterindex=1 blocksonly=1 coinstatsindex=1 connect=[IP address of my main Bitcoin full node in my home network] dbcache=1048576 discover=0 dns=0 dnsseed=0 listen=0 peerblockfilters=1 peerbloomfilters=1 server=1 txindex=1 v2transport=1

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 Finished syncing to tip: 2024-05-10T18:47:35Z (Block 842887)

This was done in one go with no interruptions.