• No results found

Resource Efficient Stream Processing Platform with Latency-Aware Scheduling Algorithms

N/A
N/A
Protected

Academic year: 2021

Share "Resource Efficient Stream Processing Platform with Latency-Aware Scheduling Algorithms"

Copied!
13
0
0

Loading.... (view fulltext now)

Full text

(1)

Resource Efficient Stream Processing Platform with

Latency-Aware Scheduling Algorithms

Yuta Morisawa,

Masaki Suzuki, Takeshi Kitahara

KDDI Research, Inc.

(2)

Background

◼ Stream processing has become a major region

⚫ By 2025, nearly 30 percent of the data will be real-time [1]

⚫ One organization will have many stream applications for their business

◼ Resource Inefficiency of the traditional big data stream processing

⚫ Users must allocate resources according to traffic peak

⚫ Once users creates a cluster, the total amount of resources (e.g., CPU cores) cannot be modified

0 50 100

CPU

Timeline of the CPU usage. Gray area shows unused CPU resources.

[1] David Reinsel – John Gantz – John Rydning, "The Digitization of the World From Edge to Core", Nov. 2018,

Goal: Improvement of resource efficiency in an environment where multiple applications with different latency

(3)

Challenges

Improving resource efficiency of the stream platform is difficult because

◼ Different latency requirements

⚫ Stream applications have various latency SLAs that must be observed

◼ Unexpected traffic patterns

⚫ Input data rate often varies suddenly

⚫ Sometimes, users must allocate extra resources to cope with it

◼ Optimization for multi-applications environment

⚫ Improving the resource efficiency of every cluster is needed to minimize the platform cost ⚫ Prior studies did not address the problem

(4)

Proposal: Multi-application platform

◼ Accommodate multiple applications in one Spark cluster

⚫ This design enables finest granularity resource management ⚫ Resource reallocation can be completed with lower latency

◼ Latency-aware task scheduler

⚫ Determine the priority of each application to observe applications' latency SLAs

App App App App

Infra App App App App

(5)

Proposal: Architecture Overview

◼ Scheduling pools

⚫ Applications are assigned to dedicated scheduling pools ⚫ Scheduled in the task level granularity

◼ Executors

⚫ Just runs assigned tasks (do not care what applications are)

◼ API

⚫ Fully compatible with Apache Spark

Spark Driver

Scheduling Pools Allocating A1 B1 C1 A2 B2 C2 … … … Task scheduler TaskSet

Executor

Executor

Executor

A1 B1 A2 C1

Executor

B2 C2

(6)

Proposal: Latency-aware task scheduler

◼ Scheduler designs

⚫ White box: Estimating the necessary resources

• Difficult to apply to stream applications because data rate varies in time ⚫ Black box: Using only metrics (we chose this design)

• Monitor the latency and manipulate resource allocation

◼ How Black box design works

⚫ Utilized existing Spark task-level scheduler 1, resourceOffer is issued when an Executor

has available resources

2, Task scheduler calculates priorities of the each task in each application

3, The scheduler allocates resources according to the priorities

Spark Driver

Scheduling Pools A1 B1 C1 A2 B2 C2 … … … Task scheduler

Executor

Executor

Executor

Executor

(1) send resourceOffer (2) determine priority (3) Allocate resources

(7)

Proposal: Latency-aware task scheduler

P

s

Priority of Job

s

T

c

Current Time

T

s

Submission time of Job

s

L

s

Latency SLA of Job

s

◼ Implemented 3 algorithms

⚫ Earliest Deadline First (EDF), Priority based EDF, Process time Estimation ⚫ Goal: Determine the priority of the tasks of each application to observe SLAs

◼ EDF

1, Scheduler calculates 𝑃𝑠 for each Job of each application • 𝑃𝑠 = 𝑇𝑐 − 𝑇𝑠 − 𝐿𝑠

• Equal to the negation of the remaining time • Larger value has higher priority

2, Find the biggest 𝑃𝑠 in each pool as the representative value

3, Resources are allocated in order of the pool with the largest representative value

• A resource allocation unit is TaskSet, which is a group of tasks and is a component of the Job

Submission

Deadline

T

s

T

c

T

s

+ L

s

Remaining Time

Current Time

Job

TaskSet

TaskSet

Task

(8)

Proposal: Latency-aware task scheduler

P

s

Priority of Job

s

T

c

Current Time

T

s

Submission time of Job

s

L

s

Latency SLA of Job

s

◼ Priority based EDF (PT)

⚫ Added potential priority 𝑝𝑠 of the application 𝑠

• e.g., anomaly detection may have higher priority than aggregation for visualization

• The equation is modified as follows • 𝑃𝑠 = 𝑇𝑐− 𝑇𝑠

𝐿𝑠 𝑝𝑠

◼ Processing time estimation (EST)

⚫ Added estimated job execution time 𝐹 𝐼 𝑠, 𝑇𝑠

F()

is an estimation function, and 𝐼 𝑠, 𝑇𝑠 is the input data rate

• In this paper,

F()

is defined through the measurement of the actual latency • The equation is modified as follows

• 𝑃𝑠 = 𝑇𝑐− 𝑇𝑠+𝐹 𝐼 𝑠,𝑇𝑠 𝐿𝑠 𝑝𝑠

Submission

Deadline

T

s

T

c

T

s

+ L

s

Remaining Time

Current Time

(9)

Evaluation

◼ Testbed Environment

⚫ 5 servers Hadoop cluster with YARN (Specifications are shown in the table) ⚫ Kafka as the data source and sink

◼ Applications

⚫ 3 types of connected car applications (Parsing, Searching, and Windowing) ⚫ 3 copies of each type application (total 9 applications)

◼ Comparison with

⚫ Compared EDF ⚫ Priority based EDF

⚫ Process time estimation (EST)

⚫ Default Spark (run applications separately)

CPU Xeon E5-2620v4 (8Core) x 2 Memory 128 GB DDR4

Storage 15 TB of HDD, 128 GB of SSD Network 10 Gb

(10)

Evaluation

Required minimum number of CPU cores to

fulfil applications‘ SLAs

Same performance with 64%

(25/39) CPU cores

0 5 10 15 20 25 30

Parsing Searching Windowing all

Separating Proposal 0 0.5 1 1.5 2 2.5 3 3.5

Separating EDF FAIR FIFO EST PT

CPU T ime per cor e (10 11 ns )

CPU time per core during experiment

(11)

Evaluation

0 0.5 1 1.5 2 2.5

mean max mean max mean max

Parsing Searching Windowing

No rma lize d Lat ency

EDF FAIR FIFO EST PT

The latency normalized by the latency of the

default Spark

Achieved smaller latency

1 10 100 1000 10000 100000 1000000

EDF FIFO PT EST FAIR

R

eco

rds

(103)

The number of records violated latency SLAs

when the platform was overloaded

(12)

Conclusion

◼ Summary

⚫ Goal: resource efficient stream processing

⚫ Accommodating multiple applications

• Scheduling in the same cluster enables quick reallocation and fine-grained control

⚫ Latency-aware schedulers

• Task-level granularity schedulers

◼ Future Work

⚫ Tradeoff between resource efficiency and isolation

⚫ Consideration on other resources (e.g., memory)

(13)

References

Related documents

In this section, we also show that the dynamics of the wealth-consumption ratio are prin- cipally governed by the elasticity of intertemporal substitution (EIS) and the risk premia

lining). but it's pricey so that's why I didn't).. 3) Sew along the lines you just marked. Backstitch where the lines cross each other. 4) Now would be a good time to sew the Velcro

Verify the Avaya IR VoIP channels (IP stations) assigned to the Processor Ethernet of Site 4 LSP S8500 Media Server are “in-service”. Place a call using the Hunt Group Number

Once the executor is removed, there will still have to be a passing of the executor’s accounts, and you will have to deal with her claim for remuneration. The newly appointed

Inventory Assets and Liabilities Probate Manage Estate Tax Returns Final Distribution Family Conference.. Discuss the different duties and liabilities of the executor and estate

Furthermore, it is widely reported that medical tourists from particular source countries seek care abroad based on singular motivations found in their home context, such as the

The financial statements for the company issued by the Executive Board in accordance with the German Commercial Code (HGB) and the consolidated financial

• Social media and/or email replaces traditional channels like post mail..