using real-time scheduling principles in web service clusters to achieve predictability of execution

41
Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Service Execution Vidura Gamini Abhaya Prof. Zahir Tari and Assoc. Prof. Peter Bertok Distributed Systems and Networking Group School of Computer Science and IT RMIT University Melbourne, Australia December 8, 2010

Upload: vidura-gamini-abhaya

Post on 24-Jan-2015

547 views

Category:

Documents


0 download

DESCRIPTION

ICSOC 2010 - San Francisco, USA

TRANSCRIPT

Page 1: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Using Real-Time Scheduling Principles in Web

Service Clusters to Achieve Predictability of

Service Execution

Vidura Gamini AbhayaProf. Zahir Tari and Assoc. Prof. Peter Bertok

Distributed Systems and Networking GroupSchool of Computer Science and IT

RMIT UniversityMelbourne, Australia

December 8, 2010

Page 2: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion

Presentation Structure

1 Introduction

2 Previous Work

3 Solution

4 Empirical Results

5 Conclusion

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 3: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Motivation

Motivation

Web Services enable communication between DistributedHeterogeneous Systems.

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 4: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Motivation

Motivation

Web Services enable communication between DistributedHeterogeneous Systems. It is the foundation for...

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 5: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Motivation

Motivation

Web Services enable communication between DistributedHeterogeneous Systems. It is the foundation for...

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 6: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Motivation

Motivation

Web Services enable communication between DistributedHeterogeneous Systems. It is the foundation for...

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 7: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Motivation

Motivation

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 8: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Motivation

Motivation

Scalability Issues...

Quality of Service ?

Performance ?

Predictability ?

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 9: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Single Host

1 Introduction

2 Previous Work

3 Solution

4 Empirical Results

5 Conclusion

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 10: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Single Host

Our Previous Work [5,6,*]...

Achievement

Achieve Predictability and Service Differentiation in WS execution(in a single server)

* Building Web Service Middleware with Predictable Service Execution, WISE 2010, LNCS, vol. 6488 pp. 23-37.

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 11: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Single Host

Our Previous Work [5,6,*]...

Achievement

Achieve Predictability and Service Differentiation in WS execution(in a single server)

Highlights...

Introduced the notion of a deadline

Use Real-time scheduling principles

Select tasks with achievable deadlines, reject the rest

Selected tasks scheduled in the order of increasing deadlines

Implementation based on Apache Axis2

Tested for various request size, arrival rate combinations

* Building Web Service Middleware with Predictable Service Execution, WISE 2010, LNCS, vol. 6488 pp. 23-37.

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 12: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Single Host

Task Execution with a Deadline

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 13: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Single Host

Task Execution with a Deadline

Laxity of a Task

Laxity =Deadline

ExecutionTime

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 14: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Single Host

Single Host Implementation

Task selection based on a ‘Schedulability Check’

Deadline based scheduling

Implementation on a single server

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 15: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Single Host

Deadline based Task Schedule

EDF based task schedule

Larger laxities allow requests to be executed in staggeredmanner

Enable timely completion of requests with earlier deadlines

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 16: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Overview Dispatching Algo Details

1 Introduction

2 Previous Work

3 Solution

4 Empirical Results

5 Conclusion

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 17: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Overview Dispatching Algo Details

Solution Overview

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 18: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Overview Dispatching Algo Details

Solution Overview

Sun Real-time Java Specification used asdevelopment platform

Sun Solaris 10 08/05 used as RT-OS

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 19: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Overview Dispatching Algo Details

Solution Overview

Sun Real-time Java Specification used asdevelopment platform

Sun Solaris 10 08/05 used as RT-OS

Apache Synapse based dispatcher implementation

Apache Axis2 based executor implementation

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 20: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Overview Dispatching Algo Details

Solution Overview

Sun Real-time Java Specification used asdevelopment platform

Sun Solaris 10 08/05 used as RT-OS

Apache Synapse based dispatcher implementation

Apache Axis2 based executor implementation

All Thread-pools replaced with custom-designedReal-time Thread pools

Introduction of Real-time scheduler component

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 21: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Overview Dispatching Algo Details

Cluster Design

Request processing at the dispatcher

Requests are dispatched based on algorithm used

Requests are ‘mostly’ queued at dispatcher

Results are sent back to clients via dispatcher

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 22: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Overview Dispatching Algo Details

Dispatching Algorithms

Objectives

*Ensures deadline requirement of tasks could be met*Distribute requests evenly among executors based on a condition*Avoids executors going into overload conditions

4 algorithms used

RT-RoundRobin

RT-Sequential

RT-ClassBased

RT-LaxityBased

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 23: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Overview Dispatching Algo Details

RT-RoundRobin

Details

Requests assignment cyclesthrough all executors in RRfashion

Sched. check is done only onceper request

If sched. check fails on selectedserver → request rejected

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 24: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Overview Dispatching Algo Details

RT-RoundRobin

Details

Requests assignment cyclesthrough all executors in RRfashion

Sched. check is done only onceper request

If sched. check fails on selectedserver → request rejected

Hightlights

POC for how a simple dispatching algorithm could be made real-time ready

Processing overhead is minimum

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 25: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Overview Dispatching Algo Details

RT-Sequential

Details

Requests are assigned in asequential manner

Req’s sent to one executor tillsched. check fails, then assignedto the second and so on

Sched. check happens againstmultiple executors till a requestcan be assigned

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 26: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Overview Dispatching Algo Details

RT-Sequential

Details

Requests are assigned in asequential manner

Req’s sent to one executor tillsched. check fails, then assignedto the second and so on

Sched. check happens againstmultiple executors till a requestcan be assigned

Highlights

If it’s possible to schedule a job within the cluster, it will be guaranteed

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 27: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Overview Dispatching Algo Details

RT-ClassBased

Details

Requests are divided into classesbased on a priority scheme

Mapping of requests to executorsis pre-determined and definedoffline

Sched. check is only consideredwith the assigned executor

Reference implementation usespriorities based on task sizes

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 28: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Overview Dispatching Algo Details

RT-ClassBased

Details

Requests are divided into classesbased on a priority scheme

Mapping of requests to executorsis pre-determined and definedoffline

Sched. check is only consideredwith the assigned executor

Reference implementation usespriorities based on task sizes

Highlights

Results in the reduction of variance of task sizes at each executor

Pre-defined mapping of request sizes to executors could be done usingpre-profiled execution times or execution time history

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 29: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Overview Dispatching Algo Details

RT-LaxityBased

Details

Laxity = Ability of delaying arequest whilst still meeting itsdeadline

Higher the laxity the morerequests an executor could service

Sched. check is done only againstthe assigned executor

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 30: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Overview Dispatching Algo Details

RT-LaxityBased

Details

Laxity = Ability of delaying arequest whilst still meeting itsdeadline

Higher the laxity the morerequests an executor could service

Sched. check is done only againstthe assigned executor

Highlights

Distribution of requests results in a broad range of laxities at each executor

Keeps track of the last two laxities assigned and prevents them being assignedfor the same executor consecutively

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 31: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion RT-RR RT-CB Others

1 Introduction

2 Previous Work

3 Solution

4 Empirical Results

5 Conclusion

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 32: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion RT-RR RT-CB Others

RT-RoundRobin vs Round-Robin

10

20

30

40

50

60

70

80

90

100

0.05s � 0.1s 0.1s � 0.25s 0.1s - 0.5s 0.25s - 1s

Per

cent

age

of d

eadl

ines

met

Inter-arrival times

Comparison of Round-robin vs. RT-RoundRobin - Deadline Achievement Rates

RR - 2 Execs.RR - 3 Execs.RR - 4 Execs.

RT-RR - 2 Execs.RT-RR - 3 Execs.RT-RR - 4 Execs.

RT-RR accepts between 20.5% (2 Exec. - fastest) and 99.9% (4 Exec. -slowest) of the requests.

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 33: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion RT-RR RT-CB Others

RT-RoundRobin vs Round-Robin

10

20

30

40

50

60

70

80

90

100

0.05s � 0.1s 0.1s � 0.25s 0.1s - 0.5s 0.25s - 1s

Per

cent

age

of d

eadl

ines

met

Inter-arrival times

Comparison of Round-robin vs. RT-RoundRobin - Deadline Achievement Rates

RR - 2 Execs.RR - 3 Execs.RR - 4 Execs.

RT-RR - 2 Execs.RT-RR - 3 Execs.RT-RR - 4 Execs.

0

2000

4000

6000

8000

10000

12000

0 500000 1e+06 1.5e+06 2e+06 2.5e+06 3e+06 3.5e+06 4e+06 4.5e+06 5e+06

Exe

cutio

n T

ime

(ms)

Task Size

Task Size distribution between 3 Executors (1 - 5000000 (Uniform); 0.1sec - 0.5sec (Uniform) roundrobin 3 exec)

Executor 1Executor 2Executor 3

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 34: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion RT-RR RT-CB Others

RT-ClassBased vs Class Based

10

20

30

40

50

60

70

80

90

100

0.05 - 0.1 0.1 - 0.25 0.1 - 0.5 0.25 - 1

Per

cent

age

of d

eadl

ines

met

Inter-arrival times

Comparison of Class-based vs. RT-CB - Deadline Achievement Rates

CB - 2 Execs.CB - 3 Execs.CB - 4 Execs.

RT-CB - 2 Execs.RT-CB - 3 Execs.RT-CB - 4 Execs.

RT-CB accepts between 28.6% (2 Exec. - fastest) and 100% (4 Exec. - slowest)of the requests.

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 35: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion RT-RR RT-CB Others

RT-ClassBased vs Class Based

10

20

30

40

50

60

70

80

90

100

0.05 - 0.1 0.1 - 0.25 0.1 - 0.5 0.25 - 1

Per

cent

age

of d

eadl

ines

met

Inter-arrival times

Comparison of Class-based vs. RT-CB - Deadline Achievement Rates

CB - 2 Execs.CB - 3 Execs.CB - 4 Execs.

RT-CB - 2 Execs.RT-CB - 3 Execs.RT-CB - 4 Execs.

0

10

20

30

40

50

60

70

80

90

0 50 100 150 200 250 300 350 400

CP

U U

tiliz

atio

n %

Sample #

CPU utilisation at each Executor - (1 - 5000000 (Uniform); 0.25sec - 1sec (Uniform) classbased 3 exec)

Executor 1Executor 2Executor 3

0

2000

4000

6000

8000

10000

12000

14000

16000

0 500000 1e+06 1.5e+06 2e+06 2.5e+06 3e+06 3.5e+06 4e+06 4.5e+06 5e+06

Exe

cutio

n T

ime

(ms)

Task Size

Task Size distribution between 3 Executors (1 - 5000000 (Uniform); 0.1sec - 0.5sec (Uniform) classbased 3 exec)

Executor 1Executor 2Executor 3

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 36: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion RT-RR RT-CB Others

RT-Sequential and RT-Laxity

10

20

30

40

50

60

70

80

90

100

0.05s � 0.1s 0.1s � 0.25s 0.1s - 0.5s 0.25s - 1s

Ave

rage

d pe

rcen

tage

of d

eadl

ines

met

Inter-arrival times

Comparison Deadline Achievement Rates - Averaged by Algorithm

RT-RRRT-CB

RT-SeqRT-Lax

Highest acceptance rate for any algorithm for 2 executors with highest arrivalrate is 38.5% for RT-LaxityBased

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 37: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion RT-RR RT-CB Others

RT-Sequential and RT-Laxity

10

20

30

40

50

60

70

80

90

100

0.05s � 0.1s 0.1s � 0.25s 0.1s - 0.5s 0.25s - 1s

Ave

rage

d pe

rcen

tage

of d

eadl

ines

met

Inter-arrival times

Comparison Deadline Achievement Rates - Averaged by Algorithm

RT-RRRT-CB

RT-SeqRT-Lax

0

10

20

30

40

50

60

0 200 400 600 800 1000 1200

CP

U U

tiliz

atio

n %

Sample #

CPU utilisation at each Executor - (1 - 5000000 (Uniform); 0.25sec - 1sec (Uniform) laxitybased 3 exec)

Executor 1Executor 2Executor 3

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 38: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Future Work Recap

1 Introduction

2 Previous Work

3 Solution

4 Empirical Results

5 Conclusion

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 39: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Future Work Recap

Future Work

Further analysis of cluster behaviour with mix of tasks

Advanced dispatching and re-dispatching models

Predictability in the networking layer

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 40: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Future Work Recap

Conclusion

Previous work - We achieved predictability of execution on asingle server

We extend it to achieve predicability in a cluster of servers

Presented four task dispatching algorithms

Evaluated their performance empirically

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings

Page 41: Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Predictability of Execution

Intro. Prev. Work Solution Results Conclusion Future Work Recap

Thank You !

Questions or Comments ?

V. Gamini Abhaya et. al. ICSOC 2010 - pages 197-212 in proceedings