Skip to main content
QUICK REVIEW

[论文解读] Approximate Stream Analytics in Apache Flink and Apache Spark Streaming.

Do Le Quoc, Ruichuan Chen|arXiv (Cornell University)|Sep 9, 2017
Data Stream Mining Techniques参考文献 12被引用 8
一句话总结

StreamApprox 在 Apache Flink 和 Spark Streaming 中引入了一种用于近似流分析的在线分层水库采样算法,实现了具有严格误差边界的实时高效处理。与原生系统相比,其速度提升了 1.15×–3×;与优化后的 Spark 基线相比,速度提升了 1.1×–2.4×,且在采样比例从 10% 到 80% 的范围内保持一致的准确性。

ABSTRACT

Approximate computing aims for efficient execution of workflows where an approximate output is sufficient instead of the exact output. The idea behind approximate computing is to compute over a representative sample instead of the entire input dataset. Thus, approximate computing - based on the chosen sample size - can make a systematic trade-off between the output accuracy and computation efficiency. Unfortunately, the state-of-the-art systems for approximate computing primarily target batch analytics, where the input data remains unchanged during the course of sampling. Thus, they are not well-suited for stream analytics. This motivated the design of StreamApprox - a stream analytics system for approximate computing. To realize this idea, we designed an online stratified reservoir sampling algorithm to produce approximate output with rigorous error bounds. Importantly, our proposed algorithm is generic and can be applied to two prominent types of stream processing systems: (1) batched stream processing such as Apache Spark Streaming, and (2) pipelined stream processing such as Apache Flink. We evaluated StreamApprox using a set of microbenchmarks and real-world case studies. Our results show that Spark- and Flink-based StreamApprox systems achieve a speedup of $1.15 imes$-$3 imes$ compared to the respective native Spark Streaming and Flink executions, with varying sampling fraction of $80\%$ to $10\%$. Furthermore, we have also implemented an improved baseline in addition to the native execution baseline - a Spark-based approximate computing system leveraging the existing sampling modules in Apache Spark. Compared to the improved baseline, our results show that StreamApprox achieves a speedup $1.1 imes$-$2.4 imes$ while maintaining the same accuracy level.

研究动机与目标

  • 为解决传统近似计算系统在流分析中侧重于静态数据集的批处理而存在的空白。
  • 设计一种通用的在线采样算法,适用于流水线式(Flink)和批处理式(Spark Streaming)的流处理模型。
  • 在实现显著性能提升的同时,确保近似输出具有严格的误差边界。
  • 在微基准测试和真实工作负载上评估系统,展示其在动态数据环境中的可扩展性与准确率权衡。

提出的方法

  • 设计一种在线分层水库采样算法,可在数据流中随时间保持具有代表性的样本。
  • 将该采样算法应用于 Apache Flink(流水线模型)和 Apache Spark Streaming(批处理模型),以实现广泛的兼容性。
  • 将采样机制集成到流处理管道中,以计算具有可证明误差边界的近似结果。
  • 通过分层技术提升采样准确性,以保留数据分区中的分布特性。
  • 根据数据到达速率和系统负载动态调整采样策略,以维持效率与准确性。
  • 实现一种基于 Spark 原生采样模块的混合基线,用于比较性能与准确性提升。

实验结果

研究问题

  • RQ1能否将在线分层水库采样算法有效适配到如 Flink 和 Spark Streaming 这类流水线式和批处理式流处理框架中?
  • RQ2与原生流处理系统和现有近似计算基线相比,所提出的系统在性能和准确性方面表现如何?
  • RQ3在实时流分析中,采样比例、执行速度与输出准确性之间的权衡关系是什么?
  • RQ4在动态数据工作负载中,系统能否在实现显著加速的同时维持严格的误差边界?
  • RQ5系统在多样化的微基准测试和真实用例中的表现如何?

主要发现

  • 当采样比例在 10% 到 80% 之间时,StreamApprox 相较于原生 Apache Flink 和 Spark Streaming 执行,实现了 1.15× 到 3× 的速度提升。
  • 与使用原生采样模块优化后的 Spark 基线相比,StreamApprox 在保持相同准确率水平的前提下,实现了 1.1× 到 2.4× 的速度提升。
  • 通过其在线分层水库采样机制,系统维持了严格的误差边界,确保了可预测的近似质量。
  • 所提出的算法在流水线式(Flink)和批处理式(Spark Streaming)流处理模型中均具有通用性和高效性。
  • 在微基准测试和真实用例上的评估结果表明,系统在多样化数据工作负载中均表现出一致的性能提升与准确性稳定性。
  • 结果表明,在生产级流处理系统中,具有误差边界的近似流分析既可行又高效。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。