Performance highlights

RisingWave demonstrates significant performance advantages in a majority of stream processing scenarios, particularly those involving complex state management. Here are some key takeaways from the latest benchmark results:

  • High throughput: RisingWave consistently delivers high throughput across various Nexmark queries, reaching up to 893.2 thousand records per second (kr/s) in q1 and 770.0 kr/s in q7-rewrite.
  • Efficient resource utilization: RisingWave showcases efficient resource utilization, achieving up to 127.36 kr/s per core in q2.
  • Strong performance in complex queries: RisingWave maintains robust performance even in complex queries like q7, q9, q18, and q20, which involve significant state management.

Detailed benchmark results

Nexmark QueryThroughput (kr/s)Throughput/core(kr/s)Compute CPU AvgCompute Mem Avg(GiB)Compactor CPU AvgCompactorMem Avg(GiB)
q0783.1118.41661.26%1.10.074%0.05
q1893.2119.37748.2%1.90.09%0.05
q2805.3127.36632.2%1.80.078%0.05
q3705.097.358719.93%7.84.2%0.15
q484.313.923525.25%7.980.24%0.26
q542.15.2249734.04%8.171.72%0.23
q5-rewrite70.79.08694.26%8.083.99%0.26
q7219.120.348792.35%9.1284.44%0.48
q7-rewrite770.099.37757.67%5.017.21%0.14
q8483.560.732763.5%8.232.62%0.30
q938.08.2208299.34%8.7162.9%0.49
q10730.1106.15681.04%4.86.77%0.14
q11NA
q12NA
q13NA
q1477.745.371171.2%1.10.055%0.05
q15104.178.525126.12%6.56.45%0.078
q1630.88.0565375.85%8.56.45%0.093
q17126.617.314715.63%7.815.57%0.20
q1877.89.8455771.15%7.819.06%0.23
q19NA
q2083.312.726372.08%9.1282.46%0.56
q21626.289.377692.52%5.18.11%0.20
q22808.6110.5731.63%5.20.16%0.12Z

Benchmark methodology

The performance tests were conducted using the Nexmark benchmark, a widely recognized standard in the stream processing field. In addition to the standard Nexmark queries, an extended set of 5 queries was included to cover a broader range of common SQL operators.

Environment

  • Hardware: Cloud Isolation Environment using single-node instances (8 vCPUs, 16GB memory) with S3 storage. Each pod exclusively occupies one machine.

  • RisingWave version: nightly-20230309

  • RisingWave configuration:

    [storage]
    block_cache_capacity_mb = 2048
    meta_cache_capacity_mb = 512
    compactor_memory_limit_mb = 2560
    shared_buffer_capacity_mb = 2048
    

Test procedure

  1. Data was populated into Kafka using the nexmark-bench tool.
  2. Nexmark Kafka sources were created using these SQLs.
  3. CREATE SINK (blackhole) was used to test the performance and cost of Nexmark queries.
  4. The RisingWave cluster was deployed via kube-bench.

RisingWave’s performance has been extensively benchmarked against Apache Flink, providing valuable insights into its relative strengths. The comparison reveals significant performance advantages in most streaming scenarios.

Key comparative findings

  • RisingWave outperformed Flink in 22 out of 27 queries
  • 12 queries showed performance improvements of ≥50% compared to Flink
  • 10 queries demonstrated more than 2x performance improvement
  • Exceptional improvements were observed in:
    • Dynamic filtering operations (q102: 520x faster)
    • Anti-join operations (q104: 660x faster)
    • Complex state management queries (q7: 62x faster)

Performance characteristics by query type

  • Queries with large internal states (>20GB)
  • Complex join operations
  • Dynamic filtering operations
  • Aggregations with large state management
  • Basic stateless computations
  • Simple filtering operations
  • Network I/O bound operations
  • Window aggregations without EOWC support (q5)
  • Distinct aggregations without split optimization (q16)

Key performance factors

RisingWave’s performance advantages can be attributed to several design and implementation choices:

  1. Rust-based architecture: RisingWave is built from the ground up in Rust and minimizes reliance on third-party JVM components. This provides inherent performance benefits at the computation layer.
  2. Direct SQL optimization: Unlike systems with multiple abstraction layers, RisingWave directly optimizes SQL queries, enabling highly customized performance tuning.
  3. Computation-aware storage: RisingWave’s custom storage implementation is aware of the computation, allowing for intelligent state management and reduced storage costs by leveraging remote storage (e.g., S3, HDFS).

Areas of strength

RisingWave excels in scenarios with:

  • Complex stateful computations: Queries requiring large and complex internal states benefit significantly from RisingWave’s efficient state management.
  • Multi-stream joins: Initial tests indicate that RisingWave can efficiently handle joins of multiple data streams, making it suitable for scenarios with multiple data sources.

Considerations

  • Stateless computations: Performance gains in stateless computations might be less pronounced when network I/O between RisingWave and the data source (e.g., Kafka) becomes the bottleneck.
  • Performance degradation: Reducing compute node memory or introducing irregular access patterns can lead to a high cache miss rate, impacting performance due to increased access to remote storage.
  • Emit On Window Close (EOWC): RisingWave will soon support EOWC semantics, which can optimize window aggregation functions.
  • Split distinct aggregation: RisingWave will add the optimization for split distinct aggregation in the future, which will further improve the performance for queries like q16.

Future performance evaluations

Further testing is planned to evaluate RisingWave’s performance in areas such as:

  • Complex stateful computations: Including operations like JSON parsing and string processing.
  • Multi-stream joins: Releasing detailed results of multi-stream join experiments.
  • Advanced features: Assessing the impact of UDFs, watermarks, and other advanced features on performance.