Presentation is loading. Please wait.

Presentation is loading. Please wait.

Our work on virtualization Chen Haogang, Wang Xiaolin {hchen, Institute of Network and Information Systems School of Electrical Engineering.

Similar presentations


Presentation on theme: "Our work on virtualization Chen Haogang, Wang Xiaolin {hchen, Institute of Network and Information Systems School of Electrical Engineering."— Presentation transcript:

1 Our work on virtualization Chen Haogang, Wang Xiaolin {hchen, wxl}@pku.edu.cn Institute of Network and Information Systems School of Electrical Engineering and Computer Science Peking University 2008.11

2 http://ncis.pku.edu.cn Agenda  Work at PKU Remote paging for VM Transparent paravirtualization Virtual resource sharing Cache management in Multi-Core and Virtualization environment

3 http://ncis.pku.edu.cn REMOCA: Hypervisor Remote Disk Cache  Motivation To improve paging performance for memory- intensive or I/O-intensive workloads by utilizing free memory resource on another physical machine  Solution The remote memory plays the role of a storage cache between a VM’s virtual memory and its virtual disk devices.  In most cases, the network latency is much lower than the disk latency (1~2 magnitude)

4 REMOCA: The design of REMOCA Local Module: a ghost buffer REMOCA is an exclusive cache Remote Module: the memory service http://ncis.pku.edu.cn

5 Summary of REMOCA  REMOCA can efficiently alleviate the impact of thrashing behavior, and also significantly improve the performance for real-world I/O intensive applications.  Future work Cluster-wide memory balancing Predicting miss ratio before allocating http://ncis.pku.edu.cn Remote cache size: 768MB

6 http://ncis.pku.edu.cn 主要内容  Work at PKU Remote paging for VM Transparent paravirtualization Virtual resource sharing Cache management in Multi-Core and Virtualization environment

7 http://ncis.pku.edu.cn Transparent paravirtualization  Some limitation of current hardware-assistant virtualization Too many VM exits incur significant overhead. Most VM exits are related to page fault or I/O operation KVMXen (HVM) Page faultI/O Total Page faultI/O Total count % % % % Kernel Compile 745919983.367684338.5989482351121939581.2312472079.0313812089 SpecJBB3292862.99656047259.57110124663525204.22500052959.898350197 SpecCPU3421580018.6910246877155.9818304163711379325950.415621582824.90225727994 SpecWeb566882215.501492135140.79365845891183540831.461242808633.0437618375 Reason and count of VM exits

8 Top 10 trap instructions with high VM exits frequency in KVM-54 Kernel CompileSpecJBB SpecCPUSpecWeb 126.21% (pf)32.48% (io) 12.54% (pf)7.65% (io) 226.07% (pf)32.47% (io) 9.02% (io)7.46% (io) 33.71% (pf)32.47% (io) 8.47% (io)7.46% (io) 42.44% (rd cr)0.31% (io) 8.17% (ot)7.46% (io) 52.44% (rd cr)0.31% (pf) 8.01% (io)6.08% (rd cr) 62.16% (pf)0.31% (ot) 7.44% (io)5.77% (io) 71.91% (pf)0.31% (io) 7.44% (io)5.71% (ot) 81.14% (pf)0.31% (io) 7.44% (io)5.67% (hlt) 90.99% (io)0.31% (io) 4.54% (io)5.53% (clts) 100.99% (io)0.18% (ot) 2.07% (ot)5.50% (rd cr) Total68.06%99.46% 75.14%64.30% http://ncis.pku.edu.cn (io: I/O operation, pf: page fault, rd cr: read control registers, clts and hlt: x86 instructions, ot: others)

9 http://ncis.pku.edu.cn Hot Instructions detection and translation  How to reduce VM exits Paravirtualization  Xen and KVM apply paravirtualization to improve performance.  The needs to change the source code damages its applicability. Transparent paravirtualization  Detecting Hot Instructions  An efficient mechanism to catch 97% with top 64 instructions  Replacing Hot Instructions  New or even complex assistant mechanisms should be introduced into VMM to make the replacement safe and possible  Implanting Replaced Instructions to Guest OS  Adaptive code implantation

10 Implementation in KVM http://ncis.pku.edu.cn

11 Transparent Memory Paravirtualization  A New Memory Virtualization Mechanism Transfers the guest OS page table to map guest virtual addresses directly to host physical addresses. The transferred guest page table, called direct page table, is directly registered with the hardware MMU. A process using direct page table is called as a para-virtualized process.  To provide the guest OS an independent view of its own physical address space as used for guest OS memory management.  When the guest OS accesses the direct page table, it expects guest physical addresses rather than host physical addresses as currently presented in the direct page table. http://ncis.pku.edu.cn

12 Transparent Memory Paravirtualization http://ncis.pku.edu.cn The Direct page table structure of A New Memory Virtualization Mechanism

13 http://ncis.pku.edu.cn Evaluation

14 http://ncis.pku.edu.cn Evaluation

15 http://ncis.pku.edu.cn  Future work TMP Evaluation  Impact on cache hits  Compares with: EPT/NPT , Shadow Page Table  Compares with: KVM Para-MMU , Xen Para-MMU Transparent MMU Extension  Linux  Windows  Emulate all Guest OS page faults TMP  Transparent Para-IO Other hot instructions  Limitation of Transparent Paravirtualization Security vs. performance Transparent Paravirtualization

16 http://ncis.pku.edu.cn Agenda  Work at PKU Remote paging for VM Transparent paravirtualization Virtual resource sharing Cache management in Multi-Core and Virtualization environment

17 http://ncis.pku.edu.cn Virtual resource sharing  Motivation In a homogeneous environment, how to achieve high-degree of resource sharing while preserving isolation?  Example: Network classroom @ PKU Zhongzhi Teaching Windows, MS Office or VC++ programming About 30 students per class Homogeneous OS, software, data and application instances

18 Virtual resource sharing  Limitations of current solutions Terminal server: bad isolation  Preferred to run a single OS per student VM live clone: cannot provide data persistency Content-based sharing: high scanning overhead Difference Engine (OSDI ’08): unable to share during OS startup or application startup  Goal Fast startup of VMs and applications Accurate resource sharing Low management overhead

19 Virtual resource sharing  Solution: a bottom-up approach Starts from disk sharing  Map identical disk blocks to a single storage location  Manage a shared disk cache within the VMM  Replace disk reads with page remapping Fast application startup Challenges  How to discover identical disk blocks? CoW disk / CAS  How to handle sharable application data, especially the “zero pages”?

20 Agenda  Work at PKU Remote paging for VM Transparent para-virtualization Virtual resource sharing Cache management in Multi-Core and Virtualization environment http://ncis.pku.edu.cn

21  Motivation  Current VMM cannot make efficient use of the cache hierarchy in a multi-core platform  Objectives Explore new compiling and profiling techniques to analyze and predict memory access behavior of a program Implement the cache-aware memory allocation and CPU scheduling in the VMM Dynamic memory balancing among VMs Cache management in Multi-Core

22 http://ncis.pku.edu.cn  Lower-level cache partitioning  Avoid cache contention for concurrent VMs  Using page-coloring technique  Restricting the number of cache sets that a VM can use  Transparent to the guest OS Cache management in Multi-Core

23 http://ncis.pku.edu.cn  Challenges  Predicting the performance impact to the application before partitioning  Online profiling and dynamic re-partitioning  Reducing page migration overhead  Cooperating with VM scheduling, especially CPU allocation and migration  New micro-architectures  Example: Intel Nehalem 256 KB dedicated L2 per core and shared L3 Cache management in Multi-Core

24 Thanks ! Q&A Discussion


Download ppt "Our work on virtualization Chen Haogang, Wang Xiaolin {hchen, Institute of Network and Information Systems School of Electrical Engineering."

Similar presentations


Ads by Google