张俊 1080379124 [email protected] 2011.1 1. btlab embedded virtualization group outline ...

24
张张 1080379124 [email protected] 2011.1 1

Upload: dorcas-jennings

Post on 12-Jan-2016

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 张俊 1080379124 tragicjun@gmail.com 2011.1 1. BTLab Embedded Virtualization Group Outline  Introduction  Performance Analysis  PerformanceTuning Methods

张俊 1080379124

[email protected]

2011.1

1

Page 2: 张俊 1080379124 tragicjun@gmail.com 2011.1 1. BTLab Embedded Virtualization Group Outline  Introduction  Performance Analysis  PerformanceTuning Methods

BTLab Embedded Virtualization Group

Outline Introduction Performance Analysis PerformanceTuning Methods Experimental Results Conclusion

2

Page 3: 张俊 1080379124 tragicjun@gmail.com 2011.1 1. BTLab Embedded Virtualization Group Outline  Introduction  Performance Analysis  PerformanceTuning Methods

BTLab Embedded Virtualization Group

Outline Introduction Performance Analysis PerformanceTuning Methods Experimental Results Conclusion

3

Page 4: 张俊 1080379124 tragicjun@gmail.com 2011.1 1. BTLab Embedded Virtualization Group Outline  Introduction  Performance Analysis  PerformanceTuning Methods

BTLab Embedded Virtualization Group

Virtualization in General A host(VMM, Virtual Machine Monitor)

manages the hardware resources Multiplexing or Partitioning

Virtualization Flavors Full virtualization Paravirtualization

Virtualization Application Server Desktop Embedded System

OS

App App

Hardware

Guest OS

App App

Guest OS

App App

Host(VMM)

Hardware

4

Page 5: 张俊 1080379124 tragicjun@gmail.com 2011.1 1. BTLab Embedded Virtualization Group Outline  Introduction  Performance Analysis  PerformanceTuning Methods

BTLab Embedded Virtualization Group

Motivation

5

RTOS is primitive, simple executives Task scheduling Interrupt Handling

RT applications now require TCP/IP&GUI File system&Database Multi-core support

Classic solutions Add these non-RT services to the basic RT kernel Add RT extension to the general-purpose kernel

Task scheduling Kernel preemptivity

Page 6: 张俊 1080379124 tragicjun@gmail.com 2011.1 1. BTLab Embedded Virtualization Group Outline  Introduction  Performance Analysis  PerformanceTuning Methods

BTLab Embedded Virtualization Group

System Consolidation Multi-core enablement for legacy embedded

uni-processor applications

6

Page 7: 张俊 1080379124 tragicjun@gmail.com 2011.1 1. BTLab Embedded Virtualization Group Outline  Introduction  Performance Analysis  PerformanceTuning Methods

BTLab Embedded Virtualization Group

Another Solution Deploy separate RTOS and GPOS on single

embedded platform RTOS: real-time tasks GPOS: non-real-time services

Meet increasing RT application requirements while enjoying all the benefits of embedded virtualization Add RT extension to the VMM VM scheduling VMM kernel preemptivity

7

Page 8: 张俊 1080379124 tragicjun@gmail.com 2011.1 1. BTLab Embedded Virtualization Group Outline  Introduction  Performance Analysis  PerformanceTuning Methods

BTLab Embedded Virtualization Group

Embedded Real-Time Architecture

8

Multi-core CPU with virtualization extension KVM as the hypervisor Linux as the GPOS VxWorks as the RTOS

Page 9: 张俊 1080379124 tragicjun@gmail.com 2011.1 1. BTLab Embedded Virtualization Group Outline  Introduction  Performance Analysis  PerformanceTuning Methods

BTLab Embedded Virtualization Group

Outline Introduction Performance Analysis PerformanceTuning Methods Experimental Results Conclusion

9

Page 10: 张俊 1080379124 tragicjun@gmail.com 2011.1 1. BTLab Embedded Virtualization Group Outline  Introduction  Performance Analysis  PerformanceTuning Methods

BTLab Embedded Virtualization Group

PDLT: Process Dispatch Latency Time Between an interrupt occurs and the first

command of a process that has been awakened by the interrupt service routine

longest antency

are on the order of tens up to hundreds of milliseconds

10

swctxschedulinglatencynellatencyISRIRT tttttPDLT ker

Page 11: 张俊 1080379124 tragicjun@gmail.com 2011.1 1. BTLab Embedded Virtualization Group Outline  Introduction  Performance Analysis  PerformanceTuning Methods

BTLab Embedded Virtualization Group

Six stages associated with the delivery of the interrupt to the guest OS

System load causing additional latency Computational loads Interrupt loads

Virtualization-Caused Latency

11

Page 12: 张俊 1080379124 tragicjun@gmail.com 2011.1 1. BTLab Embedded Virtualization Group Outline  Introduction  Performance Analysis  PerformanceTuning Methods

BTLab Embedded Virtualization Group

Outline Introduction Performance Analysis PerformanceTuning Methods Experimental Results Conclusion

12

Page 13: 张俊 1080379124 tragicjun@gmail.com 2011.1 1. BTLab Embedded Virtualization Group Outline  Introduction  Performance Analysis  PerformanceTuning Methods

BTLab Embedded Virtualization Group

PrioritizationA straightforward approach to improving guest

responsiveness over QEMU/KVM is to raise the priorities of QEMU’s threads and lift them into a real-time scheduling class

ApproachesShell command: chrt System Call: sched_setscheduler()

13

Page 14: 张俊 1080379124 tragicjun@gmail.com 2011.1 1. BTLab Embedded Virtualization Group Outline  Introduction  Performance Analysis  PerformanceTuning Methods

BTLab Embedded Virtualization Group

Dedicated Core Reserve one dedicated core for real-time guest a

symmetric multi-processor (SMP) system, preventing the real-time guest from being adversely affected by harmful workloads.

ApproachesProcess pinning

System call: sched_setaffinity() Tools: taskset/cpuset

Interrupt pinning File interface: /proc/irq/<irq_number>/smp_affinity

14

Page 15: 张俊 1080379124 tragicjun@gmail.com 2011.1 1. BTLab Embedded Virtualization Group Outline  Introduction  Performance Analysis  PerformanceTuning Methods

BTLab Embedded Virtualization Group

Outline Introduction Performance Analysis PerformanceTuning Methods Experimental Results Conclusion

15

Page 16: 张俊 1080379124 tragicjun@gmail.com 2011.1 1. BTLab Embedded Virtualization Group Outline  Introduction  Performance Analysis  PerformanceTuning Methods

BTLab Embedded Virtualization Group

Experimental Results (VxWorks)Interrupt Response Time (IRT)

16

Page 17: 张俊 1080379124 tragicjun@gmail.com 2011.1 1. BTLab Embedded Virtualization Group Outline  Introduction  Performance Analysis  PerformanceTuning Methods

BTLab Embedded Virtualization Group

Experimental Results (Linux)Process Dispatch Latency Time (PDLT)

17

Page 18: 张俊 1080379124 tragicjun@gmail.com 2011.1 1. BTLab Embedded Virtualization Group Outline  Introduction  Performance Analysis  PerformanceTuning Methods

BTLab Embedded Virtualization Group

Outline Introduction Performance Analysis PerformanceTuning Methods Experimental Results Conclusion

18

Page 19: 张俊 1080379124 tragicjun@gmail.com 2011.1 1. BTLab Embedded Virtualization Group Outline  Introduction  Performance Analysis  PerformanceTuning Methods

BTLab Embedded Virtualization Group

Conclusions Virtualization software layer combined with

various system loads do cause certain additional response latencies.

Real-time performance tunings methods under the host Linux can reduce the response latencies of the real-time guest to some degree.

With careful setup and tuning, sub-millisecond response time can be guaranteed on the KVM guest.

19

Page 20: 张俊 1080379124 tragicjun@gmail.com 2011.1 1. BTLab Embedded Virtualization Group Outline  Introduction  Performance Analysis  PerformanceTuning Methods

BTLab Embedded Virtualization Group

Contributions Propose an KVM-based embedded real-time

virtualization architecture, which combines Linux and VxWorks together, as the guest GPOS and guest RTOS respectively.

Analyze how KVM combined other system loads introduces additional latencies to the guest interrupt response time

Evaluate the interrupt response time the KVM guest is able to achieve and the effectiveness of various performance tuning methods.

20

Page 21: 张俊 1080379124 tragicjun@gmail.com 2011.1 1. BTLab Embedded Virtualization Group Outline  Introduction  Performance Analysis  PerformanceTuning Methods

BTLab Embedded Virtualization Group

End

Thank you!Q&A

21

Page 22: 张俊 1080379124 tragicjun@gmail.com 2011.1 1. BTLab Embedded Virtualization Group Outline  Introduction  Performance Analysis  PerformanceTuning Methods

BTLab Embedded Virtualization Group

Backup

VMM VM scheduling

Page 23: 张俊 1080379124 tragicjun@gmail.com 2011.1 1. BTLab Embedded Virtualization Group Outline  Introduction  Performance Analysis  PerformanceTuning Methods

BTLab Embedded Virtualization Group

Backup

Page 24: 张俊 1080379124 tragicjun@gmail.com 2011.1 1. BTLab Embedded Virtualization Group Outline  Introduction  Performance Analysis  PerformanceTuning Methods

BTLab Embedded Virtualization Group