350 likes | 468 Views
UNIT: User-ceNtrIc Transaction Management in Web-Database Systems. Huiming Qu, Alexandros Labrinidis, Daniel Mosse Advanced Data Management Technologies Lab http://db.cs.pitt.edu Department of Computer Science University of Pittsburgh. QUERIES. UPDATES. Stock Trading Services (ideal).
E N D
UNIT: User-ceNtrIc Transaction Management in Web-Database Systems Huiming Qu, Alexandros Labrinidis, Daniel Mosse Advanced Data Management Technologies Lab http://db.cs.pitt.edu Department of Computer Science University of Pittsburgh
QUERIES UPDATES Stock Trading Services (ideal) Web databases GOOG $367.9 GOOG IBM IBM $75.8 ADMT Lab, Department of Computer Science, University of Pittsburgh
Stock Trading Services (reality) • To avoid overloading: • increase hardware capacity, or • adding software support Web databases GOOG OVERLOADED! GOOG GOOG GOOG GOOG GOOG OTE IBM GOOG SUN IBM GOOG GOOG GOOG OTE MSFT ADMT Lab, Department of Computer Science, University of Pittsburgh
Stock Trading Services (UNIT) UNIT MSFT Web databases GOOG GOOG GOOG $367.9 OTE IBM SUN IBM TUTU $75.8 OTE ADMT Lab, Department of Computer Science, University of Pittsburgh
Problem Statement • Users’ satisfaction are based on: • Freshness: query is answeredbased on fresh data • Timeliness: query is answeredwith short response time • Transaction types • read-only queries and write-only updates are competing for system resources, • more cpu to queries, better timeliness. • more cpu to updates, better freshness. • Optimization Goal: Maximize user satisfaction • through balancing the load of query and update transactions. ADMT Lab, Department of Computer Science, University of Pittsburgh
Outline • Motivating Example • Performance metric: User Satisfaction • System overview & algorithms • Experiments • Related work • Conclusions ADMT Lab, Department of Computer Science, University of Pittsburgh
Q1 returns with U1 U1 U3 U2 t User Requirements • Timeliness: Meeting deadlines • Query response time ≤ its relative deadline. • Freshness: Meeting freshness requirements • Query freshness ≥ its freshness requirement. • Query freshness (aggregation of data freshness): • The minimal freshness of data accessed by the query • Data freshness (lag-based): • Based on the number of unapplied updates • Query <deadline, freshness> ADMT Lab, Department of Computer Science, University of Pittsburgh
Is Success Ratio Enough? • Queries may be failed and dropped if: • rejected because of the admission control (Rejection Failure), or • fail to meet the deadlines (Deadline Missed Failure), or • fail to meet the freshness requirements (Data Stale Failure) • Otherwise, it succeeds. • Success Ratio: % of queries meeting their timeliness and freshness requirements. • What is missing from success ratio? • Users’ preferences between timeliness and freshness. ADMT Lab, Department of Computer Science, University of Pittsburgh
User Satisfaction Metric (USM) ADMT Lab, Department of Computer Science, University of Pittsburgh
Outline • Motivating Example • Performance metric: User Satisfaction • System overview & algorithms • Experiments • Related work • Conclusions ADMT Lab, Department of Computer Science, University of Pittsburgh
Reject Failure Deadline Missed Failure Data Stale Failure Success UNIT System (User-ceNtrIc Trans-action Management) UNIT Updates Queries Admission Control Frequency Modulation • Web-databases • Dual priority queue • Updates > queries • EDF for queries • FIFO for updates • 2PL-HP • UNIT: load control • Load Balancing Controller • Query Admission Control • Update Frequency Modulation Data +/- updates +/- queries Statistics USM Load Balancing Controller ADMT Lab, Department of Computer Science, University of Pittsburgh
Load Balancing Controller Success Gain + Increase # of queries Gain Gain 0 Rejection Cost Rejection Cost Increase # of updates Data Stale Cost Data Stale Cost Deadline Missed Cost Deadline Missed Cost - Decrease # of updates Decrease # of queries Failure Cost ADMT Lab, Department of Computer Science, University of Pittsburgh
q6 q6 q7 q7 Query Admission Control • Transaction deadline check • Will query meet its deadline with the current system workload? • System USM check • Will query jeopardize the system USM if admitted? Current time q4 deadline q5-7 deadlines q4 q1 q2 q3 q5 time ADMT Lab, Department of Computer Science, University of Pittsburgh
q1 q2 q3 q4 q5 q1 q2 q3 q1 q2 q3 q6 q7 Query Admission Control (cont.) • Use Cflex to Increase/Decrease # of queries • Decrease Cflex to increase queries admitted • Increase Cflex to decrease queries admitted q4 deadline q5-7 deadlines Current time smaller Cflex larger Cflex time Cflex ADMT Lab, Department of Computer Science, University of Pittsburgh
Decrease # of Updates Ticket Value (TV) for each active data item. Updates increase TV; Queries decrease TV. Higher TV higher probability to be degraded. Lottery Scheme [Waldspurger 95] to pick data items to drop updates. Increase # of Updates Randomly pick a degraded data item. Restore all its updates. U1 U1 U1 U1 Q3 Update Frequency Modulation D1 is picked to reduce its updates! D3 D1 D2 ADMT Lab, Department of Computer Science, University of Pittsburgh
Outline • Motivating Example • Performance Metric: User Satisfaction • System Overview & Algorithms • Experiments • Related Work • Conclusions ADMT Lab, Department of Computer Science, University of Pittsburgh
Algorithms Compared • IMU • Immediate Update, no admission control, 100% freshness • ODU • On-demand Update, no admission control, 100% freshness • QMF: [Kang,TKDE’04] • Immediate update, admission control, no weights among rejection, timeliness and freshness requirements are considered. • UNIT • is what U need ADMT Lab, Department of Computer Science, University of Pittsburgh
Experiment Design We want to evaluate the following: • Effectiveness of the update frequency modulation, • Performance under the naïve USM setting (= Success Ratio), • Performance under various USM settings, • Distribution of four query outcomes under various USM settings. ADMT Lab, Department of Computer Science, University of Pittsburgh
Query trace based on HP disk cello99a access traces (1069 hours, 110,035 reads). Relative deadline generated from query exec time qt uniformly distributed from avg(qt) to 10 * max(qt)). Freshness requirement for all queries is set to 90%. Update traces Experimental Setup ADMT Lab, Department of Computer Science, University of Pittsburgh
few queries Updates can be removed without hurting query freshness. 1. Update Frequency Modulation Evaluation Query Distributions on Data Update Distributions on Data (med-unif) ADMT Lab, Department of Computer Science, University of Pittsburgh
few queries A very small portion of updates are needed to keep queries freshness high. 1. Update Frequency Modulation Evaluation (cont.) Query Distributions on Data Update Distributions on Data (med-neg) ADMT Lab, Department of Computer Science, University of Pittsburgh
2. Naïve USM = Success Ratio(gain = 1, penalties = 0) positive correlation negative correlation • UNIT has the least performance drop when workload increases. ADMT Lab, Department of Computer Science, University of Pittsburgh
UNIT has the least penalties. UNIT has the highest gain. 3. USM (gain = 1, penalties ≠ 0) Case 1 - Gain dominates: penalties = 0.1 or 0.5 Case 2 - Penalty dominates: penalties = 1 or 5 ADMT Lab, Department of Computer Science, University of Pittsburgh
UNIT obtains higher success ratio than others because it keeps queries from falling into the categories that have higher penalties. 4. Query outcome distributions • Percentage of queries that are rejected (R), failed to meet deadlines (D), failed to meet freshness (F), or succeed (S). Other Algorithms UNIT under different USM settings ADMT Lab, Department of Computer Science, University of Pittsburgh
Web-databases [Luo et al. Sigmod 02] [Datta et al. Sigmod 02] [Challenger et al. Infocom 00] [Labrinidis et al. VLDBJ 04] … Real time databases [Adelberg et al., Sigmod 95] [Kang et al., TDKE 04] … Stream Processing [Tatbul et al., VLDB 03] [Das et al., Sigmod 03] [Ding et al., CIKM 04] [Babcock et al., ICDE 04] [Sharaf et al., WebDB 05] … Related work ADMT Lab, Department of Computer Science, University of Pittsburgh
Outline • Motivating Example • Performance metric: User Satisfaction • System overview & algorithms • Experiments • Related work • Conclusions ADMT Lab, Department of Computer Science, University of Pittsburgh
Conclusions • We proposed • a unified User Satisfaction Metric (USM) for web-database systems, • a feedback control system, UNIT, to control the query and update workload in order to maximize system USM, and • two algorithms that perform query admission control and update frequency modulation to balance the query and update workload. • We finally showed with extensive simulation study based on real data that UNIT outperforms two baseline algorithms and the current state of the art. ADMT Lab, Department of Computer Science, University of Pittsburgh
Thank you! Huiming Qu huiming@cs.pitt.edu Questions and Comments
ADMT Lab, Department of Computer Science, University of Pittsburgh
ADMT Lab, Department of Computer Science, University of Pittsburgh
ADMT Lab, Department of Computer Science, University of Pittsburgh
User Requirements • Timeliness: Meeting deadlines • Freshness: Meeting freshness requirements ADMT Lab, Department of Computer Science, University of Pittsburgh
Performance Metrics • Timeliness • response time • Freshness • time-based (t) • divergence-based (50) • lag-based (2) • … • Deficiency of the above traditional metrics is • Lack of semantic info (user preferences/requirements) from applications. Q1 returns with U1:$300 U1:$300 U2:$310 U3:$350 t ADMT Lab, Department of Computer Science, University of Pittsburgh
Update Frequency Modulation • Degrade Update • Each data item maintains a Degrading Ticket Value Tj • Lottery Schemes [Waldspurger 95], higher ticket value means more probably to be degraded. • Query decrease Tj by DTj, Update increase Tj by ITj • If picked, it is degraded by 10%. • Upgrade Update • randomly pick a degraded data item • Upgrade it by 50% ADMT Lab, Department of Computer Science, University of Pittsburgh
Naïve USM • UNIT outperforms others in all cases. ADMT Lab, Department of Computer Science, University of Pittsburgh