live migration of virtual machinesosnet.cs.nchu.edu.tw/powpoint/seminar/2008/lmvm.pdf · 2002. 5....
TRANSCRIPT
![Page 1: Live Migration of Virtual Machinesosnet.cs.nchu.edu.tw/powpoint/seminar/2008/LMVM.pdf · 2002. 5. 22. · 1 Live Migration of Virtual Machines Christopher Clark, Keir Fraser, Steven](https://reader035.vdocuments.site/reader035/viewer/2022071113/5fea5f3a8c43f45f137dcf71/html5/thumbnails/1.jpg)
1
Live Migration of Virtual Machines
Christopher Clark, Keir Fraser, Steven Hand, Jacob Gorm Hansen†, Eric Jul†, Christian Limpach, Ian Pratt, Andrew Warfield
University of Cambridge Computer LaboratoryDepartment of Computer Science University of Copenhagen, Denmark
Proceedings of the 2nd conference on Symposium on Networked Systems Design & Implementation(2005), USENIX Association
Presented by Yu-Han Li
![Page 2: Live Migration of Virtual Machinesosnet.cs.nchu.edu.tw/powpoint/seminar/2008/LMVM.pdf · 2002. 5. 22. · 1 Live Migration of Virtual Machines Christopher Clark, Keir Fraser, Steven](https://reader035.vdocuments.site/reader035/viewer/2022071113/5fea5f3a8c43f45f137dcf71/html5/thumbnails/2.jpg)
2
Outline
IntroductionDesign- Options- Overview- Writable Working Sets- Dynamic Rate-Limiting
EvaluationConclusion
![Page 3: Live Migration of Virtual Machinesosnet.cs.nchu.edu.tw/powpoint/seminar/2008/LMVM.pdf · 2002. 5. 22. · 1 Live Migration of Virtual Machines Christopher Clark, Keir Fraser, Steven](https://reader035.vdocuments.site/reader035/viewer/2022071113/5fea5f3a8c43f45f137dcf71/html5/thumbnails/3.jpg)
3
Introduction
• Migrating OS instances across distinct physical hosts is a useful tool for administrators of clusters
• O.S. virtualization allows many OS instances to run concurrently on a single physical machine
• Live OS migration– Migrating an entire OS and all of its applications as a unit
• Avoid residual dependencies
![Page 4: Live Migration of Virtual Machinesosnet.cs.nchu.edu.tw/powpoint/seminar/2008/LMVM.pdf · 2002. 5. 22. · 1 Live Migration of Virtual Machines Christopher Clark, Keir Fraser, Steven](https://reader035.vdocuments.site/reader035/viewer/2022071113/5fea5f3a8c43f45f137dcf71/html5/thumbnails/4.jpg)
4
Introduction
• Live OS migration (cont.)– In-memory state can be transferred in a consistent and
efficient fashion
• Implement migration support for Xen– A open source virtual machine monitor
• Interest– Downtime– Total migration time– Resource contention with the migrating OS
![Page 5: Live Migration of Virtual Machinesosnet.cs.nchu.edu.tw/powpoint/seminar/2008/LMVM.pdf · 2002. 5. 22. · 1 Live Migration of Virtual Machines Christopher Clark, Keir Fraser, Steven](https://reader035.vdocuments.site/reader035/viewer/2022071113/5fea5f3a8c43f45f137dcf71/html5/thumbnails/5.jpg)
5
Design
• Options – Migrating Memory– Push phase
• Source VM continues running while pages are pushed to new destination
• Pages modified must be re-sent
– Stop and copy phase• Source VM is stopped• Pages are copied to destination VM• The new VM is started
![Page 6: Live Migration of Virtual Machinesosnet.cs.nchu.edu.tw/powpoint/seminar/2008/LMVM.pdf · 2002. 5. 22. · 1 Live Migration of Virtual Machines Christopher Clark, Keir Fraser, Steven](https://reader035.vdocuments.site/reader035/viewer/2022071113/5fea5f3a8c43f45f137dcf71/html5/thumbnails/6.jpg)
6
Design
• Options – Migrating Memory (cont.)– Pull phase
• The new VM executed.• If it accesses a page that has not yet been copied, the
page is pulled across the network from source VM
– Pre-copy migration• A bounded iteration push phase with
– Pages to be transferred during round n – Pages to be transferred are modified during round ( n-1 )
![Page 7: Live Migration of Virtual Machinesosnet.cs.nchu.edu.tw/powpoint/seminar/2008/LMVM.pdf · 2002. 5. 22. · 1 Live Migration of Virtual Machines Christopher Clark, Keir Fraser, Steven](https://reader035.vdocuments.site/reader035/viewer/2022071113/5fea5f3a8c43f45f137dcf71/html5/thumbnails/7.jpg)
7
Design
– Pre-copy migration (cont.)• A very short stop-and-copy phase
– Some pages update very frequently which are poor candidates for pre-copy
• Options – Network resources– A migrating VM will carry its IP address
( include protocol state)– Generate an unsolicited ARP reply from the
migrated host
![Page 8: Live Migration of Virtual Machinesosnet.cs.nchu.edu.tw/powpoint/seminar/2008/LMVM.pdf · 2002. 5. 22. · 1 Live Migration of Virtual Machines Christopher Clark, Keir Fraser, Steven](https://reader035.vdocuments.site/reader035/viewer/2022071113/5fea5f3a8c43f45f137dcf71/html5/thumbnails/8.jpg)
8
Design• Overview
![Page 9: Live Migration of Virtual Machinesosnet.cs.nchu.edu.tw/powpoint/seminar/2008/LMVM.pdf · 2002. 5. 22. · 1 Live Migration of Virtual Machines Christopher Clark, Keir Fraser, Steven](https://reader035.vdocuments.site/reader035/viewer/2022071113/5fea5f3a8c43f45f137dcf71/html5/thumbnails/9.jpg)
9
Design
• Writable Working Sets (WWS)– Q: how to determine when it’s time to stop the
pre-copy phase because too much time is wasted?S: dirty pages faster than the rate of copying
• Should immediately stop and copy
– A certain set of pages will seldom be modified and are good candidate for pre-copy
– The remainder pages will be transferred via stop-and-copy ( WWS )
![Page 10: Live Migration of Virtual Machinesosnet.cs.nchu.edu.tw/powpoint/seminar/2008/LMVM.pdf · 2002. 5. 22. · 1 Live Migration of Virtual Machines Christopher Clark, Keir Fraser, Steven](https://reader035.vdocuments.site/reader035/viewer/2022071113/5fea5f3a8c43f45f137dcf71/html5/thumbnails/10.jpg)
10
Design
– Xen’s shadow page table• Track dirtying statistics on all pages used by a
particular executing OS• Determine within any time period the set of
pages written by VM– Observe the WWS under a processor
• VM has a memory allocation of 512MB• One VM started benchmark• Another VM read dirty bitmap
![Page 11: Live Migration of Virtual Machinesosnet.cs.nchu.edu.tw/powpoint/seminar/2008/LMVM.pdf · 2002. 5. 22. · 1 Live Migration of Virtual Machines Christopher Clark, Keir Fraser, Steven](https://reader035.vdocuments.site/reader035/viewer/2022071113/5fea5f3a8c43f45f137dcf71/html5/thumbnails/11.jpg)
11
Design
• Estimating Migration Effectiveness– Trace data acquired to estimate the effectiveness
of iteration pre-copy– Know the approximate WWS behavior
• Estimate overall amount of data transferred in the final stop and copy and estimate the downtime
– For a 512MB VM using native stop-and-copy• 32, 8 (sec) downtime for 128, 512 (Mbit/sec)
![Page 12: Live Migration of Virtual Machinesosnet.cs.nchu.edu.tw/powpoint/seminar/2008/LMVM.pdf · 2002. 5. 22. · 1 Live Migration of Virtual Machines Christopher Clark, Keir Fraser, Steven](https://reader035.vdocuments.site/reader035/viewer/2022071113/5fea5f3a8c43f45f137dcf71/html5/thumbnails/12.jpg)
12
Design• Expected downtime due to last-round memory copy on traced page
![Page 13: Live Migration of Virtual Machinesosnet.cs.nchu.edu.tw/powpoint/seminar/2008/LMVM.pdf · 2002. 5. 22. · 1 Live Migration of Virtual Machines Christopher Clark, Keir Fraser, Steven](https://reader035.vdocuments.site/reader035/viewer/2022071113/5fea5f3a8c43f45f137dcf71/html5/thumbnails/13.jpg)
13
Design
• Managed Migration– Migration demons– It performs rounds of copying
• Perform a complete scan of the VM’s memory pages.• In Subsequent round, copy the pages dirtied during previous
round by dirty bitmap– Bitmap is cleared– Shadow page tables are destroyed and recreated
– When pre-copy phase is no longer beneficial• OS suspend itself in a state suitable for migration• Demon scanned for remaining inconsistent pages with VM’s
checkpointed CPU-register state
![Page 14: Live Migration of Virtual Machinesosnet.cs.nchu.edu.tw/powpoint/seminar/2008/LMVM.pdf · 2002. 5. 22. · 1 Live Migration of Virtual Machines Christopher Clark, Keir Fraser, Steven](https://reader035.vdocuments.site/reader035/viewer/2022071113/5fea5f3a8c43f45f137dcf71/html5/thumbnails/14.jpg)
14
Design
• Dynamic Rate-Limiting– It is not appropriate to select network bandwidth limit for
migration traffic– Dynamically adapt the bandwidth limit during each pre-
copying round• Select a minimum and a maximum bandwidth limit• The 1st round:
– transfer at the minimum bandwidth• Each subsequent round: Bandwidth limit
– previous round’s dirtying rate + Constant– Dirty rate = #pages dirtied in previous / duration of the previous
– The final stop-and-copy phase• Minimize service downtime
![Page 15: Live Migration of Virtual Machinesosnet.cs.nchu.edu.tw/powpoint/seminar/2008/LMVM.pdf · 2002. 5. 22. · 1 Live Migration of Virtual Machines Christopher Clark, Keir Fraser, Steven](https://reader035.vdocuments.site/reader035/viewer/2022071113/5fea5f3a8c43f45f137dcf71/html5/thumbnails/15.jpg)
15
Evaluation
• Test Setup– 2 Dell PE-2650 server-class machines– Dual Xeon 2GHz CPUs– 2GB Memory– Broadcom TG3 network interface– Gigabit Ethernet switch– XenLinux 2.4.27 OS
![Page 16: Live Migration of Virtual Machinesosnet.cs.nchu.edu.tw/powpoint/seminar/2008/LMVM.pdf · 2002. 5. 22. · 1 Live Migration of Virtual Machines Christopher Clark, Keir Fraser, Steven](https://reader035.vdocuments.site/reader035/viewer/2022071113/5fea5f3a8c43f45f137dcf71/html5/thumbnails/16.jpg)
16
Evaluation
• Simple Web Server
![Page 17: Live Migration of Virtual Machinesosnet.cs.nchu.edu.tw/powpoint/seminar/2008/LMVM.pdf · 2002. 5. 22. · 1 Live Migration of Virtual Machines Christopher Clark, Keir Fraser, Steven](https://reader035.vdocuments.site/reader035/viewer/2022071113/5fea5f3a8c43f45f137dcf71/html5/thumbnails/17.jpg)
17
Evaluation
• Complex Web Workload (SPECweb)
![Page 18: Live Migration of Virtual Machinesosnet.cs.nchu.edu.tw/powpoint/seminar/2008/LMVM.pdf · 2002. 5. 22. · 1 Live Migration of Virtual Machines Christopher Clark, Keir Fraser, Steven](https://reader035.vdocuments.site/reader035/viewer/2022071113/5fea5f3a8c43f45f137dcf71/html5/thumbnails/18.jpg)
18
Evaluation
• Low latency server (Quake 3)
![Page 19: Live Migration of Virtual Machinesosnet.cs.nchu.edu.tw/powpoint/seminar/2008/LMVM.pdf · 2002. 5. 22. · 1 Live Migration of Virtual Machines Christopher Clark, Keir Fraser, Steven](https://reader035.vdocuments.site/reader035/viewer/2022071113/5fea5f3a8c43f45f137dcf71/html5/thumbnails/19.jpg)
19
Conclusion
• Integrating live OS migration into the Xen VMM– Enables rapid movement of interactive workloads
• Dynamic network bandwidth adaption – Minimal impact on running services
• Realistic server workloads (SPECweb99)– Migrated with just 210ms downtime