Repository navigation
chunkio: add optional file-slot pool to bound dentry/inode churn - #117
dpavlov2024 wants to merge 1 commit into
Conversation
Signed-off-by: Dmitri Pavlov <dpavlov@perforce.com>
|
Test pool_slot_name_parse... |
|
100% tests passed, 0 tests failed out of 6 Total Test time (real) = 0.47 sec |
Integration results - pool fix on master (5.2.0 line), 2026-10-12(unit/sanitizer section refreshed 2026-10-13 after review hardening) Image: Pipeline: the 100-stream tail rig - 100 tail log files at 15 MB/s -> filesystem A/B via
|
| setting | slab_reclaimable 300 s |
slope | chunk files |
|---|---|---|---|
storage.file_pool_size unset |
+1446 KB | ~17.4 MB/h | unique names, churning |
storage.file_pool_size 2048 |
+196 KB | ~2.4 MB/h | 100% slot-*.flb, reused |
Startup log reflects the setting:
[storage] ver=1.5.4, type=memory+filesystem, sync=normal, checksum=off,
max_chunks_up=32, file_pool_size=2048
Restart recovery (option on)
- Ran with the option off + HEC delay to build a backlog: 36 pending
stock-named chunk files. - Stopped the container, restarted with
storage.file_pool_size 2048:could not retrieve chunk tagerrors: 0- all 36 legacy chunks delivered and unlinked (unique files 36 -> 0)
- 36 slot files remain (the reusable pool)
Opt-out after opt-in
- Ran with the pool on, then stopped with 35 slot chunks pending.
- Restarted with the option unset (stock behaviour): 0 tag errors, HEC event
counter kept increasing (chunks recovered/delivered), no errors.
Unit / sanitizers
- chunkio
ctest: 6/6 suites;fs_pool: 20/20 tests, including the
review additionspool_counter_balance(max_chunks_up limit, failed
down-chunk read, failed corrupt-slot open and pool-disabled delete-by-name)
andpool_threaded_max_chunks(8 threads racing the atomic up-slot
reservation withmax_chunks_up4, 20 rounds). Full run in
fs_pool-tests.txt. - Stress:
cio-test-fs_pool0 failures / 3000 runs. - ASan/UBSan build of
fs_pool: clean; TSan (-fsanitize=thread): clean. - Valgrind
--leak-check=full: 0 definitely/indirectly lost, 0 errors
(seevalgrind-summary.txt). - Full matrix (clang 18, UBSan full ctest,
-Wall -Wextra, ASan caveat):
thread-safety-notes.md.
Notes
- On ext4-stored chunk/log/tail-db paths a residual ~10-30 MB/h remains from
ext4 block metadata churn (ftruncate/WAL writes), independent of this
change; with those paths on XFS the patched profile is near-flat (~2.4 MB/h
with no linear chunk-file component, the same figure as the 5.1.2 VM A/B:
+2.3 vs +533 MB/h). - The option is per chunkio context (all filesystem streams), default 0
(disabled), clamped to 4096.
|
definitely lost: 0 bytes in 0 blocks |
Stress and sanitizer resultsRun 2026-10-13 against the review-hardened tree (20
Note: the chunkio fs tests use the fixed directory |
Windows (MSVC) test resultsHost: Windows Server 2022, Visual Studio 2022 Build Tools (MSVC x64), All chunkio suites pass (exit codes):
The counter-balance test asserts the loaded-chunk state around delete-by-name, |
|
Test pool_slot_name_parse... |
Refs fluent/fluent-bit#12504 (as requested there, the implementation is proposed here in chunkio first; a fluent-bit PR will follow).
Opt-in per-stream file-slot pool for filesystem storage. Recycles a bounded set of slot files instead of creating and unlinking a unique file per flush, which stops the unbounded dentry/inode slab growth on cgroup v2. Cited by the fluent-bit PR; evidence in the comments.