Add undocumented -forcecompactdb to force LevelDB compactions #10985

pull sipa wants to merge 1 commits into bitcoin:master from sipa:20170803_forcecompactdb changing 2 files +7 −1
  1. sipa commented at 11:26 PM on August 3, 2017: member

    No description provided.

  2. sipa force-pushed on Aug 3, 2017
  3. MarcoFalke commented at 6:35 AM on August 4, 2017: member

    The option names don't match. Pick one ;)

  4. MarcoFalke added the label Scripts and tools on Aug 4, 2017
  5. MarcoFalke added the label UTXO Db and Indexes on Aug 4, 2017
  6. Add undocumented -forcecompactdb to force LevelDB compactions 8842d1a5d4
  7. sipa force-pushed on Aug 4, 2017
  8. sipa commented at 6:45 AM on August 4, 2017: member

    I tested it, it instantly ran a 20-minute compaction operation (spinning disk, encrypted/compressed ZFS volume). It slightly reduced the size (though it was only 2.something GB already). During the operation, the usage increased to 3.something GB and went down again.

  9. achow101 commented at 6:49 AM on August 4, 2017: member

    ACK 8842d1a5d48bb6015030b12407ebd2060160c40f

    Compaction of block index time with txindex: 1 hour 3 min Block index had no size change, 12 GB before and after

    Compaction of chainstate time: 10 min Chainstate reduced from 5.9 GB to 2.7 GB

  10. TheBlueMatt commented at 7:26 PM on August 4, 2017: member

    utACK

  11. gmaxwell approved
  12. gmaxwell commented at 12:17 AM on August 5, 2017: contributor

    ACK.

    2017-08-04 23:41:19 Starting database compaction of /home/gmaxwell/.bitcoin/blocks/index 2017-08-04 23:41:23 Finished database compaction of /home/gmaxwell/.bitcoin/blocks/index 2017-08-04 23:41:29 Starting database compaction of /home/gmaxwell/.bitcoin/chainstate 2017-08-04 23:45:54 Finished database compaction of /home/gmaxwell/.bitcoin/chainstate

    on my slow laptop, which only had about 1GB free, now it has 4.3GB free!

    Running it again when already compacted (and no new blocks processed) gave:

    2017-08-04 23:55:20 Starting database compaction of /home/gmaxwell/.bitcoin/blocks/index 2017-08-04 23:55:20 Finished database compaction of /home/gmaxwell/.bitcoin/blocks/index 2017-08-04 23:55:25 Starting database compaction of /home/gmaxwell/.bitcoin/chainstate 2017-08-04 23:55:25 Finished database compaction of /home/gmaxwell/.bitcoin/chainstate

    Then after syncing 174 blocks:

    2017-08-05 00:04:41 Starting database compaction of /home/gmaxwell/.bitcoin/blocks/index 2017-08-05 00:04:44 Finished database compaction of /home/gmaxwell/.bitcoin/blocks/index 2017-08-05 00:04:49 Starting database compaction of /home/gmaxwell/.bitcoin/chainstate 2017-08-05 00:13:49 Finished database compaction of /home/gmaxwell/.bitcoin/chainstate

  13. laanwj commented at 11:10 AM on August 5, 2017: member

    utACK 8842d1a

  14. laanwj merged this on Aug 5, 2017
  15. laanwj closed this on Aug 5, 2017

  16. laanwj referenced this in commit d896d5cc42 on Aug 5, 2017
  17. codablock referenced this in commit 463e6b7536 on Sep 27, 2017
  18. codablock referenced this in commit c61111096b on Oct 12, 2017
  19. codablock referenced this in commit 4724488987 on Oct 26, 2017
  20. codablock referenced this in commit 1c230eda26 on Oct 26, 2017
  21. codablock referenced this in commit 790e07a5c6 on Oct 26, 2017
  22. codablock referenced this in commit 64379c68be on Oct 30, 2017
  23. codablock referenced this in commit 57f15fc0e9 on Oct 31, 2017
  24. codablock referenced this in commit 7fbb900c77 on Oct 31, 2017
  25. codablock referenced this in commit 8780c762e2 on Oct 31, 2017
  26. UdjinM6 referenced this in commit 33997bc1d0 on Nov 8, 2017
  27. PastaPastaPasta referenced this in commit cc238e8ba4 on Aug 6, 2019
  28. PastaPastaPasta referenced this in commit fe424600d3 on Aug 6, 2019
  29. PastaPastaPasta referenced this in commit fc821e10ab on Aug 6, 2019
  30. PastaPastaPasta referenced this in commit a8c2b3ab76 on Aug 7, 2019
  31. PastaPastaPasta referenced this in commit 8102280df8 on Aug 8, 2019
  32. PastaPastaPasta referenced this in commit cfc6975271 on Aug 12, 2019
  33. barrystyle referenced this in commit 7b325cbda6 on Jan 22, 2020
  34. DrahtBot 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-04-18 09:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me