speculative plan execution for information agents
play

Speculative Plan Execution for Information Agents Greg Barish - PowerPoint PPT Presentation

Speculative Plan Execution for Information Agents Greg Barish University of Southern California June 30th, 2003 Thesis Committee Prof. Craig Knoblock (chair) Dr. Steven Minton, Fetch Technologies Prof. Paul Rosenbloom Prof. Cyrus Shahabi


  1. Speculative Plan Execution for Information Agents Greg Barish University of Southern California June 30th, 2003 Thesis Committee Prof. Craig Knoblock (chair) Dr. Steven Minton, Fetch Technologies Prof. Paul Rosenbloom Prof. Cyrus Shahabi Prof. Jean-Luc Gaudiot (external member) 1

  2. Outline 1. Introduction and motivating example 2. Thesis statement & contributions 3. Expressive & efficient information agent plans 4. Speculative plan execution 5. Value prediction for speculative execution 6. Related work 7. Summary & future work 2

  3. Information agents • Automate the querying of data networks (e.g., the Web) – Gather, combine & process data from multiple remote sources (e.g., Web sites) combine combine filter filter monitor monitor extract extract Information agent Information agent • Sample information agent task: – Buying a used car : safety ratings and reviews for certain criteria – Example: • 2002 Midsize coupe/hatchbk, $4K-$12K, no Oldsmobiles 3

  4. The CarInfo agent 1. Locate cars that meet criteria - Edmunds.com 2. Filter out Oldsmobiles 4

  5. The CarInfo agent 1. Locate cars that meet criteria - Edmunds.com 2. Filter out Oldsmobiles 3. Gather safety reviews for each - NHSTA.gov 5

  6. The CarInfo agent 1. Locate cars that meet criteria - Edmunds.com 2. Filter out Oldsmobiles 3. Gather safety reviews for each - NHSTA.gov 4. Gather detailed reviews of each - ConsumerGuide.com 6

  7. ConsumerGuide navigation • ConsumerGuide requires navigation from original search results to desired answer 7

  8. Agent Execution Performance • Standard von Neumann model – Execute one operation at a time – Each operation processes all of its input before output is used for next operation – Assume : 1000ms per I/O op, 100ms per CPU op • Execution time = 13.4 sec CG Full CG Summary CG Search NHTSA Select Edmunds 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 time (seconds) CPU-bound operation I/O-bound operation 8

  9. Streaming dataflow model • Dataflow a b c d – Operations scheduled by data availability a b c d • Independent operations execute in parallel MUL MUL MUL • Maximizes horizontal parallelism MUL – Dataflow computers [Dennis 1974] [Arvind 1978] ADD ADD – Example: computing (a*b) + (c*d) • Streaming Producer – Operations emit data as soon as possible • Independent data processed in parallel • Maximizes vertical parallelism Consumer – Network query engines [Ives et al. 1999] [Naughton et al. 2000] [Hellerstein et al. 2001] 9

  10. Dataflow-style CarInfo agent plan ((Dodge Stratus), (Midsize coupe/hatchback, (Pontiac Grand Am), $4000 to $12000, (Mercury Cougar)) 2002) WRAPPER (safety reports) JOIN NHTSA Search WRAPPER SELECT search (car reviews) Edmunds maker != criteria Search "Oldsmobile " WRAPPER WRAPPER WRAPPER ConsumerGuide ConsumerGuide ConsumerGuide Search Summary Full Review ((Oldsmobile Olero), (Dodge Stratus), ((http://cg.com/summ/20812.htm), (Pontiac Grand Am), other summary review URLs ) (Mercury Cougar)) ((http://cg.com/full/20812.htm), other full review URLs ) 10

  11. Streaming dataflow performance Join CG Full CG Summary CG Search Select Edmunds 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 time (seconds) • Improved, but plan remains I/O-bound (76%) • Main problem: remote source latencies – Meanwhile, local resources are wasted • Complicating factor: binding constraints – Remote queries dependent on other remote queries • Question: How can execution be more efficient? 11

  12. Thesis statement Speculative execution of streaming dataflow plans increases the degree of run-time parallelism for information agents. 12

  13. Speculative plan execution • Execute operators ahead of schedule – Predict data based on past execution • Allows greater degree of parallelism – Solves the problem caused by binding constraints Join CG Full CG Summary GOAL CG Search Select Edmunds 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 time (seconds) 13

  14. Contributions of thesis • Expressive plan language & efficient execution system for information agents – Dataflow plan language that enables more than basic querying – Thread-pool model of streaming dataflow execution • An approach to speculative plan execution – Safe & fair – Yields arbitrary speedups – Algorithm for the automatic transformation of agent plans • An approach to value prediction – Combines caching , classification , and transduction – Better accuracy and space efficiency than strictly caching 14

  15. Outline 1. Introduction and motivating example 2. Thesis statement & contributions 3. Expressive & efficient information agent plans 4. Speculative plan execution 5. Value prediction for speculative execution 6. Related work 7. Summary & future work 15

  16. Expressive agent plan language • Operators support: – Web data gathering – Data manipulation • and... – Conditional execution – Monitoring – Async communication – Agent management – Extensibility • Subplans – Modularity, reusability – Recursive subplans 16

  17. Expressing the CarInfo agent plan PLAN car-info { INPUT: criteria OUTPUT: reviews-and-ratings BODY { Wrapper ("Edmunds", criteria : cars) Select (cars, "maker != 'Oldsmobile'" : filtered-cars) Wrapper ("NHTSA", filtered-cars : safety-ratings) Wrapper ("CG Search", filtered-cars : summary-urls) Wrapper ("CG Summary", summary-urls : full-urls) Wrapper ("CG Full", full-urls : car-reviews) Join (safety-ratings, car-reviews, "l.make=r.make and l.model=r.model" : reviews-and-ratings) } } 17

  18. Streaming dataflow executor • Thread pool architecture – Enables dynamic parallelism without losing control Plan operators 3 (e.g., Wrapper, Select, etc.) 2 Thread Plan Pool Plan Output Input 1 ((Oldsmobile Olero), (Dodge Stratus), (Midsize cpe/hatchbk, (Pontiac Grand Am), $4000 to $12000, (Mercury Cougar)) 2002) WRAPPER SELECT Example: maker != Edmunds Search "Oldsmobile " 18

  19. Experimental results D- 80000 D+S- • Hypothesis #1 70000 D+S+ 60000 – Language and executor enable Time (ms) 50000 efficient information agents 40000 30000 20000 • Hypothesis #2: 10000 0 – Language is more expressive First tuple Last tuple than query languages of other network query engines 140000 120000 Cell updates 100000 80000 • Hypothesis #3: 60000 Telegraph Theseus-3 40000 – Added expressivity does not Theseus-6 20000 Theseus-10 detract from performance 0 0 3000 6000 9000 12000 19 Time (seconds)

  20. Outline 1. Introduction and motivating example 2. Thesis statement & contributions 3. Expressive & efficient information agent plans 4. Speculative plan execution 5. Value prediction for speculative execution 6. Related work 7. Summary & future work 20

  21. How to speculate? • General problem – Means for issuing and confirming predictions • Two new operators – Speculate : Makes predictions based on "hints" hints predictions/additions Speculate answers confirmations – Confirm : Prevents errant results from exiting plan probable results Confirm actual results confirmations 21

  22. How to speculate? • Example: CarInfo – Make predictions about cars based on search criteria – Makes practical sense: • Same criteria will always yield same cars BEFORE W J W S W W W 22

  23. How to speculate? • Example: CarInfo – Make predictions about cars based on search criteria – Makes practical sense: • Same criteria will always yield same cars AFTER predictions/additions hints W J Confirm W Speculate S W W W answers confirmations 23

  24. 24 Time = 0.0 sec Confirm Detailed example W J W W W S Speculate Midsize coupe W $4000-$12000 2002

  25. 25 Time = 0.1 sec Confirm Issuing predictions W J W W W T1 T2 T3 T4 Pontiac Grand Am Oldsmobile Olero S Mercury Cougar Dodge Stratus Speculate W

  26. 26 Time = 0.2 sec Confirm Speculative parallelism W J W T2 T3 T4 Pontiac Grand Am W W Mercury Cougar Dodge Stratus S Speculate W

  27. 27 Time = 1.0 sec Confirm Answers to hints W J W W W S Speculate Pontiac Grand Am Oldsmobile Olero Mercury Cougar Dodge Stratus W

  28. 28 Time = 1.1 sec Confirm Continued processing Additions (corrections), if any W J W W W S Speculate T1 T2 T3 T4 W

  29. Generation of final results Dodge Stratus (safety) (review) T2 Pontiac Grand Am (safety) (review) T3 Mercury Cougar (safety) (review) T4 W J Confirm W Speculate S W W W Time = 4.2 sec 29

  30. Confirmation of results Dodge Stratus (safety) (review) Pontiac Grand Am (safety) (review) Mercury Cougar (safety) (review) W J Confirm W Speculate S W W W Time = 4.3 sec 30

  31. Safety and fairness • Safety – Confirm blocks predictions (and results of) from exiting plan before verification • Fairness – CPU • Speculative operations executed by "speculative threads" – Lower priority threads – Memory and bandwidth • Speculative operations allocate "speculative resources" – Drawn from "speculative pool" of memory – Other solutions exist, such as RSVP (Zhang et al 1994) 31

Recommend


More recommend