Out-of-Order Processing: AN ew Architecture for High-Performance by HC12091102210

VIEWS: 0 PAGES: 26

									                  Appeared in VLDB 2008
Authors: Jin Li, Kristin Tufte, Vladislav Shkapenyuk, Vassilis
         Papdimos, Thedore Johnson, David Maier
       Portland State University and AT&T Research

 Out-of-Order Processing:
     A New Architecture for High-
     Performance Stream Systems

               Presented By:
          Sudipto Das (sudipto@cs)
         Shiyuan Wang (sywang@cs)


                Slides adapted from original slides by author
Out-of-Order Processing: A New Architecture for High-Performance Stream Systems



    IOP: In-Order Stream Processing
    Infinite Stream of Packets/Tuples
     Ordered by some attribute
             Timestamp in most cases
    Operators implemented to preserve
     stream arrival order
    Order preservation incurs significant
     performance penalties



              2          Sudipto Das, Shiyuan Wang      September 10, 2012
Out-of-Order Processing: A New Architecture for High-Performance Stream Systems


        Motivation: In-Order Processing
                                                                            (sIP,dIP)   cnt
     Q1: “Count the number of                                              (1.1,2.2)   16
                                                                                        15
                                                                            (2.2,3.3)   25
                                                                                        26
      packets in each minute;
      update result every minute”
     Window-Count operator                            Window-Count (*)
      assumes ordered input                          group by srcIP, destIP
     Merge is order-preserving
time  implementation of UnionAll                                merge
     12:00                                             merge
     12:01        RANGE 1 min,
     12:02        SLIDE 1 min,
     12:03        WA ts
                                                       A   B                   C
              3          Sudipto Das, Shiyuan Wang             September 10, 2012
Out-of-Order Processing: A New Architecture for High-Performance Stream Systems



           Issues with IOP evaluation
  Performance penalties
      Memory Overhead                                   Window-Count (*)
      Latency                                          group by srcIP, destIP
          Maintaining stream order delays
           tuple processing                                      merge
      Burst                                            merge
          Caused by maintaining stream
           order
                                                       A    B                C
          May overload the stream system

 Even with ordered input streams, current IOP approaches pay
 a cost to maintain order
               4         Sudipto Das, Shiyuan Wang      September 10, 2012
Out-of-Order Processing: A New Architecture for High-Performance Stream Systems




          Do We Have to Maintain Stream
                     Order?




              5          Sudipto Das, Shiyuan Wang      September 10, 2012
Out-of-Order Processing: A New Architecture for High-Performance Stream Systems


               OOP: Out-of-Order Processing
                                                                                   (sIP,dIP)   cnt
    Stream query evaluation essentially                                           (1.1,2.2)   16
                                                                                               15
                                                                                               25
                                                                                               26
                                                                                   (2.2,3.3)
     requires information on stream                                                (3.3,4.4)    5
                                                                                                3
                                                                                                4
                                                                                                2
                                                                                                1
                                                                                   (4.4,5.5)    1
                                                                                                2
     progress
    Meld passes tuples through
    Punctuation is a special tuple                    Window-Count (*)
     embedded in a data stream that                  group by srcIP, destIP
     indicates the progress of the stream;
     e.g. (*, *, *, 10:02:00am)                                          *
                                                                               *

time                                                                   meld
                                                                 *

       12:00                                             meld
                                                         *


       12:01        RANGE 1 min,
       12:02        SLIDE 1 min,                             *

       12:03        WA ts
                                                     A           B                    C
                                                     *
                6        Sudipto Das, Shiyuan Wang               *
                                                                     September 10, 2012
Out-of-Order Processing: A New Architecture for High-Performance Stream Systems



                  Memory Consumption




              7          Sudipto Das, Shiyuan Wang      September 10, 2012
Out-of-Order Processing: A New Architecture for High-Performance Stream Systems



       What is the OOP architecture?
    Order-insensitive implementations of
     operators
    A mechanism for tracking/communicating
     stream progress
    Individual operators need not detect stream
     progress nor maintain stream order
         Use punctuation to communicate stream progress,
          and query operators propagate punctuation


              8          Sudipto Das, Shiyuan Wang      September 10, 2012
Out-of-Order Processing: A New Architecture for High-Performance Stream Systems



                         Punctuations
    A special tuple embedded in the data
     stream
    Indicates the end of a subset of the stream
    Originally proposed by [Tucker et al.
     TKDE 2003]
    Used as stream progress indicators
    OOP detects stream progress
    Query operators to propagate progress
     throughout the query plan
              9          Sudipto Das, Shiyuan Wang      September 10, 2012
Out-of-Order Processing: A New Architecture for High-Performance Stream Systems



            Generating Punctuations
    Gigascope (from AT&T Research)
     generates punctuations in a timer driven
     fashion
         A timer callback fires every second and a
          punctuation carrying a progressing attribute
          is inserted
    NiagaraST (from UW-Madison and
     Portland State) uses data driven
     approach
         In the absence of external punctuations,
          system inserts punctuation based on progress
             10          Sudipto Das, Shiyuan Wang      September 10, 2012
Out-of-Order Processing: A New Architecture for High-Performance Stream Systems



                                 Outline
    Motivating example
    Order-insensitive Implementations of
     operators
    The Benefits of OOP
    Performance results




             11          Sudipto Das, Shiyuan Wang      September 10, 2012
Out-of-Order Processing: A New Architecture for High-Performance Stream Systems

                                                         time

                                   Union                     12:00
                                                             12:01
                                                             12:02
      Order-sensitive                                       12:03
       implementation—
                                                                            10:03:00am)
                                                                 ( *, *, *, 10:02:00am)
       Merge
           Issues—buffer and delay
            to handle time skew and             10:02:00am
                                                10:03:00am               10:03:00am
            lulls                                            meld
      Order-insensitive
       implementation—Meld                                   A       B
           Pass tuples through
           Maintain state on                            10:03:00am)
                                                                  ( *,
                                              ( *, *, *, 10:02:00am) *, *, 10:03:00am)
            punctuation in order to
            propagate punctuation
           Linear punctuation

             12          Sudipto Das, Shiyuan Wang               September 10, 2012
Out-of-Order Processing: A New Architecture for High-Performance Stream Systems


             Window Aggregation – WID
                                                             wid, sIP, dIP, cnt
   Q2:                                                       (10, 1.1, 2,2, 6)
   SELECT srcIP, destIP, count(*)                            (10, 3,3, 4,4, 1)
                                                                                 wid             (sIP,dIP) cnt
   FROM packets
                                                                                  10              1,1, 2,2 65
        [RANGE 2 minutes,
                                                                                  11              1.1, 2.2 12
         SLIDE 1 minute,                                                          12              1.1, 2.2 1
         WA ts]                                                 Count             10              3.3, 4.4 1
   GROUP-BY srcIP, destIP                                  gby: wid, sIP, dIP     11              3.3, 4.4 1
            time
                                                                           * (10,11)
                                                                             (11,12)
                                                                             10

                   12:00
                                                                   bucket
 win 10            12:01
                                                            [ RANGE 2 minutes,
win 11             12:02                                   SLIDE 1 minute, WA ts]
win 12             12:03
                   12:04
                                                                                *     late tuple

  Li, J., Maier, D., Tufte, K., Papadimos V. Semantics and evaluation techniques for window aggregates in data streams.
                                                        (SIGMOD 2005)
                      13                Sudipto Das, Shiyuan Wang                       September 10, 2012
Out-of-Order Processing: A New Architecture for High-Performance Stream Systems



                          Window Join
                                                      Q3:
   How to purge                     time             SELECT S0.ts, S1.ts, S0.srcIP
    state?                                   12:00    FROM S0 [WA ts, RANGE 1 min]
                                             12:01         S1 [WA ts, RANGE 1 min]
                output                       12:02    WHERE S0.destIP = S1.srcIP
                                             12:03
                buffer
                                                                       Join
         Window-Join                                      S0.ts-1 ≤S1.ts<S0.ts+1




                                                                                   *
                                                              *
           S0        S1                                           S0          S1
      Assume: S0 and S1 are
     ordered and synchronized

             14           Sudipto Das, Shiyuan Wang                September 10, 2012
Out-of-Order Processing: A New Architecture for High-Performance Stream Systems



                                 Outline
      Motivating example
      Implementation of order-insensitive operators
      The Benefits of OOP
      Performance results




             15          Sudipto Das, Shiyuan Wang      September 10, 2012
Out-of-Order Processing: A New Architecture for High-Performance Stream Systems
                                                                                 time
         The benefit of OOP for workload
                               RANGE 1 min,
                    smoothing SLIDE 1 min,
                                                                                         12:00
                                                                                         12:01
                                                          WA ts                          12:02
  Window aggregation causes workload                                                    12:03

   bursts at window boundaries
  Gigascope architecture                                     Q1
      High-level aggregation
         Rolls up partial aggregates                                        (sIP,dIP)    cnt
      Low-level aggregation                                                 (1.1,2.2)     16
                                                                             (2.2,3.3)     10
         Reads directly from ring buffer.                                   (3.3,4.4)     11
         Light-weight; small, fixed-sized hash table –                      (4.4,5.5)     12
          outputs partial aggregates on collisions            q1

  Slow-flush: Flush the results of window
   n−1 gradually while processing window n
      Order-sensitive implementations require ordered
       output stream, which causes problem if existing
       aggregate belongs to the new window
              16            Sudipto Das, Shiyuan Wang             September 10, 2012
Out-of-Order Processing: A New Architecture for High-Performance Stream Systems



                   Slow-flush in Gigascope (IOP)
    Output rate

                                                                                 (sIP,dIP)
                                         Limits bandwidth
                                                                                (1.1,2.2)     17
                                                                                              16
                                                                                (2.2,3.3)     10
                                                                                (3.3,4.4)     11
                                                                                              12
                   Time                                            Q1           (4.4,5.5)     12
             IOP without Slow Flush                                               (sIP,dIP)   cnt
                                                                                 (1.1,2.2)    16
    Output rate




                                                                                 (2.2,3.3)    10
                                                                                 (3.2,4.2)
                                                                                 (3.3,4.4)    1
                                                                                              11
                                                                                 (4.4,5.5)    12
                                                                   q1
                   Time
             IOP with Slow Flush

  time
                  12:00      RANGE 1 min,
                  12:01
                             SLIDE 1 min,
                  12:02
                  12:03   17 WA ts     Sudipto Das, Shiyuan Wang        September 10, 2012
Out-of-Order Processing: A New Architecture for High-Performance Stream Systems



                  Slow-flush in Gigascope (OOP)
    Output rate


                                                                 Q1


                   Time                                                          (3.2, 4.2, 1)
             IOP with Slow Flush
    Output rate




                                                                                 (sIP,dIP) cnt
                                                                 q1
                                                                                (2.2,3.3)           10
                                                                                (3.3,4.4)
                                                                                (3.2,4.2)            1
                                                                                                    11
                  Time
                                                                                (4.4,5.5)           12
             OOP with Slow Flush
                                                                                             time
  Low-level aggregation by OOP
              No need to maintain order                 RANGE 1 min,
                                                                                                    12:00
                                                                                                    12:01
              Allows a delay of k windows               SLIDE 1 min,                               12:02
              More effective smoothing                  WA ts                                      12:03

                     18            Sudipto Das, Shiyuan Wang            September 10, 2012
Out-of-Order Processing: A New Architecture for High-Performance Stream Systems



                                 Outline
      Motivating example
      Implementation of order-insensitive operators
      The Benefits of OOP
      Performance results




             19          Sudipto Das, Shiyuan Wang      September 10, 2012
Out-of-Order Processing: A New Architecture for High-Performance Stream Systems



                  Experimental Setup
    Implemented OOP in two stream systems:
     Gigascope and NiagaraST
    Gigascope:
         Focuses more on processing speed
         Traffic generated by RouterTester
         All experiments ran on dual-core Intel Xeon
          CPU 2.8GHz, and 4GB RAM
    NiagaraST
         Experiment on Dual Core AMD Opteron and
          4GB RAM
             20          Sudipto Das, Shiyuan Wang      September 10, 2012
Out-of-Order Processing: A New Architecture for High-Performance Stream Systems


     Performance Results (in Gigascope)
                                              Throughput comparison of IOP and OOP for a count query
       Data Rate (thousands of pkts/sec.)




                                            900
                                            800
                                            700
                                            600                                                                                         66k
                                            500                                                                                         130k
                                            400                                                                                         260k
                                            300                                                                                         520k
                                            200
                                            100
                                              0
                                                  IOP-½   IOP-1   IOP-2   OOP-½     OOP-1     OOP-2   OOP (sf)- OOP (sf)-1 OOP (sf)-2
                                                                                                        ½




      1.The number of groups                                                   SELECT srcIP, destIP, count(*)
      2. The size of hash table                                                    [WA ts, RANGE 1 min, SLIDE 1 min]
      3. Slow-flush, lazy-flush                                                FROM M
                                                                               GROUP BY srcIP, destIP
                                                  21              Sudipto Das, Shiyuan Wang                      September 10, 2012
Out-of-Order Processing: A New Architecture for High-Performance Stream Systems


              Performance Results (in NiagaraST)
                  1000
                                  IOP
                                                                            SELECT count(*)
  Memory



                   800
                                  OOP
                                                                              [RANGE 1 min, SLIDE 1 min, WA M1.ts]
   (MB)




                   600
                                                                            FROM M1 [RANGE n, WA ts]
                   400                                                             M2 [RANGE n, WA ts]
                   200
                                                                            WHERE M1.srcIP = M2.destIP and
                                                                                   M1.ts >= M2.ts-n and
                     0
                                                                                   M1.ts <= M2.ts+n…
                         1    2   3     4     5   6   7   8   9




                                                                           Latency
                             Band Size (seconds)




                                                                            (sec)
 Execution Time




                                                                                     120
                  2000                                                                             IOP
                                        IOP                                          100
                                                                                                   OOP
                  1500
      (sec)




                                                                                      80
                                        OOP
                  1000                                                                60
                                                                                      40
                   500
                                                                                      20
                     0                                                                 0
                             1 2 3 4 5 6 7 8 9                                             1   2    3     4   5   6   7   8   9
                             Band Size (seconds)                                           Band Size (seconds)
                             22                       Sudipto Das, Shiyuan Wang                          September 10, 2012
Out-of-Order Processing: A New Architecture for High-Performance Stream Systems



     Implementation Considerations
    Low implementation overhead for supporting
     OOP
         Some IOP systems already support punctuation


    Order-sensitive implementations can be used
     in OOP systems if streams are ordered or if a
     sort operator is used before it



             23          Sudipto Das, Shiyuan Wang      September 10, 2012
Out-of-Order Processing: A New Architecture for High-Performance Stream Systems

      The benefits of OOP from system
                    perspectives
    More scalable in distributed computing
     environment
    Allows a wider range of query plans and more
     execution flexibility
         Prioritization / Optimization
         Adaptive query processing
    Accommodates out-of-order input naturally


             24          Sudipto Das, Shiyuan Wang      September 10, 2012
Out-of-Order Processing: A New Architecture for High-Performance Stream Systems



                           Conclusion
    The results of experimenting with OOP in
     Gigascope and NiagaraST are encouraging
         Memory, throughput, latency


    OOP allows more flexibility in
     implementations of stream query operators
     and thus stream query optimization, adaptive
     stream-query processing, …


             25          Sudipto Das, Shiyuan Wang      September 10, 2012
Out-of-Order Processing: A New Architecture for High-Performance Stream Systems




             26          Sudipto Das, Shiyuan Wang      September 10, 2012

								
To top