StreamApprox: Approximate Computing for Stream Analytics
Approximate computing -- a computing paradigm where an approximate output is sufficient instead of the exact output for a given application workflow -- is increasingly being adopted to accelerate jobs and efficiently utilize the computing resources. The idea behind approximate computing is to compute user's application over a representative sample of the input data instead of computing over the entire dataset. As a result, it allows users to make a trade-off between the output accuracy and system efficiency. The advancements in approximate computing is either limited to batch processing (where the input data remains unchanged during the course of sampling) or not transparent (where users are required to design and implement application-specific data streaming algorithms for sampling). Thus, the existing approaches are not well-suited to support approximate computing for low-latency stream analytics in a transparent way. In this paper, we present StreamApprox -- a stream analytics system for approximate computing requiring no modifications to the existing applications. To realize this idea, we designed an online stratified sampling algorithm to produce approximate output with bounded error. The online algorithm facilitates a systematic trade-off between the output accuracy and user-specified latency requirements. We implemented StreamApprox based on Apache Spark Streaming. Our evaluation using a set of micro-benchmarks and real-world case-studies shows that StreamApprox achieves a speedup of 2X over the native Spark Streaming execution for approximate computing with an accuracy loss less than 1%.