Big wallet, Flushing wallet.dat is quite slow #2511

issue 007pig opened this issue on April 11, 2013
  1. 007pig commented at 6:05 PM on April 11, 2013: none

    I have a wallet with many transactions. It's around 200M. and each wallet flushing takes 4 seconds and blocks JSON RPC calls.

    I think it should be improved.

  2. sipa commented at 6:06 PM on April 11, 2013: member

    Agree, this is a problem. It will likely be fixed when we move to non-BDB wallets.

  3. 007pig commented at 6:16 PM on April 11, 2013: none

    When will it happen do you know?

  4. 007pig commented at 2:17 AM on April 12, 2013: none

    CTxMemPool::accept() : accepted 8a01e91659 (poolsz 691) ThreadRPCServer method=move CTxMemPool::accept() : accepted 954115b276 (poolsz 692) Flushed wallet.dat 5071ms ThreadRPCServer method=getreceivedbyaddress ThreadRPCServer method=getbalance CTxMemPool::accept() : accepted 542b3860e4 (poolsz 693) ThreadRPCServer method=listtransactions Flushing wallet.dat CTxMemPool::accept() : accepted 0b274c1c36 (poolsz 694) Added 2 addresses from 68.119.78.5: 239 tried, 15033 new CTxMemPool::accept() : accepted 24ca9ce2e4 (poolsz 695) ThreadRPCServer method=move Flushed wallet.dat 4546ms

    You can see that the wallet.dat is keeping flushed and slow down everything. Can we make the flushing not so frequently? Can I increase 'dbcache' to speed it up?

  5. Diapolo commented at 2:36 PM on April 12, 2013: none

    AFAIK that Wallet flush thread was introduced by @gavinandresen the way it is currently working with Git master, perhaps we need to re-think how often the wallet is flushed, dunno not my playground ^^.

  6. toxicwind cross-referenced this on Jan 20, 2014 from issue RPC Lockup Issues with Large Wallets by jetbalsa
  7. laanwj added the label Wallet on May 3, 2014
  8. MarcoFalke cross-referenced this on Feb 7, 2016 from issue send BTC is very slow with huge wallet by JokerCatz
  9. laanwj added the label Resource usage on Feb 16, 2016
  10. gmaxwell commented at 1:50 AM on July 14, 2016: contributor

    I believe this is currently fixed in master.

  11. laanwj closed this on Mar 6, 2018

  12. MarcoFalke cross-referenced this on May 22, 2020 from issue Sqlite wallet storage by Sjors
  13. bitcoin locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-20 06:55 UTC