SlideShare a Scribd company logo
CRIU:
Time and Space Travel Service
for Linux Applications
Kir Kolyshkin
Texas Linux Fest, 14 Jun 2014
2
Agenda
What is CRIU?
Project history and state
Usage scenarios

Live migration

Reboot-less kernel upgrade

Slow services startup

Advanced debugging and testing

and more...
3
What is CRIU?
Checkpoint Restore In Userspace
Checkpoint
or
Dump
Restore
or
Restart
Full
info
about
state
4
CRIU pre-history
●
OpenVZ project
●
Containers live migration feature
●
Containers → Upstream Linux
●
1500+ kernel patches from us
●
Kernel-level checkpoint-restore merge failed
●
User-level checkpoint-restore ...
5
Why in userspace?
Kernel
User-space
Dump:
- ptrace
- /proc
- netlink
- syscalls
Restore:
- syscalls
Process
kmod
C/R API
6
Some history
Project started almost 3 years ago
– an RFC on kernel memory API extension
– small command line tool
– minimal dump of process' internals
First release
– v0.1 -- 23 Jul 2012 (x86 and basic stuff)
Since then
– Kernel part completed a year ago (150+ kernel patches:
new APIs for reading and setting process' state)
7
Current project state
The latest release
– v1.3rc1
– supports x86_64 & ARM & AARM64
– support features that typical apps use
– works on unmodified linux-3.11+
– Included into Debian, Fedora, Ubuntu, Arch, SUSE, Gentoo, CoreOS...
Explicitly checked
– Apache, nginx, Oracle*, mysql, mongodb
– ssh/sshd, openvpn, cron, sendmail
– Java, gcc, make
– VNC + { gimp, mplayer, blender, supertux }
– Screen + { bash, top, tcpdump, tar/bz2 }
* some kernel tweaks required
8
Some vitals
- 55K lines of code
- 150+ kernel patches
- contribs from Google, Huawei, Samsung, Canonical
9
Usage scenarios
●
Live migration
●
incl. Docker, LXC, OpenVZ containers
●
Kernel upgrade w/o reboot
●
Slow services startup
●
Periodic snapshots (HPC)
●
Advanced debugging and testing
10
Live migration
Host A Host B
11
Live migration
Host A Host B
Shared FS
Pre-migrate memory
with memory tracker
http://criu.org/P.Haul
12
Load balancing on cluster
Host A
Host C
Host B
13
Power saving on cluster
Host A
Host C
Host B
14
Node maintenance
Host A Host B
15
Kernel upgrade w/o reboot
Host
Kernel A
Kexec
Kernel B
16
Slow services startup
time# service foo start
Service readiness
Spawn process
Load config
Top-up caches
Initialize resource pools
Ready
T
100%
17
Slow services startup
time
Tt < T
Ready
Spawn process
100%
Service readiness
# service foo restore
18
Periodic snapshots
time
Memory tracker helps
to keep images smaller
19
HPC
time
Power
failure
0% 20% 40% 60% 60%
20
Advanced debugging
Production Host
Application
in trouble
Developer Host
Debugger
21
Advanced testing
...
New test
or
new hardware
?
22
More (funny) use cases
Forgot to launch your program in screen
– Live-migrate it there
Playing a game without the save button
– Snapshot it
[Put your own use case here]
http://criu.org/Usage_scenarios
23
Recap
●
Started as containers live-migration tool
●
General tool to dump/restore apps state
●
v1.2 + Linux-3.11+ can do the trick
●
A lot of interesting technologies
●
Memory tracker
●
Migration of TCP connections
●
Injecting your code into a running application
●
Detecting kernel objects sharing
●
etc.
24
Resources
http://criu.org – main site, documentation
http://git.criu.org – git repo with tool sources
http://plus.google.com/+CRIU page
criu@openvz.org mailing list
Kir Kolyshkin <kir@openvz.org> that's me
Thank you!

More Related Content

PDF
CRIU: Time and Space Travel Service for Linux Applications
ODP
Checkpoint/restore of containers with CRIU
PDF
Tuning the Kernel for Varnish Cache
PDF
Include os @ flossuk 2018
PDF
An Updated Performance Comparison of Virtual Machines and Linux Containers
PDF
Multi container apps swarm + consul + compose
PDF
Varnish Cache 4.0 / Redpill Linpro breakfast in Oslo
PDF
Ceph QoS: How to support QoS in distributed storage system - Taewoong Kim
CRIU: Time and Space Travel Service for Linux Applications
Checkpoint/restore of containers with CRIU
Tuning the Kernel for Varnish Cache
Include os @ flossuk 2018
An Updated Performance Comparison of Virtual Machines and Linux Containers
Multi container apps swarm + consul + compose
Varnish Cache 4.0 / Redpill Linpro breakfast in Oslo
Ceph QoS: How to support QoS in distributed storage system - Taewoong Kim

What's hot (19)

PDF
Porting and Optimization of Numerical Libraries for ARM SVE
PDF
iptables and Kubernetes
PDF
KubeCon EU 2016: Getting the Jobs Done With Kubernetes
PDF
Provisioning on Libvirt with Foreman
PPTX
Geneve
PPT
He Pi Xii2003
PDF
[OpenInfra Days Korea 2018] Day 2 - E6 - OpenInfra monitoring with Prometheus
PPTX
Ovs perf
PDF
Redis Meetup TLV - K8s Session 28/10/2018
PDF
Cilium - BPF & XDP for containers
PDF
Ceph RBD Update - June 2021
PDF
IP Virtual Server(IPVS) 101
PDF
IPTABLES Introduction
PDF
Build Your Own CaaS (Container as a Service)
PDF
GFProxy: Scaling the GlusterFS FUSE Client
PDF
Docker orchestration using core os and ansible - Ansible IL 2015
PDF
LF_OVS_17_LXC Linux Containers over Open vSwitch
PDF
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
PPTX
Lifecycle of a pod
Porting and Optimization of Numerical Libraries for ARM SVE
iptables and Kubernetes
KubeCon EU 2016: Getting the Jobs Done With Kubernetes
Provisioning on Libvirt with Foreman
Geneve
He Pi Xii2003
[OpenInfra Days Korea 2018] Day 2 - E6 - OpenInfra monitoring with Prometheus
Ovs perf
Redis Meetup TLV - K8s Session 28/10/2018
Cilium - BPF & XDP for containers
Ceph RBD Update - June 2021
IP Virtual Server(IPVS) 101
IPTABLES Introduction
Build Your Own CaaS (Container as a Service)
GFProxy: Scaling the GlusterFS FUSE Client
Docker orchestration using core os and ansible - Ansible IL 2015
LF_OVS_17_LXC Linux Containers over Open vSwitch
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
Lifecycle of a pod
Ad

Similar to CRIU: Time and Space travel Service for Linux Applications (20)

PPTX
Handling Kernel Upgrades at Scale - The Dirty Cow Story
PDF
Meetup 23 - 01 - The things I wish I would have known before doing OpenStack ...
PDF
XPDS14: Xen 4.5 Roadmap - Konrad Wilk, Oracle
PDF
Containers and Namespaces in the Linux Kernel
PDF
Drupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google Cloud
PPTX
Kubernetes @ Squarespace: Kubernetes in the Datacenter
ODP
CRIU: are we there yet?
PDF
DCSF 19 Accelerating Docker Containers with NVIDIA GPUs
PPTX
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
PDF
Running Legacy Applications with Containers
PPTX
Enable DPDK and SR-IOV for containerized virtual network functions with zun
PPTX
k8s practice 2023.pptx
PPTX
LISA18: Hidden Linux Metrics with Prometheus eBPF Exporter
PPTX
Kubernetes Navigation Stories – DevOpsStage 2019, Kyiv
PDF
LXC on Ganeti
PPTX
Performance characteristics of traditional v ms vs docker containers (dockerc...
PDF
Make Your Containers Faster: Linux Container Performance Tools
PPTX
Docker introduction
PDF
Containers > VMs
PDF
Андрей Вагин. Все что вы хотели знать о Criu, но стеснялись спросить...
Handling Kernel Upgrades at Scale - The Dirty Cow Story
Meetup 23 - 01 - The things I wish I would have known before doing OpenStack ...
XPDS14: Xen 4.5 Roadmap - Konrad Wilk, Oracle
Containers and Namespaces in the Linux Kernel
Drupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google Cloud
Kubernetes @ Squarespace: Kubernetes in the Datacenter
CRIU: are we there yet?
DCSF 19 Accelerating Docker Containers with NVIDIA GPUs
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
Running Legacy Applications with Containers
Enable DPDK and SR-IOV for containerized virtual network functions with zun
k8s practice 2023.pptx
LISA18: Hidden Linux Metrics with Prometheus eBPF Exporter
Kubernetes Navigation Stories – DevOpsStage 2019, Kyiv
LXC on Ganeti
Performance characteristics of traditional v ms vs docker containers (dockerc...
Make Your Containers Faster: Linux Container Performance Tools
Docker introduction
Containers > VMs
Андрей Вагин. Все что вы хотели знать о Criu, но стеснялись спросить...
Ad

More from OpenVZ (20)

PDF
PFcache - LinuxCon 2015
ODP
Speeding up ps and top
PDF
Live migration: pros, cons and gotchas -- Pavel Emelyanov
PDF
Live migrating a container: pros, cons and gotchas -- Pavel Emelyanov
PDF
CRIU: time and space travel for Linux containers -- Kir Kolyshkin
PDF
Тестирование ПО, основанного на сторонних компонентах - Денис Силаков, SECR 2015
ODP
Живая миграция: плюсы, минусы и подводные камни - Павел Емельянов
PDF
What's missing from upstream kernel containers? - Sergey Bronnikov
PDF
Проблема фрагментации виртуальных дисков и способы её решения -- Дмитрий Монахов
PDF
Развёртывание приложений Docker в контейнерах Virtuozzo -- Павел Тихомиров
PDF
CRIU: ускорение запуска PHP в CloudLinux OS -- Руслан Купреев
PDF
LibCT и контейнеры на уровне приложений -- Александр Бурлука
PDF
Управление памятью контейнеров в проекте OpenVZ -- Владимир Давыдов
PDF
Живая миграция контейнеров: плюсы, минусы, подводные камни -- Павел Емельянов
PDF
LibCT: one lib to rule them all -- Andrey Vagin
ODP
Denser containers with PF cache - Pavel Emelyanov
ODP
CGroups kernel memory controller -- Pavel Emelyanov
ODP
What's missing from upstream kernel containers? - Kir Kolyshkin, Sergey Bronn...
ODP
Not so brief history of Linux Containers - Kir Kolyshkin
ODP
Openvz booth
PFcache - LinuxCon 2015
Speeding up ps and top
Live migration: pros, cons and gotchas -- Pavel Emelyanov
Live migrating a container: pros, cons and gotchas -- Pavel Emelyanov
CRIU: time and space travel for Linux containers -- Kir Kolyshkin
Тестирование ПО, основанного на сторонних компонентах - Денис Силаков, SECR 2015
Живая миграция: плюсы, минусы и подводные камни - Павел Емельянов
What's missing from upstream kernel containers? - Sergey Bronnikov
Проблема фрагментации виртуальных дисков и способы её решения -- Дмитрий Монахов
Развёртывание приложений Docker в контейнерах Virtuozzo -- Павел Тихомиров
CRIU: ускорение запуска PHP в CloudLinux OS -- Руслан Купреев
LibCT и контейнеры на уровне приложений -- Александр Бурлука
Управление памятью контейнеров в проекте OpenVZ -- Владимир Давыдов
Живая миграция контейнеров: плюсы, минусы, подводные камни -- Павел Емельянов
LibCT: one lib to rule them all -- Andrey Vagin
Denser containers with PF cache - Pavel Emelyanov
CGroups kernel memory controller -- Pavel Emelyanov
What's missing from upstream kernel containers? - Kir Kolyshkin, Sergey Bronn...
Not so brief history of Linux Containers - Kir Kolyshkin
Openvz booth

Recently uploaded (20)

PDF
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
PPTX
Custom Software Development Services.pptx.pptx
DOCX
How to Use SharePoint as an ISO-Compliant Document Management System
PPTX
Weekly report ppt - harsh dattuprasad patel.pptx
PPTX
Cybersecurity: Protecting the Digital World
PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
Ableton Live Suite for MacOS Crack Full Download (Latest 2025)
PDF
Time Tracking Features That Teams and Organizations Actually Need
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PPTX
Trending Python Topics for Data Visualization in 2025
PDF
MCP Security Tutorial - Beginner to Advanced
PDF
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
PPTX
Patient Appointment Booking in Odoo with online payment
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PDF
AI/ML Infra Meetup | Beyond S3's Basics: Architecting for AI-Native Data Access
PPTX
Introduction to Windows Operating System
PDF
How Tridens DevSecOps Ensures Compliance, Security, and Agility
PDF
iTop VPN Crack Latest Version Full Key 2025
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PPTX
Monitoring Stack: Grafana, Loki & Promtail
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
Custom Software Development Services.pptx.pptx
How to Use SharePoint as an ISO-Compliant Document Management System
Weekly report ppt - harsh dattuprasad patel.pptx
Cybersecurity: Protecting the Digital World
Digital Systems & Binary Numbers (comprehensive )
Ableton Live Suite for MacOS Crack Full Download (Latest 2025)
Time Tracking Features That Teams and Organizations Actually Need
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
Trending Python Topics for Data Visualization in 2025
MCP Security Tutorial - Beginner to Advanced
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
Patient Appointment Booking in Odoo with online payment
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
AI/ML Infra Meetup | Beyond S3's Basics: Architecting for AI-Native Data Access
Introduction to Windows Operating System
How Tridens DevSecOps Ensures Compliance, Security, and Agility
iTop VPN Crack Latest Version Full Key 2025
Why Generative AI is the Future of Content, Code & Creativity?
Monitoring Stack: Grafana, Loki & Promtail

CRIU: Time and Space travel Service for Linux Applications