LongTerm Resource Fairness Towards Economic Fairness on Pay

  • Slides: 31
Download presentation
Long-Term Resource Fairness Towards Economic Fairness on Pay -as-you-use Computing Systems Shanjiang Tang, Bu-Sung

Long-Term Resource Fairness Towards Economic Fairness on Pay -as-you-use Computing Systems Shanjiang Tang, Bu-Sung Lee, Bingsheng He, Haikun Liu School of Computer Engineering Nanyang Technological University

Pay-As-You-Use is Pervasive • Charge users based on the amount of resources used over

Pay-As-You-Use is Pervasive • Charge users based on the amount of resources used over time (e. g. , Hourly). • Advantages – Elasticity – Flexibility – Cost efficiency • Pay-as-you-use is becoming common and popular. – Supercomputing, Cloud Computing 2

Resource Utilization = • User resource demands are heterogeneous. – Users have different demands.

Resource Utilization = • User resource demands are heterogeneous. – Users have different demands. – A user’s demand is changing over time. Static provisioning/partitioning causes underutilization. • Resource utilization is a critical problem in such pay -as-you-use environments. – Providers waste resources ( waste investment and lose profit). – Users waste money. Twitter’s Cluster 3 One week data from Twitter production cluster [Delimitrou et. Al. ASPLOS’ 14]

To Share or Not To Share? • Resource Sharing can improve resource utilization. –

To Share or Not To Share? • Resource Sharing can improve resource utilization. – Allow underloaded users to release resources to other users. – Allow overloaded users to temporarily use more resources (from others). Reduce the idle resources at runtime. Resolve resource contention across users. • What about fairness? – If the fairness is not solved, resource sharing is unlikely to achieve in pay-as-you-use environments. 4

Pay-as-you-use Fairness: Resource-as-you-pay • The total resources a user gained should be proportional to

Pay-as-you-use Fairness: Resource-as-you-pay • The total resources a user gained should be proportional to her payment. • This is a Service-Level Agreement (SLA). A: 60 $ A 60% B: 40 $ B 40% Resource Service = Resources-per-time X service time 5

Fair Policy in Existing Systems • State-of-the-art: Max-min fairness – Select the user with

Fair Policy in Existing Systems • State-of-the-art: Max-min fairness – Select the user with the minimum allocation/share ratio every time. – Consider the present requirement only (memoryless). • Memoryless fairness has severe problems in pay-as-you-use environments, violating the following properties: – Resource-as-you-pay fairness guarantee. – Non-Trivial workload incentive and sharing incentive. – Truthfulness (Users may get benefits by cheating). 8

Problems with Memory. Less Fairness • Resource-as-you-pay Fairness Problem – E. g. , A,

Problems with Memory. Less Fairness • Resource-as-you-pay Fairness Problem – E. g. , A, B equally pay for total resource of 100 units. New Demand 20 Time Current Allocation at t 1: t 1 A B 20 100 80 Accumulate Resource Usage: Unsatisfied Demand 20 80 0 20 A B 9

Problems with Memory. Less Fairness • Resource-as-you-pay Fairness Problem – E. g. , A,

Problems with Memory. Less Fairness • Resource-as-you-pay Fairness Problem – E. g. , A, B equally pay for total resource of 100 units. New Demand Time 40 Current Allocation at t 2: A B t 1 20 100 t 2 40 60 60 Accumulate Resource Usage: Unsatisfied Demand 60 140 0 20 A B 10

Problems with Memory. Less Fairness • Resource-as-you-pay Fairness Problem – E. g. , A,

Problems with Memory. Less Fairness • Resource-as-you-pay Fairness Problem – E. g. , A, B equally pay for total resource of 100 units. New Demand Time 50 Current Allocation at t 3: 50 A B t 1 20 100 t 2 40 60 t 3 80 50 Unsatisfied Demand Accumulated resource usage: 110 190 30 20 A B 11

Problems with Memory. Less Fairness • Resource-as-you-pay Fairness Problem – E. g. , A,

Problems with Memory. Less Fairness • Resource-as-you-pay Fairness Problem – E. g. , A, B equally pay for total resource of 100 units. New Demand Time 50 Current Allocation at t 4: 50 A B t 1 20 100 t 2 40 60 t 3 80 50 t 4 60 50 Unsatisfied Demand Accumulated resource usage: 160 240 40 20 A B Existing Fair Policy fails to satisfy Resource-as-you-pay fairness!!! 12

Memory. Less Fairness Violates Sharing Incentives • Non-trivial workload and sharing incentive Problem –

Memory. Less Fairness Violates Sharing Incentives • Non-trivial workload and sharing incentive Problem – Yielding resources to others have no benefits. – Suppose A, B, and C equally pay for total resource of 100 units. A has 13 idle resource units. In that case, A can be selfish, either idle or running trivial workloads. CPU A: 20 13 B: 33 C: 33 A’s idle resource 13

Cheating User Benefits on Memory. Less Fairness • Truthfulness Problem – Suppose A, B,

Cheating User Benefits on Memory. Less Fairness • Truthfulness Problem – Suppose A, B, C equally pay for a cluster of 100 units, with true demand to be 33, 21 and 80, respectively. – Case 1: all are honest. – Case 2: User A cheats and claims the demand to be 40. A: 33 A: B: 21 12 B: 33 C: Case 1: A is honest 33 6 21 6 A’s cheating get benefits 33 Case 2: A is cheating 14

Our Work • Challenges: can we find a fair sharing policy that satisfies the

Our Work • Challenges: can we find a fair sharing policy that satisfies the following properties? – Resource-as-you-pay fairness – Non-trivial workload and sharing incentives – Truthfulness • Our Solution: Long-Term Resource Fairness – Ensure resource fairness over a period of time. – With historical information considered. 15

Long-Term Resource Fairness • Basic Concept: Loan agreement (Lending w/o interests) – When resources

Long-Term Resource Fairness • Basic Concept: Loan agreement (Lending w/o interests) – When resources are not needed, users can lend the resources to others. – When more resources are needed, others should give back. Benefit others and user herself. 16

Long-Term Resource Fairness • Satisfy Pay-as-you-use Fairness 20 Current Allocation at t 1: 80

Long-Term Resource Fairness • Satisfy Pay-as-you-use Fairness 20 Current Allocation at t 1: 80 Lend Resources: A 30 B -30 New Demand Time t 1 A B 20 100 Unsatisfied Demand Accumulated resource usage: 20 80 0 20 A B 17

Long-Term Resource Fairness • Satisfy Pay-as-you-use Fairness Lend Resources: 40 Current Allocation at t

Long-Term Resource Fairness • Satisfy Pay-as-you-use Fairness Lend Resources: 40 Current Allocation at t 2: 60 A B 40 New Demand Time A B t 1 20 100 t 2 40 60 -40 Unsatisfied Demand Accumulated resource usage: 60 140 0 20 A B 18

Long-Term Resource Fairness • Satisfy Pay-as-you-use Fairness Lend Resources: 40 Current Allocation at t

Long-Term Resource Fairness • Satisfy Pay-as-you-use Fairness Lend Resources: 40 Current Allocation at t 2: 60 A B 40 -40 New Demand Time A B t 1 20 100 t 2 40 60 t 3 80 50 Unsatisfied Demand Accumulated resource usage: 60 140 0 20 A B 19

Long-Term Resource Fairness • Satisfy Pay-as-you-use Fairness Lend Resources: Current Allocation at t 3:

Long-Term Resource Fairness • Satisfy Pay-as-you-use Fairness Lend Resources: Current Allocation at t 3: 80 A B 10 -10 New Demand Time A B t 1 20 100 t 2 40 60 t 3 80 50 20 Unsatisfied Demand Accumulated resource usage: 140 160 0 50 A B 20

Long-Term Resource Fairness • Satisfy Pay-as-you-use Fairness Lend Resources: Current Allocation at t 3:

Long-Term Resource Fairness • Satisfy Pay-as-you-use Fairness Lend Resources: Current Allocation at t 3: 80 A B 20 10 -10 New Demand Time A B t 1 20 100 t 2 40 60 t 3 80 50 t 4 60 50 Unsatisfied Demand Accumulated resource usage: 140 160 0 50 A B 21

Long-Term Resource Fairness • Satisfy Pay-as-you-use Fairness Lend Resources: Current Allocation at t 4:

Long-Term Resource Fairness • Satisfy Pay-as-you-use Fairness Lend Resources: Current Allocation at t 4: 60 40 A B 0 0 New Demand Time A B t 1 20 100 t 2 40 60 t 3 80 50 t 4 60 50 Unsatisfied Demand Accumulated resource usage: 200 0 60 A B Long-Term Resource Fairness satisfy Resource-as-you-pay fairness. 22

Other Properties of Long-Term Resource Fairness • Satisfy non-trivial workload and sharing incentives –

Other Properties of Long-Term Resource Fairness • Satisfy non-trivial workload and sharing incentives – Running trivial workload can waste money. – Not sharing idle resource can waste money. • Users cannot get benefits by lying (strategy proof). Proof sketches are in the paper. 23

LTYARN • Implement Long-Term Resource Fairness in YARN – Extend memoryless max-min fairness to

LTYARN • Implement Long-Term Resource Fairness in YARN – Extend memoryless max-min fairness to long-term maxmin fairness. – Add a few components into resource manager • Support full long-term and time window-based requirements. • Currently support a single resource type (main memory). 24

LTYARN Design • Quantum Updater (QU) – Estimates task execution time. – Updates the

LTYARN Design • Quantum Updater (QU) – Estimates task execution time. – Updates the resource usage history periodically. • Resource Controller (RC) – Manages and updates resource for each queue. • Resource Allocator (RA) – Performs long-term resource allocation. – Runs when there are pending tasks and idle resources. 25

Evaluation • A Hadoop Cluster – 10 nodes, each with two Intel X 5675

Evaluation • A Hadoop Cluster – 10 nodes, each with two Intel X 5675 CPUs (6 cores per CPU with 3. 07 GHz), 24 GB DDR 3 memory, 56 GB hard disks. – YARN-2. 2. 0, configured with 24 GB memory per node. • Macro-benchmarks – – Synthetic Facebook Workload Purdue Workload HIVE/TPC-H Spark Detailed setups are in the paper. 26

Metrics • Evaluation metrics – Fairness degree for each user (>1 for sharing benefits;

Metrics • Evaluation metrics – Fairness degree for each user (>1 for sharing benefits; <1 for sharing loss) – Resource-as-you-pay fairness – Application performance • Benchmark scenario – The four macro benchmarks equally share the cluster. – Each benchmark runs in a separate queue. – Window size =1 day. 27

Sharing Benefit/Loss • LTYARN enables sharing benefits for all applications. (a). YARN (b). LTYARN

Sharing Benefit/Loss • LTYARN enables sharing benefits for all applications. (a). YARN (b). LTYARN 29

Resource-as-you-pay Fairness Results • LTYARN achieves resource-as-you-pay fairness. 30

Resource-as-you-pay Fairness Results • LTYARN achieves resource-as-you-pay fairness. 30

Performance Results • Sharing always achieves a better performance. • Long-term fairness is comparable

Performance Results • Sharing always achieves a better performance. • Long-term fairness is comparable to memory-less fairness (max-min). 31

Conclusions • Max-min resource fairness is memoryless and unsuitable for pay-as-you-use computing. • We

Conclusions • Max-min resource fairness is memoryless and unsuitable for pay-as-you-use computing. • We define long-term resource fairness that can satisfy the desirable properties. • We develop LTYARN by integrating long-term resource fairness into YARN – Homepage: http: //sourceforge. net/projects/ltyarn/ 32

We are Hosting IEEE Cloud. Com 2014 in Singapore • Deadline for paper submissions:

We are Hosting IEEE Cloud. Com 2014 in Singapore • Deadline for paper submissions: July 31, 2014 • Notification of Paper acceptance: September 2, 2014 • Conference: December 15 -18, 2014 34

Thanks! Question? 35

Thanks! Question? 35