Async I/O queue#100
Merged
tavianator merged 6 commits intomainfrom Jun 13, 2023
Merged
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
0afa621 to
cc923a7
Compare
24 tasks
1ff1d21 to
8e509d4
Compare
Parallelism is controlled by the new -j flag.
This avoids the need to grow the fd table during the search, significantly reducing kernel contention when opening directories in parallel.
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.
See #101.
Performance
Performance is a work-in-progress; not every optimization from #101 is implemented yet. Here's a quick summary of the results so far:
Depth-first search is quite a bit slower (3.8x)Full benchmark results
Complete traversal
Small tree
bfs-main ~/code/bfs/history -falsebfs-ioq~2 ~/code/bfs/history -falsebfs-ioq~1 ~/code/bfs/history -falsebfs-ioq ~/code/bfs/history -falseMedium tree
bfs-main ~/code/linux -falsebfs-ioq~2 ~/code/linux -falsebfs-ioq~1 ~/code/linux -falsebfs-ioq ~/code/linux -falseLarge tree
bfs-main ~/code/android -falsebfs-ioq~2 ~/code/android -falsebfs-ioq~1 ~/code/android -falsebfs-ioq ~/code/android -falseEarly termination
Shallow file
bfs-main ~/code/android -name ConstClassBenchmark.java -quitbfs-ioq~2 ~/code/android -name ConstClassBenchmark.java -quitbfs-ioq~1 ~/code/android -name ConstClassBenchmark.java -quitbfs-ioq ~/code/android -name ConstClassBenchmark.java -quitMedium file
bfs-main ~/code/android -name DominatorsComputation.java -quitbfs-ioq~2 ~/code/android -name DominatorsComputation.java -quitbfs-ioq~1 ~/code/android -name DominatorsComputation.java -quitbfs-ioq ~/code/android -name DominatorsComputation.java -quitDeep file
bfs-main ~/code/android -name TestSidecarCompat.java -quitbfs-ioq~2 ~/code/android -name TestSidecarCompat.java -quitbfs-ioq~1 ~/code/android -name TestSidecarCompat.java -quitbfs-ioq ~/code/android -name TestSidecarCompat.java -quitSearch strategies
dfs
bfs-main -S dfs ~/code/linux -falsebfs-ioq~2 -S dfs ~/code/linux -falsebfs-ioq~1 -S dfs ~/code/linux -falsebfs-ioq -S dfs ~/code/linux -falseids
bfs-main -S ids ~/code/linux -falsebfs-ioq~2 -S ids ~/code/linux -falsebfs-ioq~1 -S ids ~/code/linux -falsebfs-ioq -S ids ~/code/linux -falseeds
bfs-main -S eds ~/code/linux -falsebfs-ioq~2 -S eds ~/code/linux -falsebfs-ioq~1 -S eds ~/code/linux -falsebfs-ioq -S eds ~/code/linux -falseCold cache
bfs-main ~/code/linux -falsebfs-ioq~2 ~/code/linux -falsebfs-ioq~1 ~/code/linux -falsebfs-ioq ~/code/linux -false