Towards Profile-Guided Optimization for Safe and Efficient Parallel Stream Processing in Rust

  • Stefan Sydow Technische Universität Berlin
  • Mohannad Nabelsee Technische Universität Berlin
  • Sabine Glesner Technische Universität Berlin
  • Paula Herber Technische Universität Berlin

Abstract


The efficient mapping of stream processing applications to parallel hardware architectures is a difficult problem. While parallelization is often highly desirable as it reduces the overall execution time, its advantages must be carefully weighed against the parallelization overhead of complexity and communication costs. This paper presents a novel profile-guided optimization for parallel stream processing based on the multi-paradigm system programming language Rust. Our approach's key idea is to systematically balance the performance gain that can be achieved from parallelization with the communication overhead. To achieve this, we 1) use profiling to gain tight estimates of task execution times, 2) evaluate the cost of the fundamental concurrency constructs in Rust with synthetic benchmarks, and exploit this information to estimate the communication overhead introduced by various degrees of parallelism, and 3) present a novel optimization algorithm that exploits both estimates to fine-tune the degree of parallelism and train processing in a given application. Overall, our approach enables us to map parallel stream processing applications to parallel hardware efficiently. The safety concepts anchored in Rust ensure the reliability of the resulting implementation. We demonstrate our approach's practical applicability with two case studies: the word count problem and aircraft telemetry decoding.
Keywords: Task analysis, Parallel processing, Programming, Safety, Optimization, Throughput, Resource management, Stream Processing, Parallel Programming, Rust, Performance Modelling
Published
2020-09-08
SYDOW, Stefan; NABELSEE, Mohannad; GLESNER, Sabine; HERBER, Paula. Towards Profile-Guided Optimization for Safe and Efficient Parallel Stream Processing in Rust. In: INTERNATIONAL SYMPOSIUM ON COMPUTER ARCHITECTURE AND HIGH PERFORMANCE COMPUTING (SBAC-PAD), 32. , 2020, Porto/Portugal. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2020 . p. 289-296.