streambox modern stream processing on a multicore machine
play

StreamBox: Modern Stream Processing on a Multicore Machine Hongyu - PowerPoint PPT Presentation

StreamBox: Modern Stream Processing on a Multicore Machine Hongyu Miao and Heejin Park, Purdue ECE; Myeongjae Jeon and Gennady Pekhimenko, Microsoft Research; Kathryn S. McKinley, Google; Felix Xiaozhu Lin, Purdue ECE http://xsel.rocks/p/streambox


  1. StreamBox: Modern Stream Processing on a Multicore Machine Hongyu Miao and Heejin Park, Purdue ECE; Myeongjae Jeon and Gennady Pekhimenko, Microsoft Research; Kathryn S. McKinley, Google; Felix Xiaozhu Lin, Purdue ECE http://xsel.rocks/p/streambox

  2. Humans IoT Data centers High velocity of streaming data requires real-time processing

  3. Streaming ¡Pipeline Infinite ¡data ¡stream Input Pipeline 3

  4. Streaming ¡Pipeline Infinite ¡data ¡stream Input Epoch Epoch Epoch Pipeline 4

  5. Streaming ¡Pipeline Infinite ¡data ¡stream Input Transform ¡0 Epoch Epoch Epoch Pipeline 5

  6. Streaming ¡Pipeline Infinite ¡data ¡stream Input Transform ¡0 Epoch Epoch Epoch Pipeline Transform ¡1 Epoch Epoch Epoch Transform ¡2 Epoch Epoch Epoch 6

  7. Streaming ¡Pipeline Infinite ¡data ¡stream Input Transform ¡0 Epoch Epoch Epoch Pipeline Transform ¡1 Epoch Epoch Epoch Transform ¡2 Epoch Epoch Epoch Output 7

  8. Why ¡is ¡it ¡hard? ¡ Infinite-data-stream Input Records ¡arrive ¡out-­‑of-­‑order Transform-0 Epoch Epoch Epoch Transform-1 Epoch Epoch Epoch Transform-2 Epoch Epoch Epoch Output 8

  9. Why ¡is ¡it ¡hard? ¡ Infinite-data-stream Input Records ¡arrive ¡out-­‑of-­‑order Transform-0 Epoch Epoch Epoch High ¡Performance ¡on ¡Multicore Transform-1 Epoch Epoch Epoch • Data ¡parallelism Transform-2 • Pipeline ¡parallelism Epoch Epoch Epoch Output • Memory ¡locality … Core Core Core Core 1 2 13 0 … 960K 960K 960K 960K … B B B B 3584 3584 3584 3584 KB KB KB KB 35MB L3 NUMA% NUMA% NUMA% NUMA% 0 1 2 3 9 Intel ¡Xeon ¡E7-­‑4830 ¡v4

  10. Prior ¡work Out-­‑of-­‑order ¡processing ¡within ¡epochs Processes ¡only ¡one ¡epoch ¡in ¡each ¡transform ¡at ¡a ¡time 20:00 15:00 10:00 Transform ¡0 Epoch Epoch Epoch Pipeline 5:00 Transform ¡1 Epoch Epoch Epoch Transform ¡2 Epoch Epoch Epoch 10

  11. Prior ¡work Out-­‑of-­‑order ¡processing ¡within ¡epochs Processes ¡only ¡one ¡epoch ¡in ¡each ¡transform ¡at ¡a ¡time 20:00 15:00 10:00 Transform ¡0 Epoch Epoch Epoch Pipeline 5:00 10:00 Transform ¡1 Epoch Epoch Epoch 0:00 Transform ¡2 Epoch Epoch Epoch 11

  12. Prior ¡work Out-­‑of-­‑order ¡processing ¡within ¡epochs Processes ¡only ¡one ¡epoch ¡in ¡each ¡transform ¡at ¡a ¡time 20:00 15:00 10:00 Transform ¡0 Epoch Epoch Epoch Pipeline 5:00 15:00 10:00 Transform ¡1 Epoch Epoch Epoch 5:00 0:00 Transform ¡2 Epoch Epoch Epoch 12

  13. StreamBox insight St Out-­‑of-­‑order ¡processing ¡across ¡epochs Process all ¡epochs ¡in ¡all ¡transforms ¡in ¡parallel 10:00 15:00 10:00 Transform ¡0 Epoch Epoch Epoch Pipeline Transform ¡1 Epoch Epoch Epoch Transform ¡2 Epoch Epoch Epoch 13

  14. Prior ¡work ¡vs. ¡StreamBox Process all ¡epochs ¡in ¡all ¡transforms ¡ Processes ¡only ¡one ¡epoch ¡in ¡each ¡ in ¡parallel transform ¡at ¡a ¡time 20:00 15:00 10:00 10:00 15:00 10:00 Transform)0 Transform)0 Epoch Epoch Epoch Epoch Epoch Epoch Pipeline Pipeline 5:00 10:00 Transform)1 Transform)1 Epoch Epoch Epoch Epoch Epoch Epoch 0:00 Transform)2 Transform)2 Epoch Epoch Epoch Epoch Epoch Epoch StreamBox: ¡High ¡pipeline ¡and ¡data ¡parallel ¡processing ¡system 14

  15. Result: ¡StreamBox vs. ¡existing ¡systems ¡on ¡multicore High ¡throughput ¡& ¡utilization ¡of ¡multicore ¡hardware 8000 StreamBox Throughput KRec/s Spark Streaming 6000 Beam 4000 2000 7K 10K 10K 8K 0 4 12 32 56 # Cores 15

  16. Roadmap Background Stream pipeline, streaming data, window, watermark, and epoch StreamBox Design • Invariants to guarantee correctness • Out-of-order epoch processing Evaluation 16

  17. Streaming pipeline for data analytics Transform a computation that consumes and produces streams Pipeline a dataflow graph of transforms Count word Group by occurrences word Ingress Transform 1 Transform 2 Egress A Simple WordCount Pipeline 17

  18. Stream records = data + event time Records arrive out of order • Records travel diverse network paths • Computations execute at different rates infinite 0:05 0:02 0:03 Processing data System stream 18

  19. Window A temporal processing scope of records Chopping up infinite data into finite pieces along temporal boundaries Transforms do computation based on windows 1:02 1:03 1:13 1:09 1:11 1:08 Infinite input stream Window 1:00 – 1:05 Event Time 19

  20. Window A temporal processing scope of records 1:02 1:13 1:09 1:11 1:08 1:03 1:02 Infinite input stream Windows by event time 1:00 – 1:05 20

  21. Window A temporal processing scope of records 1:13 1:09 1:11 1:08 1:03 Infinite input stream 1:02 Windows by event time 1:00 – 1:05 21

  22. Window A temporal processing scope of records 1:13 1:09 1:11 1:08 Infinite input stream 1:03 1:02 Windows by event time 1:00 – 1:05 22

  23. Window A temporal processing scope of records 1:13 1:09 1:11 Infinite input stream 1:03 1:02 1:08 Windows by event time 1:05 – 1:10 1:00 – 1:05 23

  24. Window A temporal processing scope of records 1:13 1:09 Infinite input stream 1:03 1:02 1:08 1:11 Windows by event time 1:05 – 1:10 1:00 – 1:05 1:10 – 1:15 24

  25. Window A temporal processing scope of records 1:13 Infinite input stream 1:03 1:02 1:09 1:08 1:11 Windows by event time 1:05 – 1:10 1:00 – 1:05 1:10 – 1:15 25

  26. Window A temporal processing scope of records Infinite input stream 1:03 1:02 1:09 1:08 1:13 1:11 Windows by event time 1:05 – 1:10 1:00 – 1:05 1:10 – 1:15 26

  27. Out-of-order records 1:13 1:09 1:11 Infinite input stream 1:08 Windows by event time 1:05 – 1:10 27

  28. When a window is complete? 1:13 1:09 Infinite input stream 1:08 1:11 Windows by event time 1:05 – 1:10 1:10 – 1:15 28

  29. Watermark Input completeness indicated by data source Watermark X all input data with event times less than X have arrived Watermark Watermark 1:05 1:10 1:13 1:09 1:11 1:08 1:03 1:02 Infinite input stream 29

  30. Handling out-of-order with watermarks Watermark Watermark 1:05 1:10 1:13 1:09 1:11 1:08 Infinite input stream Windows by event time 1:05 – 1:10 30

  31. Handling out-of-order with watermarks Watermark Watermark 1:05 1:10 1:13 1:09 1:11 Infinite input stream 1:08 Windows by event time 1:05 – 1:10 31

  32. Handling out-of-order with watermarks Watermark Watermark 1:05 1:10 1:13 1:09 Infinite input stream 1:08 1:11 Windows by event time 1:05 – 1:10 1:10 – 1:15 32

  33. Handling out-of-order with watermarks Watermark Watermark 1:05 1:10 1:13 Infinite input stream 1:09 1:08 1:11 Windows by event time 1:05 – 1:10 1:10 – 1:15 33

  34. Handling out-of-order with watermarks Watermark Watermark 1:05 1:10 1:13 Infinite input stream 1:09 1:08 1:11 Windows by event time 1:05 – 1:10 1:10 – 1:15 34

  35. Epoch A set of records arriving between two watermarks A window may span multiple epochs Watermark Watermark 1:05 1:10 1:13 1:09 1:11 1:08 1:03 1:02 Infinite input stream An epoch 35

  36. Roadmap Background StreamBox Design • Invariants to guarantee correctness • Out-of-order epoch processing Evaluation 36

  37. Stream processing engines Most of stream engines optimize for a distributed system • Neglected efficient multicore implementation • Assume a single machine incapable of handling stream data 37

  38. Goal A stream engine for multicore 10:00 15:00 10:00 Multicore hardware with Transform)0 Epoch Epoch Epoch • High throughput I/O Pipeline Transform)1 • Terabyte DRAMs Epoch Epoch Epoch • A large number of cores Transform)2 A stream engine for multicore Epoch Epoch Epoch … • Correctness respect dependences Core Core Core Core 1 2 13 0 … with minimal synchronization 960K 960K 960K 960K … B B B B • Dynamic parallelism processes any 3584 3584 3584 3584 KB KB KB KB records in any epochs 35MB L3 • Target throughput & latency NUMA% NUMA% NUMA% NUMA% 0 1 2 3 38

  39. Challenges Correctness • Guarantee watermark semantics by meeting two invariants Throughput • Never stall the pipeline Latency • Do not relax the watermark • Dynamically adjust parallelism to relieve bottlenecks 39

  40. Invariant 1 Watermark ordering Transforms consume watermarks in order Transforms consume all records in an epoch before consuming the watermark Epoch 2 Epoch 1 0:20 0:10 0:22 0:12 0:18 0:05 0:11 Transform 40

  41. Invariant 2 Respect epoch boundaries Once a transform assigns a record an epoch, the record never changes epochs Epoch 2 Epoch 1 0:20 0:10 0:22 0:12 0:18 0:05 0:11 Transform 41

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend