Real-Time Cloud Computing Chenyang Lu Cyber-Physical Systems - - PowerPoint PPT Presentation

real time cloud computing
SMART_READER_LITE
LIVE PREVIEW

Real-Time Cloud Computing Chenyang Lu Cyber-Physical Systems - - PowerPoint PPT Presentation

Real-Time Cloud Computing Chenyang Lu Cyber-Physical Systems Laboratory http://www.cse.wustl.edu/~lu/ Internet of Things Convergence of Miniaturized hardware: integrate processor, sensors and radios. Low-power wireless: connect millions


slide-1
SLIDE 1

Real-Time Cloud Computing

Chenyang Lu

Cyber-Physical Systems Laboratory http://www.cse.wustl.edu/~lu/

slide-2
SLIDE 2

Internet of Things

Convergence of Ø Miniaturized hardware: integrate processor, sensors and radios. Ø Low-power wireless: connect millions of devices to the Internet. Ø Data analytics: make sense of sensor data. Ø Cloud: scalable computing.

  • R. Dor, G. Hackmann, Z. Yang, C. Lu, Y. Chen, M.

Kollef and T.C. Bailey, Experiences with an End-To- End Wireless Clinical Monitoring System, Conference

  • n Wireless Health (WH'12), October 2012.
slide-3
SLIDE 3

Internet of Things

Convergence of Ø Miniaturized hardware: integrate processor, sensors and radios. Ø Low-power wireless: connect millions of devices to the Internet. Ø Data analytics: make sense of sensor data. Ø Cloud: scalable computing.

  • R. Dor, G. Hackmann, Z. Yang, C. Lu, Y. Chen, M.

Kollef and T.C. Bailey, Experiences with an End-To- End Wireless Clinical Monitoring System, Conference

  • n Wireless Health (WH'12), October 2012.
slide-4
SLIDE 4

Real-Time Cloud for CPS

Ø Large-scale IoT

  • driven control

q Smart manufacturing, transportation, infrastructure… q Closed-loop control à real-time performance q Computing at scale à cloud

Ø Real-time cloud: enabling technology for large CPS!

slide-5
SLIDE 5

Smart City

Ø Manage assets intelligently through large-scale IoT

  • driven control

Ø Example: Intelligent Transportation

q Collect data from roadside sensors and cameras q Centralized data analysis q Control city-wise traffic signals intelligently q SCATS @ Sydney [1]: controlling 3,400 signals at 1s latency

Ø Many concurrent connections Ø Require low latency communication

11/7/19 5 [1] http://en.wikipedia.org/wiki/Traffic_light_control_and_coordination

slide-6
SLIDE 6

Smart Civil Infrastructure

6

Cyber-Physical Boundary

WU/Purdue project in Real-Time Hybrid Simulation

  • Enabled by real-time parallel computing
  • Expand to larger-scale, multi-specimen experiments (bridge spanning a

river, different ground motions on each end)

  • Towards cloud-based multi-site experiments
slide-7
SLIDE 7

Industrial Internet of Things (IIoT)

Ø Differentiated real-time and reliability requirements

q Latency q Delivery guarantees q Event time consistency

11/7/19 7

at-least-once best-effort milliseconds

e.g., Emergency response e.g., Real-time monitoring

hours

e.g., Predictive maintenance

slide-8
SLIDE 8

Embedded System Virtualization

Ø Consolidate 100 ECUs à ~10 multicore processors. Ø Integrate multiple systems on a common platform.

q Infotainment on Linux or Android q Safety-critical control on AUTOSAR

Ø Preserve real-time performance on a virtualized platform!

11/7/19 8 Source: http://www.edn.com/design/automotive/4399434/Multicore-and-virtualization-in-automotive-environments

slide-9
SLIDE 9

Ø Virtualization platforms provide no guarantee on latency

q Xen: credit scheduler, [credit, cap] q VMware ESXi: [reservation, share, limitation] q Microsoft Hyper-V: [reserve, weight, limit]

Ø Clouds lack service level agreement on latency

q Amazon, Google, Microsoft cloud services: #VCPUs

9

Cloud is real-time today

Current clouds provision resources, not latency!

slide-10
SLIDE 10

Real-Time Cloud

Ø Support real-time applications in the cloud.

q Latency guarantees for tasks running in virtual machines (VMs). q Real-time performance isolation between

VMs.

q Resource sharing between real-time and non-real-time

VMs.

Ø Real-time cloud stack.

q RT

  • Xen à real-time

VM scheduling

q VATC à real-time network I/O on a virtualized host. q RT

  • OpenStack à real-time cloud resource management.

10

VATC: RT Network I/O RT

  • OpenStack

Latency guarantees

Cyber-Physical Event Processing RT Cilk Plus

slide-11
SLIDE 11

Xen

Ø Xen: type-1, baremetal hypervisor

q Domain-0: drivers, tool stack to control

VMs.

q Guest Domain: para-virtualized or fully virtualized OS.

Ø Scheduling hierarchy

q Xen schedules

VCPUs on PCPUs.

q Guest OS schedules threads on

VCPUs.

q Xen credit scheduler: round-robin with proportional share.

11

PCPUs

OS Sched

Xen Scheduler

OS Sched OS Sched

VCPU Real-Time Task

slide-12
SLIDE 12

RT-Xen

Ø Real-time schedulers in the Xen hypervisor. Ø Provide real-time guarantees to tasks in VMs. Ø Incorporated in Xen 4.5 as the real-time scheduler.

12

RT-Xen

https://sites.google.com/site/realtimexen/

  • S. Xi, M. Xu, C. Lu, L. Phan, C. Gill, O. Sokolsky and I. Lee, Real-Time Multi-Core Virtual Machine

Scheduling in Xen, ACM International Conference on Embedded Software (EMSOFT'14), October 2014.

slide-13
SLIDE 13

Compositional Scheduling

Ø Analytical real-time guarantees to tasks running in VMs. Ø VM resource interfaces

q A set of

VCPUs each with resource demand <period, budget >

q Hides task-specific information q Computed based on compositional scheduling analysis

13

Resource Interface Resource Interface Resource Interface

Hypervisor Virtual Machines

Workload Workload

Scheduler Scheduler Scheduler

slide-14
SLIDE 14

Real-Time Scheduler Design

Ø Global scheduling

q Allow

VCPU migration across cores

q Work conserving – utilize any available cores q Migration overhead and cache penalty

Ø Partitioned scheduling

q Assign and bind

VCPUs to cores

q Cores may idle when others have work pending q No migration overhead or cache penalty

Ø Enforce resource interface through budget management

q Periodic server vs. deferrable server

Ø Priority: Earliest Deadline First vs. Deadline Monotonic

14

slide-15
SLIDE 15

4 8 12 16 t t

Task Schedule

Budget 3 4 8 12 16

VCPU Schedule Budget = 3 Period = 4

VCPU Scheduled as a Deferrable Server

15

[1] Xi, Sisu, et al. "Real-time multi-core virtual machine scheduling in xen." 2014 International Conference on Embedded Software (EMSOFT). IEEE, 2014. [2] Kim, Hyoseung, Shige Wang, and Ragunathan Rajkumar. "vMPCP: A synchronization framework for multi-core virtual machines." 2014 IEEE Real-Time Systems Symposium. IEEE, 2014

4 8 12 16 t t

Task Schedule

Budget 3 4 8 12 16

VCPU Schedule Budget = 3 Period = 4 (0,4)

4 8 12 16 t t

Task Schedule

Budget 3 4 8 12 16

VCPU Schedule Budget = 3 Period = 4 (0,4)

4 8 12 16 t t

Task Schedule

Budget 3 4 8 12 16

VCPU Schedule Budget = 3 Period = 4 (0,4) (7,4) (13,4)

... ...

Ø A Deferrable Server has two parameters <budget, period>

q Budget replenishes at the start of each period q The server consumes budget when executing jobs q When the budget exhausted, the server stops executing jobs

slide-16
SLIDE 16

RT-Xen vs. Xen

16

  • Xen misses deadlines at 22% of CPU capacity.
  • RT
  • Xen delivers real-time performance at 78% of CPU capacity.
slide-17
SLIDE 17

Virtualized Network I/O

Ø Xen handles all network traffic through Dom0 Ø Real-time and non-real-time traffic share Dom0

q CPU and network contention

Ø Long delays for real-time traffic in virtualized hosts

Xen Hypervisor

Network

Components

Non Real-Time App

Dom2

CPU Memory Storage

Real-Time App

Dom1 Dom0

NIC

17

slide-18
SLIDE 18

Network I/O in Virtualized Hosts

Ø Linux Queueing Discipline

q Rate-limit and shape flows q Prioritization or fair packet scheduling

Ø Priority inversion in virtualization components

q between transmissions q between transmission and reception

Ø VATC: Virtualization-Aware Traffic Control

q Process packets in prioritized kernel threads q Dedicated packet queues per priority

NIC

Queueing Discipline

Dom0

Real- Time App

Dom1

Non- Real- Time App

Dom2

Virtualization Components

18

  • C. Li, S. Xi, C. Lu, C. Gill and R. Guerin, Prioritizing Soft Real-Time Network Traffic in

Virtualized Hosts Based on Xen, IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS'15), April 2015.

slide-19
SLIDE 19

Real-Time Traffic Latency

VATC reduces priority inversion à lower latency for real-time traffic.

19 10 16 32 64 128 256 512 1024 Dyn Cons Dyn 0.5 1 1.5 2 2.5 3 3.5 4 Round−trip Latency ( ms) Interrupt Interval (µs) Prio, Dom0−3.18 FQ_CoDel, Dom0−3.18 VATC

  • Median round-trip latency of real-time traffic.
  • CPU contention from two small-packet interfering streams.
slide-20
SLIDE 20

Virtualized Host à Cloud

Ø Provide real-time performance to real-time VMs Ø Achieve high resource utilization

20

slide-21
SLIDE 21

OpenStack Limitations

Ø Popular open-source cloud management system Ø VM resource interface

q Number of

VCPUs

q Not real-time

Ø VM-to-host mapping

q Filtering (admission control)

  • VCPU-to-PCPU ratio (16:1), max

VMs per host (50)

  • Coarse-grained admission control for CPU resources

q Ranking (VM allocation)

  • Balance memory usage
  • No consideration of CPU resources

21

Manager

Host Host Host VM VM VM VM VM

slide-22
SLIDE 22

RT-OpenStack

Ø Co-hosting real-time VMs with non-real-time VMs Ø Deliver real-time performance

q Support RT

  • Xen resource interface

q Real-time-aware

VM-to-host mapping

Ø Achieve high resource utilization

q Co-locate non-real-time

VMs with real-time VMs

q Non-real-time

VMs consume remaining resources without affecting the real-time performance of real-time VMs

22

  • S. Xi, C. Li, C. Lu, C. Gill, M. Xu, L. Phan, I. Lee, O. Sokolsky, RT-OpenStack: CPU Resource Management for Real-

Time Cloud Computing, IEEE International Conference on Cloud Computing (CLOUD'15), June 2015.

slide-23
SLIDE 23

RT-OpenStack: VM-to-Host Mapping

Ø Admission control: RT

  • Filter

q Accept real-time

VMs based on schedulability and memory

q Consider only accepted real-time

VMs

Ø VM allocation: RT

  • Weigher

q Balance CPU utilization q Consider only accepted real-time

VMs

23

Resource Interface Admission Control VM Allocation Real-Time VMs {<period, budget>} Schedulability + Memory CPU Utilization Non-Real-Time VMs Best Effort Memory Memory

slide-24
SLIDE 24

OpenStack

24

13% 36% 31% 61% 37% 75% 30% 29% 47% 32% 73%

Hadoop finish time: 314 seconds

Ø Overload four hosts with real-time VMs à deadline misses. Ø Two hosts running non-real-time VMs only. Ø Unbalanced distribution of real-time domains.

slide-25
SLIDE 25

RT-OpenStack

25

0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0%

Hadoop finish time: 435 seconds

Ø Schedulability guarantees for real-time VMs à no deadline miss. Ø Distribute real-time VMs across hosts. Ø Hadoop makes progress using remaining CPU resources.

slide-26
SLIDE 26

Real-Time Edge and Cloud

Ø Support real-time applications in the cloud.

q Latency guarantees. q Real-time performance isolation. q Resource sharing between real-time and non-real-time workloads.

Ø Real-time cloud stack.

q RT

  • Xen à real-time virtual machine scheduling (included in Xen)

q VATC à real-time network I/O on a virtualized host. q RT

  • OpenStack à real-time cloud resource management.

26

VATC: RT Network I/O RT

  • OpenStack

Latency guarantees

Cyber-Physical Event Processing RT Cilk Plus

slide-27
SLIDE 27

Real-Time Edge and Cloud

Ø Support real-time applications in the cloud.

q Latency guarantees. q Real-time performance isolation. q Resource sharing between real-time and non-real-time workloads.

Ø Real-time cloud stack.

q RT

  • Xen à real-time virtual machine scheduling (included in Xen)

q VATC à real-time network I/O on a virtualized host. q RT

  • OpenStack à real-time cloud resource management.

27

VATC: RT Network I/O RT

  • OpenStack

Latency guarantees

Cyber-Physical Event Processing RT Cilk Plus

How to orchestrate edge and cloud for dependable control?

slide-28
SLIDE 28

End-to-End Real-Time for IoT

Ø Miniaturized hardware à real-time embedded systems Ø Low-power wireless à real-time wireless Ø Data analytics à real-time analytics Ø Cloud à real-time service chains from edge to cloud

28

Large-Scale IoT-driven Control

à Smart Manufacturing, City, Grid…