SlideShare a Scribd company logo
1 of 8
P.Haul: live migration using CRIUP.Haul: live migration using CRIU
Pavel Emelyanov
Containers MC, Linux Plumbers, Seattle, 2015
Not-so-live migration using CRIUNot-so-live migration using CRIU
• src_host# criu dump -t 123 -D images/
• src_host# scp -r images/ user@dst_host:images/
• dst_host# criu restore -D images/ -d
2
Almost live migration using CRIUAlmost live migration using CRIU
• dst_host# criu page-server -D images/
• src_host# criu pre-dump -t 123 -D images/pre/
--page-server --address dst_host --port port
--track-mem
• src_host# criu dump -t 123 -D images/dump/ --prev-images ../pre/
• src_host# scp -r images/dump/ user@dst_host:images/
• dst_host# criu restore -D images/ -d
3
Live migration using CRIULive migration using CRIU
• Perform nodes compatibility checks
– CPUs
– Kernel modules
– Available resources
• Do pre-dumps in a loop
– Or post-copy memory transfer (userfaultfd)
• Copy FS if not shared
• Don't forget container config
4
Live migration using P.HaulLive migration using P.Haul
• dst_host# p.haul-service --port 123
• src_host# p.haul ovz 100 dst_host:123
5
Where P.Haul currently isWhere P.Haul currently is
• Written in python
• Lives at github.com/xemul/p.haul
• Knows how to live-migration OpenVZ container
• Calls rsync for chroot()-ed container on local FS
6
Future of P.Haul?Future of P.Haul?
• Migrate LXC & Docker containers
• Smarter iterations
– Better estimate of memory xfer
– Synchronize memory and disk/FS xfer
• Shared disk/FS auto-detection
• Post-copy live migration
• Send images over the wire (CRIU)
7
Thank youThank you

More Related Content

More from OpenVZ

Containers in a file
Containers in a fileContainers in a file
Containers in a file
OpenVZ
 
Optimizing FUSE for Cloud Storage
Optimizing FUSE for Cloud StorageOptimizing FUSE for Cloud Storage
Optimizing FUSE for Cloud Storage
OpenVZ
 
An overview of OpenVZ virtualization technology
An overview of OpenVZ virtualization technologyAn overview of OpenVZ virtualization technology
An overview of OpenVZ virtualization technology
OpenVZ
 
Resource management: beancounters
Resource management: beancountersResource management: beancounters
Resource management: beancounters
OpenVZ
 

More from OpenVZ (20)

Живая миграция: плюсы, минусы и подводные камни - Павел Емельянов
Живая миграция: плюсы, минусы и подводные камни - Павел ЕмельяновЖивая миграция: плюсы, минусы и подводные камни - Павел Емельянов
Живая миграция: плюсы, минусы и подводные камни - Павел Емельянов
 
What's missing from upstream kernel containers? - Sergey Bronnikov
What's missing from upstream kernel containers? - Sergey BronnikovWhat's missing from upstream kernel containers? - Sergey Bronnikov
What's missing from upstream kernel containers? - Sergey Bronnikov
 
Проблема фрагментации виртуальных дисков и способы её решения -- Дмитрий Монахов
Проблема фрагментации виртуальных дисков и способы её решения -- Дмитрий МонаховПроблема фрагментации виртуальных дисков и способы её решения -- Дмитрий Монахов
Проблема фрагментации виртуальных дисков и способы её решения -- Дмитрий Монахов
 
Развёртывание приложений Docker в контейнерах Virtuozzo -- Павел Тихомиров
Развёртывание приложений Docker в контейнерах Virtuozzo -- Павел ТихомировРазвёртывание приложений Docker в контейнерах Virtuozzo -- Павел Тихомиров
Развёртывание приложений Docker в контейнерах Virtuozzo -- Павел Тихомиров
 
CRIU: ускорение запуска PHP в CloudLinux OS -- Руслан Купреев
CRIU: ускорение запуска PHP в CloudLinux OS  -- Руслан КупреевCRIU: ускорение запуска PHP в CloudLinux OS  -- Руслан Купреев
CRIU: ускорение запуска PHP в CloudLinux OS -- Руслан Купреев
 
LibCT и контейнеры на уровне приложений -- Александр Бурлука
	LibCT и контейнеры на уровне приложений -- Александр Бурлука	LibCT и контейнеры на уровне приложений -- Александр Бурлука
LibCT и контейнеры на уровне приложений -- Александр Бурлука
 
Управление памятью контейнеров в проекте OpenVZ -- Владимир Давыдов
Управление памятью контейнеров в проекте OpenVZ -- Владимир ДавыдовУправление памятью контейнеров в проекте OpenVZ -- Владимир Давыдов
Управление памятью контейнеров в проекте OpenVZ -- Владимир Давыдов
 
Живая миграция контейнеров: плюсы, минусы, подводные камни -- Павел Емельянов
Живая миграция контейнеров: плюсы, минусы, подводные камни -- Павел ЕмельяновЖивая миграция контейнеров: плюсы, минусы, подводные камни -- Павел Емельянов
Живая миграция контейнеров: плюсы, минусы, подводные камни -- Павел Емельянов
 
LibCT: one lib to rule them all -- Andrey Vagin
LibCT: one lib to rule them all -- Andrey VaginLibCT: one lib to rule them all -- Andrey Vagin
LibCT: one lib to rule them all -- Andrey Vagin
 
Denser containers with PF cache - Pavel Emelyanov
Denser containers with PF cache - Pavel EmelyanovDenser containers with PF cache - Pavel Emelyanov
Denser containers with PF cache - Pavel Emelyanov
 
CGroups kernel memory controller -- Pavel Emelyanov
CGroups kernel memory controller -- Pavel EmelyanovCGroups kernel memory controller -- Pavel Emelyanov
CGroups kernel memory controller -- Pavel Emelyanov
 
What's missing from upstream kernel containers? - Kir Kolyshkin, Sergey Bronn...
What's missing from upstream kernel containers? - Kir Kolyshkin, Sergey Bronn...What's missing from upstream kernel containers? - Kir Kolyshkin, Sergey Bronn...
What's missing from upstream kernel containers? - Kir Kolyshkin, Sergey Bronn...
 
Not so brief history of Linux Containers - Kir Kolyshkin
Not so brief history of Linux Containers - Kir KolyshkinNot so brief history of Linux Containers - Kir Kolyshkin
Not so brief history of Linux Containers - Kir Kolyshkin
 
Openvz booth
Openvz boothOpenvz booth
Openvz booth
 
Управление ресурсами в Linux и OpenVZ
Управление ресурсами в Linux и OpenVZ Управление ресурсами в Linux и OpenVZ
Управление ресурсами в Linux и OpenVZ
 
Containers in a file
Containers in a fileContainers in a file
Containers in a file
 
Optimizing FUSE for Cloud Storage
Optimizing FUSE for Cloud StorageOptimizing FUSE for Cloud Storage
Optimizing FUSE for Cloud Storage
 
Мифы и легенды о проекте OpenVZ
Мифы и легенды о проекте OpenVZМифы и легенды о проекте OpenVZ
Мифы и легенды о проекте OpenVZ
 
An overview of OpenVZ virtualization technology
An overview of OpenVZ virtualization technologyAn overview of OpenVZ virtualization technology
An overview of OpenVZ virtualization technology
 
Resource management: beancounters
Resource management: beancountersResource management: beancounters
Resource management: beancounters
 

Recently uploaded

JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)
Max Lee
 

Recently uploaded (20)

10 Essential Software Testing Tools You Need to Know About.pdf
10 Essential Software Testing Tools You Need to Know About.pdf10 Essential Software Testing Tools You Need to Know About.pdf
10 Essential Software Testing Tools You Need to Know About.pdf
 
APVP,apvp apvp High quality supplier safe spot transport, 98% purity
APVP,apvp apvp High quality supplier safe spot transport, 98% purityAPVP,apvp apvp High quality supplier safe spot transport, 98% purity
APVP,apvp apvp High quality supplier safe spot transport, 98% purity
 
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdfStrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
 
Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024
 
Microsoft 365 Copilot; An AI tool changing the world of work _PDF.pdf
Microsoft 365 Copilot; An AI tool changing the world of work _PDF.pdfMicrosoft 365 Copilot; An AI tool changing the world of work _PDF.pdf
Microsoft 365 Copilot; An AI tool changing the world of work _PDF.pdf
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
 
how-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdfhow-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdf
 
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
 
A Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data MigrationA Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data Migration
 
Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024
 
IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024
 
How to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabberHow to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabber
 
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
 
JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)
 
AI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in Michelangelo
 
5 Reasons Driving Warehouse Management Systems Demand
5 Reasons Driving Warehouse Management Systems Demand5 Reasons Driving Warehouse Management Systems Demand
5 Reasons Driving Warehouse Management Systems Demand
 
SQL Injection Introduction and Prevention
SQL Injection Introduction and PreventionSQL Injection Introduction and Prevention
SQL Injection Introduction and Prevention
 
The Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion ProductionThe Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion Production
 
Workforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdfWorkforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdf
 
KLARNA - Language Models and Knowledge Graphs: A Systems Approach
KLARNA -  Language Models and Knowledge Graphs: A Systems ApproachKLARNA -  Language Models and Knowledge Graphs: A Systems Approach
KLARNA - Language Models and Knowledge Graphs: A Systems Approach
 

P.Haul: live migration using CRIU - Pavel Emelyanov

  • 1. P.Haul: live migration using CRIUP.Haul: live migration using CRIU Pavel Emelyanov Containers MC, Linux Plumbers, Seattle, 2015
  • 2. Not-so-live migration using CRIUNot-so-live migration using CRIU • src_host# criu dump -t 123 -D images/ • src_host# scp -r images/ user@dst_host:images/ • dst_host# criu restore -D images/ -d 2
  • 3. Almost live migration using CRIUAlmost live migration using CRIU • dst_host# criu page-server -D images/ • src_host# criu pre-dump -t 123 -D images/pre/ --page-server --address dst_host --port port --track-mem • src_host# criu dump -t 123 -D images/dump/ --prev-images ../pre/ • src_host# scp -r images/dump/ user@dst_host:images/ • dst_host# criu restore -D images/ -d 3
  • 4. Live migration using CRIULive migration using CRIU • Perform nodes compatibility checks – CPUs – Kernel modules – Available resources • Do pre-dumps in a loop – Or post-copy memory transfer (userfaultfd) • Copy FS if not shared • Don't forget container config 4
  • 5. Live migration using P.HaulLive migration using P.Haul • dst_host# p.haul-service --port 123 • src_host# p.haul ovz 100 dst_host:123 5
  • 6. Where P.Haul currently isWhere P.Haul currently is • Written in python • Lives at github.com/xemul/p.haul • Knows how to live-migration OpenVZ container • Calls rsync for chroot()-ed container on local FS 6
  • 7. Future of P.Haul?Future of P.Haul? • Migrate LXC & Docker containers • Smarter iterations – Better estimate of memory xfer – Synchronize memory and disk/FS xfer • Shared disk/FS auto-detection • Post-copy live migration • Send images over the wire (CRIU) 7

Editor's Notes

  1. To install a font: Open Fonts by clicking the Start button , clicking Control Panel, clicking Appearance and Personalization, and then clicking Fonts. Click File, and then click Install New Font. ... In the Add Fonts dialog box, under Drives, click the drive where the font that you want to install is located. http://windows.microsoft.com/en-us/windows-vista/install-or-uninstall-fonts <number>
  2. To install a font: Open Fonts by clicking the Start button , clicking Control Panel, clicking Appearance and Personalization, and then clicking Fonts. Click File, and then click Install New Font. ... In the Add Fonts dialog box, under Drives, click the drive where the font that you want to install is located. http://windows.microsoft.com/en-us/windows-vista/install-or-uninstall-fonts <number>
  3. To install a font: Open Fonts by clicking the Start button , clicking Control Panel, clicking Appearance and Personalization, and then clicking Fonts. Click File, and then click Install New Font. ... In the Add Fonts dialog box, under Drives, click the drive where the font that you want to install is located. http://windows.microsoft.com/en-us/windows-vista/install-or-uninstall-fonts <number>
  4. To install a font: Open Fonts by clicking the Start button , clicking Control Panel, clicking Appearance and Personalization, and then clicking Fonts. Click File, and then click Install New Font. ... In the Add Fonts dialog box, under Drives, click the drive where the font that you want to install is located. http://windows.microsoft.com/en-us/windows-vista/install-or-uninstall-fonts <number>
  5. To install a font: Open Fonts by clicking the Start button , clicking Control Panel, clicking Appearance and Personalization, and then clicking Fonts. Click File, and then click Install New Font. ... In the Add Fonts dialog box, under Drives, click the drive where the font that you want to install is located. http://windows.microsoft.com/en-us/windows-vista/install-or-uninstall-fonts <number>
  6. To install a font: Open Fonts by clicking the Start button , clicking Control Panel, clicking Appearance and Personalization, and then clicking Fonts. Click File, and then click Install New Font. ... In the Add Fonts dialog box, under Drives, click the drive where the font that you want to install is located. http://windows.microsoft.com/en-us/windows-vista/install-or-uninstall-fonts <number>