Use PyArrow for zero-copy interaction with the Ray Object Store #36
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.
Ray Shuffle is currently 2x slower than disk-based shuffle. My theory is that there is too much serde and memcpys going on. There really shouldn't be any because the Arrow in-memory format is supported natively by the Ray object store. This PR addresses that.
In this PR:
pyarrow.RecordBatch
andpyarrow.ResultSet
. This makes them picklable so that we don't have to convert them from bytes.schedule_execution
really doesn't have to be remote tasks since with Ray shuffle we are scheduling all tasks at the beginning of execution. Hence made it a recursive function call. This also saves serde cost of execution plans.Using PyArrow, Ray Shuffle is now slightly faster than disk-based shuffle on a single node. (See before/after comparison. Plot titles are wrong; this is on a single node).
I also tested against SparkSQL on a 4-node cluster and RaySQL is 2.5x faster.