chinav: experiences on virtualization technology · • as the technology base of cloud computing,...
TRANSCRIPT
®
ChinaV: Experiences on Virtualization Technology
Hai Jin,
Huazhong University of Science and Technology
®What is ChinaV
• Research on Fundamental Theory and
Approach of Computing System
Virtualization, supported by National 973
Basic Research Program of China under
grant No.2007CB310900
• Started from 2007 to 2011 with total budget
RMB 26M
http://grid.hust.edu.cn/973http://grid.hust.edu.cn/973
®Visions
• Virtualized Resources Environment
– Combine or divide resources: good granularity and
transparence
• Virtualized Tasks Environment
– Build task executing environment on-demand: high
utilization and efficiency
• Virtualized User Environment
– Desktop virtualization: high convenience, good user
experiences
http://grid.hust.edu.cn/973http://grid.hust.edu.cn/973
®Missions
• Theoretical model and architecture of the virtualized computing system
• Single-dimensional system resource virtualization
• Multi-dimensional system resource virtualization
• Pervasive computing environment of virtualized system
• Security and trusted scheme of the virtualized computing system
• Theory and approach of evaluating virtualized computing system
• High performance based virtualization technology
• Application of virtualized simulation system
http://grid.hust.edu.cn/973http://grid.hust.edu.cn/973
®Outline
• Introduction of ChinaV Project
• Experiences on Virtualization
Technology
– Live Migration
– Power Management
– Memory Virtualization
– Desktop Virtualization
• Conclusions
®Outline
• Introduction of ChinaV Project
• Experiences on Virtualization Technology
– Live Migration
– Power Management
– Memory Virtualization
– Desktop Virtualization
• Conclusions
®
CR/TR-Motion: A Novel VM Migration Approach
• Revirt is adopted
• Checkpointing/recovery with trace/replay
technology are used to provide fast and
transparent live VM migration
• We orchestrate the running source and target
VM with execution trace logged on the source
host
H. Liu, H. Jin, X. Liao, L. Hu, and C. Yu, “Live Migration of Virtual Machine Based on Full System Trace and Replay”, Proceedings of the 18th International Symposium on High Performance Distributed Computing (HPDC'09), ACM Press, June 11-13, 2009, Munich, Germany, pp.101-110
®CR/TR-Motion: Migration Process
AB
Checkpoint
log2
……
Replay log1
……
Round 1
log1
Round 2
VM Recovery
Checkpoint
log3
Round n
Stop and copyTransfer log n
Replay log n
Take over A
Waiting and chasing phase
……
®CR/TR-Motion: Migration Downtime
• Our approach reduced migration downtime by 72.4% in average compared to
pre-copy approach
0
50
100
150
200
250
300
Daily use Kernel-build Static web app
Dynamic web app
UnixBench
Downtime(ms)
CR/TR-Motion
Pre-copy
0
10
20
30
40
50
60
70
80
90
100
Daily use Kernel-build Static web
app
Dynamic
web app
UnixBench
Total migration time (s)
CR/TR-Motion
Pre-copy
• Our approach reduces the total migration
time by 31.5% in average compared to
Pre-copy
®
CR/TR-Motion: Total Data Transferred
• CR/TR-Motion reduces
synchronization traffic
by 95.9% in average
• This improvement
brings great benefit
when our migration
scheme is applied in
low-bandwidth WANs
daily use 0.48 (0.04) 38.54 (2.1) 98.8%
kernel-build 0.53 (0.06) 152.44 (8.2) 99.6%
static web app 8.34 (0.21) 228.99 (9.4) 96.4%
dynamic web app 36.4 (0.96) 288.05 (12.2) 87.4%
unixbench 2.59 (0.22) 113.38 (6.4) 97.7%
0
100
200
300
400
500
600
700
800
900
Daily use Kernel-build Static web
app
Dynamic
web app
UnixBench
Total Data Transferred (MB) CR/TR-Motion
Pre-copy
®Outline
• Introduction of ChinaV Project
• Experiences on Virtualization Technology
– Live Migration
– Power Management
– Memory Virtualization
– Desktop Virtualization
• Conclusions
®Power Management - Motivation
• Reduce power consumption with little performance penalty
• User requirement is various– Server – Average power consumption should fit the budget
– Desktop – User experience should be kept
– Laptop – Prolong battery lifetime
• Virtualization brings challenges– Guest OS is blind to the hardware features
– VMM lacks the device PM ability – it has no device drivers
®Design of ClientVisor
• Focus on desktop virtualization
– VMs are asymmetric
– Hardware power features can be exposed to VM
• Dom0 – Domain 0, the control domain
• SOS – Service OS, background domain for
special tasks. e.g., network packet filtering
• COS – Capability OS, primary domain
interacted with users
H. Chen, H. Jin, Z. Shao, K. Yu, and K. Tian, “ClientVisor: Leverage COTS OS Functionalities for Power Management in Virtualized Desktop Environment”, Proceedings of the 2009 ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments (VEE’09), ACM Press, March 11-13, 2009, Washington, DC, USA, pp.130-141.
®
Design of ClientVisor
Physical Platform
Xen VMM
Domain0(control domain)
SOS
COS (primary user domain)A: Px operation
B: Cx operation
C: Dx operation
D: Cx operation after coordination
E: Dx operation after coordinationCPUDevices
VADevice Driver
Coordination Logic
Device Driver OSPM
A
DE
B
FrontendDriver
BackendDriver
C
CC
®Design of ClientVisor
• Basic instruments – What guest OS does?
– Processor PM instruments – working state PM
(P-state scaling) & idle state PM (C-state
transition)
– Device PM instruments – D-state transition
• Interception policies – What VMM does?
– Passing-through – for P-state operation
– Coordination – for C-state & D-state operation
®
ClientVisor
• Preliminary of passing-through –
Exposing hardware power features
– ACPI tables
– CPUID
– Device hierarchy
Root
Bridge Endpoint Bridge
Endpoint Endpoint Endpoint Endpoint
®Performance Evaluation
• Static power consumption
– Leave the whole system in idle
10.91
16.71
15.36
13.34 13.01
0
2
4
6
8
10
12
14
16
18
Native Xen CV/Orig CV/Cx_opt CV/Cx_Timer_opt
Power (W)
• Dynamic power
consumption
– SPECpower_ssj2008 is
used as workload
23.50
28.4326.85 26.27 26.21
0.00
5.00
10.00
15.00
20.00
25.00
30.00
Native Xen CV/Orig CV/Cx_opt CV/Cx_Timer_opt
(a) Overall
Power (W)
0
5,000
10,000
15,000
20,000
25,000
30,000
35,000
40,000
100% 90% 80% 70% 60% 50% 40% 30% 20% 10% 0%
Load Level
Performance (ssj_ops)
10
15
20
25
30
35
40
Power (W)
Native Xen CV/Orig CV/Cx_opt
CV/Cx_Timer_opt Native Xen CV/Orig
CV/Cx_opt CV/Cx_Timer_opt
Balance of power and
performance
Cx mapping optimization – Change Cx operation
of port I/O way to MWAIT way
Timer optimization – Disable some timer
handlers when CPU resides in Cx
®Outline
• Introduction of ChinaV Project
• Experiences on Virtualization Technology
– Live Migration
– Power Management
–Memory Virtualization
– Desktop Virtualization
• Conclusions
®
Dynamic Memory Balancing for Virtual Machines
• Motivation
– Allocating appropriate machine memory to a VM is hard
• Memory requirement varies during running
• OS only reports the amount of used/free memory
• The amount of actively used memory is more important
– If we know the relationship between memory allocation size and
performance gain/loss
• Idle or inactive memory can be reclaimed without notable performance
loss
• Better memory resource utilization
– Ballooning
• The amount to increase/decrease is typically specified manually
®
Dynamic Memory Balancing for Virtual Machines
• Dynamic memory balancing
– LRU-based predictor
– Memory growth prediction
– Automatic memory resizing
VM1
Mon
LRU Hist. LRU Hist.
VM2
Mon
balancer
estimator
Controller
VMM
Data store
inflate/deflate
WSS
W. Zhao and Z. Wang, “Dynamic Memory Balancing for Virtual Machines”, Proceedings of the 2009 ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments (VEE’09), ACM Press, March 11-13, 2009, Washington, DC, USA, pp.21-30.
®
Dynamic Memory Balancing for Virtual Machines
• Estimation Accuracy (within Xen)
– VM is allocated with 214MB
Monotonic (40 ~ 170 MB) Random (40 ~ 170 MB)
®Outline
• Introduction of ChinaV Project
• Experiences on Virtualization Technology
– Live Migration
– Power Management
– Memory Virtualization
– Desktop Virtualization
• Conclusions
®Challenge of Desktop Virtualization
• User experience
– Fast, convenient, mobility
• Security
– Safeguard user private data
• Stability
– Reliability of the virtual desktop environment
• Serviceability
– Efficient use of CPU and memory resources
X. Liao, H. Jin, L. Hu, and H. Liu, “Towards Virtualized Desktop Environment”, Concurrency and Computation: Practice and Experience, John Wiley & Sons, Ltd (accepted)
®
Xen
server
Xen
server
……
AP
P S
erv
er
VCM
Thin
Client
PDA
Data Server
Internet
Domain 0 Domain U
Xen
Virtualized
PC
System Architecture of Virtual Desktop
®
Save & Restore (Checkpointing)
• Multi-VM collaborative save & restore
– Recoverable long-running desktop applications
– User environment mobility
– High availability
• Multi-host checkpointing
– Checkpoint synchronization (Lamport clocks)
– Transparent rolling checkpoints (Copy-on-write)
– Memory image saving optimization
®Virtual Appliance
• USB devices and
printers on the
client can be
accessed by the
remote
application on a
local network or
the Internet
App Server
client
remote desktop delivering
Plug in
mount
Network
access
USB device
®
VM Life Cycle Management
• Role-based life cycle monitor
scheme
• VM suspending management
• VM process priority policy
• VM template life cycle
management
• VM checkpoint life cycle
management
®Conclusions
• As the technology base of cloud computing, virtualization technology provide– Support new architectures, devices
– High Utilization of IT facilities
– High Manageability
– Highly secure and isolate guaranteed environment
– Maintain good user experiences
• Challenges still exist in virtualization technology– Scheduling
– Live Migration
– Power Management
– Memory/IO Virtualization
– Desktop Virtualization
– ……