-
Notifications
You must be signed in to change notification settings - Fork 592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[v24.1.x] cloud_storage: concurrent directory walking #19815
Merged
piyushredpanda
merged 8 commits into
redpanda-data:v24.1.x
from
vbotbuildovich:backport-pr-18758-v24.1.x-466
Jun 14, 2024
Merged
[v24.1.x] cloud_storage: concurrent directory walking #19815
piyushredpanda
merged 8 commits into
redpanda-data:v24.1.x
from
vbotbuildovich:backport-pr-18758-v24.1.x-466
Jun 14, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(cherry picked from commit ec6b770)
This makes it possible to walk directories concurrently. It will be done in a subsequent commit. (cherry picked from commit ec0e855)
(cherry picked from commit 1c7d481)
One step closer to concurrent walking. (cherry picked from commit f856d46)
This speeds up cache trimming by 2 orders of magnitude even on a lightly loaded reactor. At the cost of higher number of open fds (up to 2K increase: one for directory, one for the stat call in `walk_accumulator::visit`). Also, higher pressure on the reactor (extra 1K futures/tasks), IO subsystem, syscall thread. "Lightly loaded reactor" test case: ```cpp SEASTAR_THREAD_TEST_CASE(empty_dir) { cloud_storage::recursive_directory_walker w; const std::filesystem::path target_dir = "/tmp/recdirtest"; stress_config cfg; cfg.min_spins_per_scheduling_point = 1; cfg.max_spins_per_scheduling_point = 1; cfg.num_fibers = 1; auto mgr = stress_fiber_manager{}; BOOST_REQUIRE(mgr.start(cfg)); access_time_tracker tracker; auto result = w.walk(target_dir.native(), tracker).get(); mgr.stop().get(); } ``` /tmp/recdirtest is filled by the following script: ```py import os import xxhash from pathlib import Path for folders in range (0, 600000): x = xxhash.xxh32() x.update(f'folder{folders}') d = x.hexdigest(); Path(f"./{d}/kafka").mkdir(parents=True, exist_ok=True) open(f'./{d}/kafka/segment.bin', 'a').close() ``` (cherry picked from commit ee34998)
(cherry picked from commit 5d48458)
(cherry picked from commit 8ad8459)
(cherry picked from commit 3fedeb3)
andrwng
approved these changes
Jun 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport of PR #18758