feat: add shuffle size comparison benchmark [do not merge]#3909
Draft
andygrove wants to merge 2 commits intoapache:mainfrom
Draft
feat: add shuffle size comparison benchmark [do not merge]#3909andygrove wants to merge 2 commits intoapache:mainfrom
andygrove wants to merge 2 commits intoapache:mainfrom
Conversation
Add a PySpark benchmark that measures shuffle write bytes via the Spark REST API, making it easy to compare shuffle file sizes between Spark and Comet shuffle implementations.
- Add --schema short-strings option to generate_data.py that produces 7 short random UUID string columns + 1 timestamp, matching the schema from issue apache#3882 - Update shuffle_size.py to measure actual shuffle .data file sizes on disk via spark.local.dir, in addition to the REST API metric - Update run_shuffle_size_benchmark.sh with dedicated local dirs per run, driver memory, and shuffle enable config
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.
Which issue does this PR close?
Relates to #3882.
Rationale for this change
Issue #3882 reports that Comet shuffle files can be significantly larger than Spark shuffle files due to per-batch Arrow IPC format overhead. To investigate and measure this, we need a benchmark that compares actual shuffle write bytes between Spark and Comet.
What changes are included in this PR?
Adds a
shuffle-sizePySpark benchmark that:run_benchmark.py)run_shuffle_size_benchmark.sh) that runs the benchmark in both Spark and Comet native modes for easy comparisonUsage:
How are these changes tested?
This is a benchmark script, not production code. Tested manually by running the benchmark with 204M rows (7 string + 1 timestamp columns) and comparing Spark vs Comet shuffle write sizes.