30
CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION FRAMEWORK Iman Sadooghi Dr. Ioan Raicu Data Intensive Computing (DataSys) Laboratory

CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

Page 1: CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION FRAMEWORK

Iman Sadooghi Dr. Ioan Raicu

Data Intensive Computing (DataSys) Laboratory

Page 2: CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

Introduction • MTC: Many-Task Computing

•  Bridge the gap between HPC and HTC •  Many resources over short time periods •  Loosely coupled apps with HPC orientations •  Example: MapReduce

• Data analytics moving towards fine granular tasks

•  Example: GAMESS(chemistry), TPC-H(industry)

•  Traditional Batch Schedulers •  Heavy weight •  Cannot scale for the new workloads

Image taken from: Sparrow: Scalable scheduling for sub-second parallel jobs. Tech. Rep. UCB/EECS-2013-29, University of California, Berkeley,

Page 3: CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

Introduction •  Large Scale Task Execution

•  Run on distributed resources

•  Workloads •  Tasks

•  More in number •  Shorter in length

•  Requirements for high performance •  Concurrency •  Load Balance •  System Utilization

Page 4: CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

Motivation • Current resources

•  Clusters & Super Computers •  Alternatives?!

• How about Clouds? •  Large resources •  Easier access than the other two •  Scale up as much as you want •  Customizable •  Pay-as-you go model, pay only when you use it •  Perfect for medium size projects with limited budget

•  Use as long as you have budget

Page 5: CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

State-of-the-art job schedulers −  Centralized Master/Slaves architecture

−  Scalability issues at petascale and beyond −  Single point of failure −  Example: SLURM, CONDOR, Falkon

−  Distributed Architectures −  Hierarchical

−  several dispatchers in a tree-based topology −  Example: Distributed Falkon

−  Fully distributed −  each computing node maintains its own job execution −  Example: Sparrow

§  Common issues −  Poor load balancing −  Poor system utilization

Page 6: CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

State-of-the-art job schedulers −  Centralized Master/Slaves architecture

−  Scalability issues at petascale and beyond −  Single point of failure −  Example: SLURM, CONDOR, Falkon

Page 7: CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

State-of-the-art job schedulers −  Centralized Master/Slaves architecture

−  Scalability issues at petascale and beyond −  Single point of failure −  Example: SLURM, CONDOR, Falkon

−  Distributed Architectures −  Hierarchical

−  several dispatchers in a tree-based topology −  Example: Distributed Falkon

−  Fully distributed −  each computing node maintains its own job execution −  Example: Sparrow

§  Common issues −  Poor load balancing −  Poor system utilization

Page 8: CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

State-of-the-art job schedulers

−  Distributed Architectures −  Hierarchical

−  several dispatchers in a tree-based topology −  Example: Distributed Falkon

−  Fully distributed −  each computing node maintains its own job execution −  Example: Sparrow

§  Common issues −  Poor load balancing −  Poor system utilization

Page 9: CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

Agenda Background Proposed Work §  CloudKon Architecture §  Task Consistency §  Dynamic Provisioning §  Communication Cost §  Implementation details

Performance Evaluation §  Throughput §  Latency §  Consistency effect on throughput and latency §  Efficiency §  Consistency effect on efficiency

Conclusion and Future work

Page 10: CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

Amazon Simple Queue Service (SQS) • Distributed message delivery queue

•  Highly scalable •  Messages sent and read simultaneously

•  Messages sent to multiple servers •  Reliable

•  Guarantees message delivery •  At least once delivery •  Multiple copies may be available and accessed

•  Secure •  Through authentication

Page 11: CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

Amazon Dynamo DB • No-SQL Key Value Store •  Fully distributed •  faster and more scalable than traditional DBs • Simple query support • Atomic operations support

•  Atomic read •  Atomic write

Page 12: CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

Agenda Intro and Motivation (5min) Background (2min) Proposed Work (6min) §  CloudKon Architecture §  Task Consistency §  Dynamic Provisioning 15s §  Monitoring15s §  Communication Cost 15s §  Implementation details

Performance Evaluation (5min) §  Throughput §  Consistency effect on throughput and latency §  Efficiency §  Consistency effect on efficiency

Conclusion and Future work (2min)

Page 13: CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

Proposed Work • Use SQS as a task delivery component • Decouple Clients and Workers • Pushing vs. Pulling approach

•  Pushing •  Local/global manager node needs to predict/decide

•  Randomness •  Get system information periodically from workers •  Needs to know about the address of worker nodes.

•  Pulling •  No need to know about workers •  Workers decide for themselves

•  Load balancing • System Utilization

Page 14: CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

CloudKon Architecture

Page 15: CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

Task consistency • SQS only guarantees at least once delivery •  some workloads require exactly once execution of tasks! • Use DynamoDB to verify • Use conditional write

Ø Write if the task does not exist Ø Throw exception if exists

•  Atomic operation

• Using a single operation, the checking is done •  Minimize the communication overhead

Page 16: CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

Dynamic Provisioning • Dynamically scale up and down the system • Scale up

•  Scale down •  If:

•  The worker goes idle (because of having no job to run!) •  The rent time is closer than threshold to the rent unit value of time

•  Then: •  Terminate the worker instance

•  Benefits: •  No component needs to keep track of workers

Use Provisioner component

Check request queue length (periodically)

Launch new worker if it’s getting larger

Page 17: CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

Monitoring • Monitor workers for:

•  System utilization •  Debug

• Monitor Thread •  Each worker thread has a monitor thread •  Reports system utilization periodically •  Able to report other details of each worker

• Monitoring System •  Reads the aggregate utilization results from store

Page 18: CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

Communication Cost • Communication overhead is high on Cloud

•  Need to minimize the communication

• Message batching •  Bundle tasks together to send

• Number of communications •  Minimum possible number

Page 19: CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

Implementation Details • Written in Java • Dependency

•  AWS Java SDK library •  Apache Commons library •  Google protocol buffer library

• Serialization •  Used Google Protocol Buffer

§  More efficient protocol than JSON

• Simple and short code base •  Only 1052 lines of code •  Delivers 2X performance with less than 5% code base length

CloudKon Sparrow Falkon Lines of code 1052 24500 33000

Page 20: CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

Agenda Background Proposed Work §  CloudKon Architecture §  Task Consistency §  Dynamic Provisioning §  Communication Cost §  Implementation details

Performance Evaluation §  Throughput §  Consistency effect on throughput §  Efficiency §  Consistency effect on efficiency

Conclusion and Future work

Page 21: CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

Throughput

•  1 to 64 instances •  16000 to 1024000 tasks •  5735 msgs/sec on the largest scale (64)

0

1000

2000

3000

4000

5000

6000

7000

0 10 20 30 40 50 60 70

Thro

ughp

ut (t

asks

/sec

)

# instances

CloudKon Sparrow Falkon

Page 22: CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

Latency

•  24.6 ms latency on 64 scale

•  Compared to 49.9 ms and 125.5 ms

0

20

40

60

80

100

120

140

0 10 20 30 40 50 60 70 # Instances

Latency (ms)

CloudKon Sparrow Falkon

Page 23: CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

Consistency effect on throughput

•  Duplicate task controller enabled/disabled •  30% overhead on average •  Overhead decreasing on larger scales

0.00% 5.00% 10.00% 15.00% 20.00% 25.00% 30.00% 35.00% 40.00% 45.00% 50.00% 55.00% 60.00% 65.00% 70.00% 75.00% 80.00% 85.00% 90.00% 95.00% 100.00%

0

1000

2000

3000

4000

5000

6000

7000

8000

9000

0 10 20 30 40 50 60 70

OVe

rhea

d

Thro

ughp

ut (t

asks

/sec

)

# Instances

with Duplicate Controller

no Duplicate Controller

de-duplication overhead

Page 24: CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

Consistency effect on latency

•  37% overhead on average

0

5

10

15

20

25

30

0 10 20 30 40 50 60 70 # Instances

Latency (ms)

with Duplicate Controller No Duplicate Controller

Page 25: CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

Efficiency

•  64 instances scale •  High efficiency on 1 sec tasks (91.26%) •  Moderate efficiency on tasks with 100s of ms length.

0.00%

10.00%

20.00%

30.00%

40.00%

50.00%

60.00%

70.00%

80.00%

90.00%

100.00%

1 4 16 64 256 1024

Effic

ienc

y

Task length (ms)

CloudKon Sparrow Falkon

Page 26: CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

Consistency effect on efficiency

•  Duplicate task controller enabled/disabled •  Overhead decreasing on larger scales

0.00%

10.00%

20.00%

30.00%

40.00%

50.00%

60.00%

70.00%

80.00%

90.00%

100.00%

1 4 16 64 256 1024

Effic

ienc

y

Task length (ms)

With duplicate controller no duplicate controller

Page 27: CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

Agenda Background Proposed Work §  CloudKon Architecture §  Task Consistency §  Dynamic Provisioning §  Communication Cost §  Implementation details

Performance Evaluation §  Throughput §  Latency §  Consistency effect on throughput and latency §  Efficiency §  Consistency effect on efficiency

Conclusion and Future work

Page 28: CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

Conclusion

• Design and implement simple yet effective distributed task execution framework •  Using cloud services like SQS, DynamoDB

• Run on Public Cloud environment as an alternate resource •  Optimum usage of cloud resources

• Outperforming other state of the art systems •  Sparrow 2013 •  Falkon 2007

•  High throughput and efficiency

Page 29: CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

Future work • On Cloud Environment

•  Extend the evaluation scale to 1024 instances •  Run real applications on CloudKon

•  Industrial benchmarks: TPC-H •  Data Analytics: MapReduce applications (Hadoop workloads)

•  Implement a SQS like service •  Using ZHT distributed hash table as a building block •  Make CloudKon infrastructure independent •  Test CloudKon on private clouds (e. g. OpenStack)

• On HPC environment •  Create a tightly coupled system using our own Distributed Queue

implementation •  Deliver lower latency

•  Evaluate the performance on HPC Clusters and super computers •  Run real applications

Page 30: CLOUDKON: A CLOUD ENABLED DISTRIBUTED TASK EXECUTION … › ~iraicu › teaching › CS554-S15 › lecture09-CloudKon.… · Intro and Motivation (5min) Background (2min) Proposed

Thank you • Questions?!