[v25.3.x] [CORE-14786] rptest: speedup data_stat#30340
Merged
WillemKauf merged 1 commit intoredpanda-data:v25.3.xfrom Apr 29, 2026
Merged
[v25.3.x] [CORE-14786] rptest: speedup data_stat#30340WillemKauf merged 1 commit intoredpanda-data:v25.3.xfrom
rptest: speedup data_stat#30340WillemKauf merged 1 commit intoredpanda-data:v25.3.xfrom
Conversation
Currently, we use:
```
f"find {RedpandaService.DATA_DIR} -type f -exec stat -c '%n %s' '{{}}' \\;"
```
as a way to stat all of the files in a `redpanda` directory on a node.
This is bad: with `-exec stat ... \;`, `find` runs one `stat` process per file.
We can do better simply by changing this command instead to:
```
f"find {RedpandaService.DATA_DIR} -type f -exec stat -c '%n %s' '{{}}' +"
```
Where `find` will batch as many files as possible to each `stat` call.
However, we can do even better by not using `-exec` at all:
```
f"find {RedpandaService.DATA_DIR} -ignore_readdir_race -type f -printf '%p %s\\n'"
```
Here, we don't need to fork any extra processes at all, and everything is
handled natively in `find`. Concurrent removal of files is silenced with
the flag `-ignore_readdir_race`.
This should fix timeouts in CI for tests with large numbers of files,
where 20+ minutes is spent waiting on these stat commands.
(cherry picked from commit 204defb)
WillemKauf
approved these changes
Apr 29, 2026
Collaborator
Author
Retry command for Build#83818please wait until all jobs are finished before running the slash command |
Collaborator
Author
CI test resultstest results on build#83818
|
This file contains hidden or 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
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 #30329