Applying Control Theory to Stream Processing Systems Wei Xu Bill Kramer Joe Hellerstein ( )
Description of the system TCQ Complex internal structure Input Buffer Data Source TCQ drops tuples silently if result queue is full
Why do we need control? Data source does not provide accurate data rate
Why do we need control? TCQ node drops tuples when result queue fill up Buffer Source TCQ Result Q
Control Problems Providing an accurate data source –Get the actual data rate Regulate queue length on TCQ node –Prevent dropping tuples –Maximize throughput (and adapts when disturbance happens)
System with Control Output Rate Controller Controlled Data Source Queue Length Monitor 2
The Control Architecture P Controller PI Controller
Result – An accurate data source P Controller with Pre-compensation PI Controller
Result – regulating queue length Buffer Source TCQ Result Q
Result – Under CPU Contention Buffer Source TCQ Result Q
Why theory is useful? One of my implementations.. What happened? Buffer Source TCQ Result Q
What is going on? Queue Length Controller Desired Queue length Actual Queue Length Data Rate to TCQ Controlled Output Thread (Code Reuse)
Theory meets reality Output Y from simulation Time Queue length
Tricky part of parameter estimation Model evaluation – Making the system operate in desired range Non-Linear range Easy for data source, but queue length.. Free Space Data rate vs free space
Settling Time and Overshoot matters P Controller A lot of small disturbance in a Java program Incremental garbage collection PI Controller
Conclusion Advantages of feedback control –Make system more robust under disturbance –Treat complex systems as black boxes Cope with the system characteristics instead of having to change it –Encourage reporting system statistics –Implementation is easy and has theoretical guarantees
Future Work Load balancer Smaller sample time to reduce disturbance caused by Java GC? Controller on scheduling of system shared by multiple streams
Backup Slides
Outline Problems and Motivation Controller design Result Discussion
Description of the System Revised Data Source Input Buffer TCQ Node Queue length Routing Logic Load Splitter TCQ Node Tuples Tuple Blocks Operation of Load Splitter 1.Arriving blocks wait in Input Buffer 2.Tuples are routed to balance TCQ queue lengths 3.Stop routing if queue length is too large to avoid tuple discards
Compare to Open Loop Control We know Y(k), and we know what we want y(k+1) to be.. Use transfer function to solve for u(k)… (Expected result – accuracy and disturbance ) -- do be done
Estimation of the transfer function y(k+1)=ay(k)+bu(k) Regression
Tricky part of parameter estimation Model evaluation – A data rate that make it operate in linear range