To Towards High Performa mance Processing of Streami - - PowerPoint PPT Presentation

to towards high performa mance processing of streami ming
SMART_READER_LITE
LIVE PREVIEW

To Towards High Performa mance Processing of Streami - - PowerPoint PPT Presentation

To Towards High Performa mance Processing of Streami ming Data May-27-2016 Supun Kamburugamuve, Saliya Ekanayake, Milinda Pathirage and Geoffrey C. Fox


slide-1
SLIDE 1

To Towards ¡High ¡ ¡Performa mance ¡ ¡ Processing ¡ ¡of ¡ ¡Streami ming ¡ ¡Data

May-­‑27-­‑2016 ¡ Supun ¡Kamburugamuve, ¡Saliya ¡Ekanayake, ¡Milinda ¡Pathirage ¡and ¡ Geoffrey ¡C. ¡Fox ¡ Indiana ¡University ¡ Bloomington, ¡USA ¡ ¡

slide-2
SLIDE 2

Outline

  • Research ¡MoMvaMon ¡
  • Distributed ¡stream ¡processing ¡systems ¡(DSPFs) ¡
  • CommunicaMon ¡improvements ¡
  • Results ¡
  • Future ¡work ¡
slide-3
SLIDE 3

Background ¡& ¡Mo>va>on

Robot ¡with ¡a ¡Laser ¡ Range ¡Finder ¡ Map ¡Built ¡from ¡Robot ¡data ¡ RoboMcs ¡ApplicaMons ¡ Robots ¡need ¡to ¡avoid ¡ collisions ¡when ¡they ¡move ¡ N-­‑Body ¡Collision ¡Avoidance ¡ Simultaneous ¡LocalizaMon ¡and ¡Mapping ¡ Time ¡series ¡data ¡visualizaMon ¡ in ¡real ¡Mme ¡ Cloud ¡ApplicaMons ¡ HPC ¡ApplicaMons ¡ Work ¡in ¡progress ¡

slide-4
SLIDE 4

Data ¡pipeline

Message ¡Brokers ¡ RabbitMQ, ¡KaZa ¡ Gateway ¡

Sending ¡to ¡ ¡ pub-­‑sub ¡ Sending ¡to ¡ ¡ PersisMng ¡ ¡ to ¡storage ¡

Streaming ¡ ¡ workflow ¡

A ¡stream ¡ applicaMon ¡with ¡ some ¡tasks ¡running ¡ in ¡parallel ¡

MulMple ¡ ¡ streaming ¡ ¡ workflows ¡

Streaming ¡Workflows ¡ Apache ¡Storm ¡ Hosted ¡in ¡FutureSystems ¡OpenStack ¡cloud ¡ which ¡is ¡accessible ¡through ¡IU ¡network ¡ End ¡to ¡end ¡delays ¡without ¡any ¡ processing ¡is ¡less ¡than ¡10ms ¡

slide-5
SLIDE 5

Improving ¡communica>ons

  • Broadcast ¡communicaMon ¡
  • Shared ¡memory ¡communicaMon ¡between ¡workers ¡in ¡a ¡node ¡

¡

slide-6
SLIDE 6

Streaming ¡Applica>on

User ¡Graph ¡ ExecuMon ¡Graph ¡ User ¡graph ¡is ¡converted ¡to ¡an ¡execuMon ¡graph ¡ Stream ¡of ¡events ¡ Event ¡processing ¡logic ¡ Broadcast, ¡Round ¡Robin, ¡Direct, ¡Stream ¡ParMMoning ¡ Communica)on ¡methods ¡

slide-7
SLIDE 7

Example ¡applica>ons

ParMcles ¡are ¡distributed ¡ ¡ in ¡parallel ¡tasks ¡

SLAM ¡

Map ¡building ¡ happens ¡ periodically ¡

N-­‑Body ¡collision ¡avoidance ¡

slide-8
SLIDE 8

Execu>on ¡Graph ¡Distribu>on ¡in ¡the ¡Storm ¡ Cluster

W ¡

Worker ¡ Node-­‑1 ¡

S ¡

Worker ¡

W ¡ W ¡

Worker ¡ Node-­‑2 ¡

S ¡

Worker ¡

G ¡ Two ¡node ¡cluster ¡each ¡running ¡two ¡workers. ¡The ¡tasks ¡of ¡the ¡ Topology ¡is ¡assigned ¡to ¡the ¡workers ¡

slide-9
SLIDE 9

Communica>ons ¡in ¡Storm

9 ¡

Worker ¡and ¡Task ¡distribuMon ¡of ¡Storm ¡ A ¡worker ¡hosts ¡mulMple ¡tasks. ¡B-­‑1 ¡is ¡a ¡task ¡

  • f ¡component ¡B ¡and ¡W-­‑1 ¡is ¡a ¡task ¡of ¡W ¡

W-­‑1 ¡

Worker ¡ Node-­‑1 ¡

B-­‑1 ¡ W-­‑3 ¡

Worker ¡

W-­‑2 ¡ W-­‑5 ¡

Worker ¡ Node-­‑2 ¡

W-­‑4 ¡ W-­‑7 ¡

Worker ¡

W-­‑6 ¡ CommunicaMon ¡links ¡are ¡between ¡workers ¡ These ¡are ¡mulMplexed ¡among ¡the ¡tasks ¡ ¡ ¡ W-­‑1 ¡

Worker ¡ Node-­‑1 ¡

B-­‑1 ¡ W-­‑3 ¡

Worker ¡

W-­‑2 ¡ W-­‑5 ¡

Worker ¡ Node-­‑2 ¡

W-­‑4 ¡ W-­‑7 ¡

Worker ¡

W-­‑6 ¡ B ¡ W ¡

slide-10
SLIDE 10

Default ¡Broadcast

10 ¡

W-­‑1 ¡

Worker ¡ Node-­‑1 ¡

B-­‑1 ¡ W-­‑3 ¡

Worker ¡

W-­‑2 ¡ W-­‑5 ¡

Worker ¡ Node-­‑2 ¡

W-­‑4 ¡ W-­‑7 ¡

Worker ¡

W-­‑6 ¡ B-­‑1 ¡wants ¡to ¡broadcast ¡a ¡message ¡to ¡W, ¡it ¡sends ¡6 ¡ messages ¡through ¡3 ¡TCP ¡communicaMon ¡channels ¡ and ¡send ¡1 ¡message ¡to ¡W-­‑1 ¡via ¡memory ¡

slide-11
SLIDE 11

Op>mized ¡Broadcast

  • Binary ¡tree ¡
  • Workers ¡arranged ¡in ¡a ¡binary ¡tree ¡
  • Flat ¡tree ¡
  • Broadcast ¡from ¡the ¡origin ¡to ¡1 ¡worker ¡in ¡each ¡node ¡sequenMally. ¡This ¡worker ¡

broadcast ¡to ¡other ¡workers ¡in ¡the ¡node ¡sequenMally ¡

  • BidirecMonal ¡Rings ¡
  • Workers ¡arranged ¡in ¡a ¡line ¡
  • Starts ¡two ¡broadcasts ¡from ¡the ¡origin ¡and ¡these ¡traverse ¡half ¡of ¡the ¡line ¡
slide-12
SLIDE 12

Three ¡Algorithms ¡for ¡broadcast

Example ¡broadcasMng ¡communicaMons ¡for ¡each ¡algorithm ¡in ¡a ¡4 ¡node ¡cluster ¡with ¡each ¡machine ¡ having ¡4 ¡workers. ¡The ¡outer ¡green ¡boxes ¡show ¡cluster ¡machines ¡and ¡inner ¡small ¡boxes ¡show ¡

  • workers. ¡The ¡top ¡box ¡displays ¡the ¡broadcasMng ¡worker ¡and ¡arrows ¡illustrate ¡the ¡communicaMon ¡

among ¡the ¡workers ¡

Flat ¡tree ¡ Binary ¡tree ¡ Ring ¡ Serial ¡Broadcast ¡

slide-13
SLIDE 13

Shared ¡memory ¡based ¡Communica>ons

  • Inter ¡process ¡communicaMons ¡using ¡shared ¡memory ¡for ¡a ¡single ¡node ¡
  • MulMple ¡writer ¡single ¡reader ¡design ¡
  • Writer ¡breaks ¡the ¡message ¡in ¡to ¡packets ¡and ¡puts ¡them ¡to ¡memory ¡
  • Reader ¡reads ¡the ¡packets ¡and ¡assemble ¡the ¡message ¡

¡

slide-14
SLIDE 14

Shared ¡Memory ¡Communica>ons

write ¡ Packet ¡1 ¡ Packet ¡2 ¡ Packet ¡3 ¡

Writer ¡01 ¡ Writer ¡02 ¡

Write ¡ Write ¡ ¡ Obtain ¡the ¡write ¡locaMon ¡ atomically ¡and ¡increment ¡

Shared ¡File ¡ Reader ¡

Read ¡packet ¡by ¡packet ¡ sequenMally ¡

Use ¡a ¡new ¡file ¡when ¡the ¡file ¡size ¡is ¡reached ¡ Reader ¡deletes ¡the ¡files ¡acer ¡it ¡reads ¡them ¡fully ¡

ID ¡ No ¡of ¡Packets ¡ Packet ¡No ¡ Dest ¡Task ¡ Content ¡Length ¡ Source ¡Task ¡ Stream ¡Length ¡ Stream ¡ Content ¡ 16 ¡ 4 ¡ 4 ¡ 4 ¡ 4 ¡ 4 ¡ 4 ¡ Variable ¡ Variable ¡

Bytes ¡ Fields ¡

Packet ¡Structure ¡

slide-15
SLIDE 15

Experiments

W W W B R G RabbitMQ ¡ RabbitMQ ¡ Client ¡

  • 11 ¡Node ¡cluster ¡
  • 1 ¡Node ¡– ¡Nimbus ¡& ¡ZooKeeper ¡
  • 1 ¡Node ¡– ¡RabbitMQ ¡ ¡
  • 1 ¡Node ¡– ¡Client ¡
  • 8 ¡Nodes ¡– ¡Supervisors ¡with ¡4 ¡

workers ¡each ¡

  • Client ¡sends ¡messages ¡with ¡the ¡

current ¡Mmestamp, ¡the ¡topology ¡ returns ¡a ¡response ¡with ¡the ¡same ¡ Mme ¡stamp. ¡Latency ¡= ¡current ¡Mme ¡-­‑ ¡ Mmestamp ¡

slide-16
SLIDE 16

Memory ¡Mapped ¡Communica>ons ¡ ¡

No ¡significant ¡ difference ¡ ¡ because ¡we ¡are ¡ using ¡all ¡ ¡ the ¡workers ¡in ¡the ¡ cluster ¡beyond ¡30 ¡ workers ¡ Y ¡axis ¡shows ¡the ¡difference ¡in ¡latency ¡

  • f ¡default ¡TCP ¡implementaMon ¡and ¡

shared ¡memory ¡based ¡implementaMon ¡ (TCP ¡-­‑ ¡SHM) ¡

RelaMve ¡Importance ¡of ¡Shared ¡Memory ¡ CommunicaMon ¡to ¡TCP ¡

Default ¡TCP ¡implementaMon ¡Latency ¡ A ¡topology ¡with ¡ communicaMons ¡going ¡ through ¡all ¡the ¡workers ¡ arranged ¡in ¡a ¡line ¡

About ¡25% ¡reducMon ¡for ¡32 ¡workers ¡

slide-17
SLIDE 17

Broadcast ¡Latency ¡Improvement

Latency ¡of ¡binary ¡tree, ¡flat ¡tree ¡and ¡bi-­‑direcMonal ¡ring ¡implementaMons ¡compared ¡to ¡serial ¡implementaMon. ¡ Different ¡lines ¡show ¡varying ¡parallel ¡tasks ¡with ¡TCP ¡communicaMons ¡and ¡shared ¡memory ¡communicaMons(SHM). ¡

Speedup ¡of ¡latency ¡with ¡ both ¡TCP ¡based ¡and ¡ Shared ¡Memory ¡based ¡ communicaMons ¡for ¡ different ¡algorithms ¡

slide-18
SLIDE 18

Throughput ¡of ¡serial, ¡binary ¡tree, ¡flat ¡tree ¡and ¡ring ¡implementaMons. ¡Different ¡lines ¡show ¡varying ¡parallel ¡tasks ¡with ¡TCP ¡ communicaMons ¡and ¡shared ¡memory ¡communicaMons ¡(SHM) ¡

Throughput

slide-19
SLIDE 19

Future ¡Work

  • Implement ¡the ¡Shared ¡memory ¡and ¡communicaMon ¡algorithms ¡for ¡
  • ther ¡stream ¡engines ¡(Twiler ¡Heron) ¡
  • Experiment ¡on ¡larger ¡clusters ¡with ¡applicaMons ¡
  • HPC ¡Scheduler ¡for ¡Streaming ¡applicaMons ¡(Slurm, ¡Torque) ¡
  • C++ ¡APIs ¡for ¡data ¡processing ¡
  • High ¡performance ¡interconnects ¡for ¡high ¡throughput ¡low ¡latency ¡

communicaMons ¡in ¡HPC ¡clusters ¡

  • Scheduling ¡to ¡take ¡advantage ¡of ¡the ¡shared ¡memory ¡& ¡collecMve ¡

communicaMons ¡

slide-20
SLIDE 20

Summary

  • CommunicaMon ¡algorithms ¡reduce ¡the ¡network ¡traffic ¡and ¡increases ¡

throughput ¡

  • Ring ¡gives ¡the ¡best ¡throughput ¡and ¡binary ¡tree ¡best ¡latency ¡
  • Shared ¡memory ¡communicaMons ¡reduce ¡the ¡latency ¡further ¡but ¡not ¡

throughput ¡because ¡TCP ¡is ¡the ¡bolleneck ¡

¡

This ¡work ¡was ¡parMally ¡supported ¡by ¡NSF ¡CIF21 ¡DIBBS ¡1443054 ¡and ¡AFOSR ¡FA9550-­‑13-­‑1-­‑0225 ¡awards. ¡We ¡ would ¡also ¡like ¡to ¡express ¡our ¡graMtude ¡to ¡the ¡staff ¡and ¡system ¡administrators ¡at ¡the ¡Digital ¡Science ¡Center ¡ (DSC) ¡at ¡Indiana ¡University ¡for ¡supporMng ¡us ¡on ¡this ¡work. ¡ ¡

slide-21
SLIDE 21

References

  • Projects ¡hlps://github.com/iotcloud ¡
  • SLAM ¡hlp://dl.acm.org/citaMon.cfm?id=2896433 ¡
  • Collision ¡Avoidance ¡hlp://goo.gl/xdB8LZ ¡
  • Time ¡series ¡data ¡visualizaMon ¡

hlp://dsc.soic.indiana.edu/publicaMons/tsmap3d.pdf ¡

  • Apache ¡Storm ¡hlp://storm.apache.org/ ¡
  • Twiler ¡Heron ¡hlps://github.com/twiler/heron ¡