1 / 28

Preference-Aware Query and Update Scheduling in Web-databases

Preference-Aware Query and Update Scheduling in Web-databases. Huiming Qu Department of Computer Science University of Pittsburgh. Joint work with Prof. Alex Labrinidis. Applications Online stock info. Weather, news… Inventory monitoring Network monitoring Web-DB workloads

conroy
Download Presentation

Preference-Aware Query and Update Scheduling in Web-databases

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Preference-Aware Query and Update Scheduling in Web-databases Huiming Qu Department of Computer Science University of Pittsburgh Joint work with Prof. Alex Labrinidis

  2. Applications Online stock info. Weather, news… Inventory monitoring Network monitoring Web-DB workloads Real-only queries Write-only updates Intensive and/or bursty We focus on scheduling queries and updates to enhance Web-Database performance Applications WWW Browser WWW Server Queries Web-database Updates Data Warehouse @HKUST, 12/18/2006

  3. Users care about Timeliness and Staleness Why scheduling? • Impact of scheduling • A simple test • FIFO • FIFO-UH (Update High) • FIFO-QH (Query High) • 2PL-HP [Abbott92] • Nobest for both dimensions • Combining performance metrics • Set constraint on one metric and optimize another [Kang04] • Construct a single metric based on weighted aggregation [Abadi05] @HKUST, 12/18/2006

  4. Outline • Introduction • Quality Contracts • Framework for unifying timeliness and staleness metrics through user preferences • QUTS • Query Update Time Share Scheduling according to Quality Contract framework • Experiments • Related work • Conclusions @HKUST, 12/18/2006

  5. Captures user preference Between quality metrics Among different queries Quality Contract Convert performance on individual metric to the “worth” to users Quality Contracts (QC) @HKUST, 12/18/2006

  6. Step QC QoS function QoD function Linear QC QoS function QoD function Quality Contract (QC) – cont. • Each Query is attached with a QC • monotonically non-increasing positive QC functions • QC<type, qosmax, rtmax, qodmax, uumax> • Optimization goal • system profit, P • More details in • [Labrinidis06] [Qu07] @HKUST, 12/18/2006

  7. Outline • Introduction • Quality Contracts • QUTS: Query Update Time Share Scheduling • Experiments • Related work • Conclusions @HKUST, 12/18/2006

  8. V RD Profit guided scheduling • Considers both value and constraint • Scheduling according to utility function in real time systems • VRD [haritsa93] • Value/constraint inflated priorities for queries and updates OK Incomparable @HKUST, 12/18/2006

  9. Baseline algorithms • Single priority queue • FIFO • w/ incomparablepriorities, queries and updatescannot be put together • Dual priority queue [adelberg95] • Separate update queue & query queue • Prioritize queries and updates correspondingly • UH (Update High) • QH (Query High) • Eliminate hard-wired preference for either QoS or QoD! • Profit-guided resource allocation (which queue to execute) @HKUST, 12/18/2006

  10. QUTS (Query Update Time Share) • Dual priority queue with dynamic concatenation • Two-level scheduling scheme (meta-scheduling) • Q1: how much CPU should be allocated to queries? • Q2: how to deploy CPU allocation? @HKUST, 12/18/2006

  11. Q1 - how much CPU to assign? • Query CPU percentage ρ (0 ≤ρ≤ 1) • Approximate system profit P using ρ QoS QoD Query share QoSmax profit QoDmax profit Update share Query share Quadratic function with linear constraints Optimal solution to maximize P @HKUST, 12/18/2006

  12. Q2 - how to deploy CPU allocation? • Periodically compute ρ and alleviate random variation • With in a single adaptation period , the percentage of CPU assigned to queries should be ρ. time @HKUST, 12/18/2006

  13. Q2 - how to deploy CPU allocation? • Adaptation period ωis divided to N atom time • For each , the system refreshes the system state according to ρ • Query High: • Update High: • Length of atom time • Too small → too many interruptions • Too large → miss opportunities … time ρ = 0.5 @HKUST, 12/18/2006

  14. Outline • Introduction • Quality Contracts • QUTS: Query Update Time Share Scheduling • Experiments • Related work • Conclusions @HKUST, 12/18/2006

  15. Experiment Setup • Real stock web site traces on April 24, 2000 • # queries: 82129 • # updates: 496892 • # stocks: 4602 • Scheduling algorithms compared through simulation @HKUST, 12/18/2006

  16. Experiment Design • Performance • Compare QUTS with FIFO, UH, and QH under the entire spectrum of QC; • Adaptability • Evaluate the adaptability of QUTS to changing workloads (QCs); • Sensitivity • Evaluate the sensitivity of QUTS to its two parameters (ω and ). @HKUST, 12/18/2006

  17. QC <qosmax, rtmax, qodmax, uumax> Performance metric Profit Percentage 1. Performance – QC setup 9 sets of QC groups @HKUST, 12/18/2006

  18. Step QCs Linear QCs QUTS gives near maximal profit from both QoS and QoD. Step QCs and linear QCs follow the same trend. 1. Performance – All QC groups @HKUST, 12/18/2006

  19. QUTS consistently achieves near maximal profit under the whole spectrum of QC 1. Performance – Various QC groups FIFO UH QUTS QH @HKUST, 12/18/2006

  20. QUTS adapts to QC changes fast! 2. QUTS Adaptability • Time is divided into four segments. • In odd segments, each QC has • qodmax = 5 x qosmax • In even segments, each QC has • qosmax = 5 x qodmax @HKUST, 12/18/2006

  21. ( = 10ms) Performance varies little for a wide range of ω Betterwhen ≥ transaction execution time 3. QUTS Sensitivity • Adaptation Period ω (ω = 1000ms) • Atom Time @HKUST, 12/18/2006

  22. Outline • Introduction • Quality Contracts • QUTS: Query Update Time Share Scheduling • Experiments • Related work • Conclusions @HKUST, 12/18/2006

  23. Web-databases [Adelberg et al. 1995] [Challenger et al. 2000] [Luo et al. 2002] [Datta et al. 2002] [Labrinidis et al. 2004] [Qu et al. 2006] [Labrinidis et al. 2006] [Xu et al. 2006] … Real time databases [Abbott et al., 1988] [Sha et al., 1991] [Haritsa et al., 1993] [Ramamritham et al., 1994] [Burns et al., 2000] … Stream Processing [Carney et al., 2002] [Das et al., 2003] [Babcock et al., 2004] [Sharaf et al., 2005] [Abadi et al., 2005] … Economic Models [Ferguson et al., 1996] [Stonebraker et al., 1996] … Related work @HKUST, 12/18/2006

  24. Conclusions • We proposed • a Quality Contract framework to capture user preferences in web-database systems, and • a meta schedule scheme, QUTS, to dynamically concatenate query queue and update queue according to user queries. • We showed with extensive simulation study on real data traces that • QUTS outperforms the baseline algorithms in the whole spectrum of Quality Contract setup, • QUTS adapts fast to the changing workloads, and • QUTS has little sensitivity to its two parameters. @HKUST, 12/18/2006

  25. Future work • Quality Contract generation strategies • Synthetic workload • Provide suggestions to users to select QCs • I/O scheduling for disk-based Web databases @HKUST, 12/18/2006

  26. Thanks! • Comments & Questions? Huiming Qu huiming@cs.pitt.edu @HKUST, 12/18/2006

  27. Workload characteristics @HKUST, 12/18/2006

  28. Questions • Skewed queries • Atom time -> number of tran. • Why restarts • Network delay comparable to database delay when facing high loads of updates • Scalability point of view • Plot the correlation on time (U vs. Q) @HKUST, 12/18/2006

More Related