pr-1292/derrickstolee/bitmap-memory-v2
tagged this
19 Jul 15:26
We noticed an instance where writing multi-pack-index bitmaps was taking a lot of memory. This small change can reduce the memory pressure slightly (~25%), but more will be needed to significantly reduce the memory pressure. Such a change would require updating the bitmap writing code to use on-disk data structures instead. This is particularly tricky when the multi-pack-index has not been fully written, because we don't want a point in time where the object store has a new multi-pack-index without a reachability bitmap. Updates in v2 ============= To reduce confusion on the lifetime of 'ctx.entries', some refactoring patches are inserted to first extract the use of 'ctx' out of write_midx_bitmap() and into write_midx_internal(). This makes the FREE_AND_NULL() stand out more clearly. Thanks, -Stolee Derrick Stolee (3): pack-bitmap-write: use const for hashes midx: extract bitmap write setup midx: reduce memory pressure while writing bitmaps midx.c | 69 +++++++++++++++++++++++++++++---------------- pack-bitmap-write.c | 2 +- pack-bitmap.h | 2 +- 3 files changed, 47 insertions(+), 26 deletions(-) base-commit: 9dd64cb4d310986dd7b8ca7fff92f9b61e0bd21a Submitted-As: https://lore.kernel.org/git/pull.1292.v2.git.1658244366.gitgitgadget@gmail.com In-Reply-To: https://lore.kernel.org/git/pull.1292.git.1658176565751.gitgitgadget@gmail.com
Assets 2
-
2022-07-19T15:26:06Z -
2022-07-19T15:26:06Z -