Rename LevelDB background compaction thread #12664

pull eklitzke wants to merge 1 commits into bitcoin:master from eklitzke:bgcompact changing 1 files +3 −0
  1. eklitzke commented at 5:05 PM on March 10, 2018: contributor

    LevelDB performs frequent and potentially expensive background compactions, especially at process start time. It launches its own thread to manage this task. Unfortunately this thread inherits the name of the whatever thread initiated the write, usually bitcoin-loadblk or bitcoin-msghand. This can lead to erroneous assumptions about what those threads are doing.

    This change isn't really that useful by itself, but in general I am interested in making more changes to the LevelDB environment. Other changes I'd like to make:

    • Have the environment report if it uses mmap, and what the limit is
    • Allow changing the mmap and fd limits
    • Make limits per-handle rather than global
    • De-prioritizing CPU on the background compaction thread

    Another way to do this is to not modify env_posix.cc, and bring all of the environment code in tree. This is what the LevelDB documentation recommends doing, and is also what Chome and Chromium do (they do not use env_posix.cc at all). I am open to doing that too (it's not as much work as it sounds), this PR is kind of a litmus test for how people feel about the topic generally.

  2. Rename LevelDB background compaction thread
    This renames the LevelDB background thread, which makes looking at
    process output *much* less annoying. Currently the bg compaction thread
    inherits the name of whatever Bitcoin thread actually created it, which
    makes looking at output from top, ps, and profiling tools very
    confusing.
    fb120d89d4
  3. fanquake added the label Upstream on Mar 10, 2018
  4. eklitzke commented at 12:32 AM on March 11, 2018: contributor

    It seems that I should send these PRs to https://github.com/bitcoin-core/leveldb

  5. eklitzke closed this on Mar 11, 2018

  6. DrahtBot locked this on Sep 8, 2021
Contributors
Labels

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-17 00:15 UTC

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