[Paper Review] Sparkle: Optimizing Spark for Large Memory Machines and Analytics
Sparkle optimizes Apache Spark for large-memory scale-up systems by replacing TCP-based shuffling with a shared-memory shuffle engine and introducing an off-heap memory store for efficient in-place updates. This enables up to 20x performance improvement on iterative graph workloads and 1.6x–5x speedup over scale-out clusters with equivalent hardware.
Spark is an in-memory analytics platform that targets commodity server environments today. It relies on the Hadoop Distributed File System (HDFS) to persist intermediate checkpoint states and final processing results. In Spark, immutable data are used for storing data updates in each iteration, making it inefficient for long running, iterative workloads. A non-deterministic garbage collector further worsens this problem. Sparkle is a library that optimizes memory usage in Spark. It exploits large shared memory to achieve better data shuffling and intermediate storage. Sparkle replaces the current TCP/IP-based shuffle with a shared memory approach and proposes an off-heap memory store for efficient updates. We performed a series of experiments on scale-out clusters and scale-up machines. The optimized shuffle engine leveraging shared memory provides 1.3x to 6x faster performance relative to Vanilla Spark. The off-heap memory store along with the shared-memory shuffle engine provides more than 20x performance increase on a probabilistic graph processing workload that uses a large-scale real-world hyperlink graph. While Sparkle benefits at most from running on large memory machines, it also achieves 1.6x to 5x performance improvements over scale out cluster with equivalent hardware setting.
Motivation & Objective
- Address performance bottlenecks in Spark when running on large-memory scale-up systems, where traditional TCP-based shuffling and JVM heap management are inefficient.
- Reduce garbage collection pressure caused by immutable RDDs and frequent data shuffling in iterative workloads like machine learning and graph analytics.
- Leverage global shared memory in scale-up systems to eliminate network stack overhead and enable low-latency, high-throughput data communication between tasks.
- Improve memory efficiency and scalability for memory-intensive, iterative data analytics by introducing an off-heap memory store for direct, in-place updates.
- Demonstrate that scale-up architectures can outperform scale-out clusters for communication- and memory-intensive workloads when Spark is properly optimized.
Proposed method
- Design a shared-memory management scheme and allocator that enables worker processes to directly access and manage native global shared memory without JVM object overhead.
- Implement a shared-memory shuffle engine that replaces TCP/IP-based data transfer with direct memory references, eliminating serialization, deserialization, and copying costs.
- Introduce an off-heap memory store for caching and updating data structures (e.g., belief vectors, messages) directly in native memory, allowing in-place updates and reducing GC pressure.
- Optimize graph processing by consolidating multiple shuffle stages into one via global memory visibility, reducing iteration overhead.
- Offload performance-critical kernels (e.g., message aggregation) from Scala to C++ to accelerate computation.
- Integrate fault tolerance via periodic checkpointing in the off-heap store, with minimal performance impact (only ~8% overhead in worst case).
Experimental results
Research questions
- RQ1Can shared-memory communication in Spark significantly reduce shuffle latency compared to TCP/IP in large-memory scale-up systems?
- RQ2To what extent can an off-heap memory store reduce garbage collector pressure and improve performance in iterative Spark workloads?
- RQ3How does Sparkle’s architecture compare to vanilla Spark in terms of performance and memory efficiency on scale-up versus scale-out configurations?
- RQ4What is the impact of shared-memory shuffling and off-heap storage on the performance of large-scale graph analytics workloads like belief propagation?
- RQ5Can fault tolerance mechanisms be efficiently integrated into off-heap storage without incurring significant performance penalties?
Key findings
- The shared-memory shuffle engine alone improves performance by 1.3x to 6x over vanilla Spark on scale-up machines.
- The combination of shared-memory shuffle and off-heap memory store achieves over 20x speedup on a large-scale belief propagation workload using a real-world hyperlink graph.
- Sparkle achieves 1.6x to 5x performance improvement over equivalent scale-out clusters, demonstrating the advantage of scale-up systems when properly optimized.
- Memory usage is drastically reduced: Sparkle uses 144 GB off-heap memory without on-heap cache, compared to over 700 GB in vanilla Spark for the same workload.
- Consolidating two shuffle stages into one via global memory access reduces per-iteration time from 13 seconds to 9 seconds in the belief propagation workload.
- Fault tolerance via checkpointing adds only ~8% execution time overhead in the worst case, confirming the efficiency of Sparkle’s fault tolerance design.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.