2. План
• Что такое C/R?
• Есть ли реализации и зачем появился CRIU?
• Зачем это нужно?
• В каком состоянии находится проект?
2
3. Введение
• CRIU – Checkpoint/Restore In Userspace
• Технология C/R
– Checkpoint (dump) – сохранение максимально подробной
информации о состоянии процессов, используемых ими
ресурсов и их окружении.
– Restore – восстановление процессов, ресурсов и
окружения в таком виде, чтобы процессы “не заметили
разницы”.
• Реализации: BLCR, DMTCP, CryoPID, OpenVZ CPT, MOSIX
3
4. Как и зачем возник CRIU
• Parallels поставила целью получить реализацию C/R
технологии в основном ядре Linux.
• Решение “в ядре” не устроило сообщество, и мы решили
попробовать сделать в виде пользовательской утилиты.
• Как сделать лучше чем
• BLCR и OpenVZ CPT – должно работать на немодифицированном
ядре
• DMTCP – не должно требовать подготовки процессов перед стартом
• CryoPID – должно работать со всем, что умеют процессы в Linux
4
5. Как работает
• Checkpoint: сбор информации о процессах, ресурсах и
окружении с помощью существующего Linux kernel API
• Restore: CRIU процесс “переодевается” в то, что надо
восстановить
• Существующего API недостаточно
• API ядра был расширен, полный набор требуемых
расширений доступен начиная с 3.11
5
6. Использование – живая миграция
• В простейшем исполнении живая миграция = dump + copy +
restore
• Пред-копирование памяти: (dump + copy) x N + мграция без
памяти
– Необходим механизм отслеживания изменений в памяти
– Для CRIU – soft-dirty в 3.11 ядре
• Пост-копирование памяти: миграция без памяти + “сетевой
swap”
– Необходим механизм “подгрузки” памяти по сети
– Для CRIU – userfaultfd в процессе разработки6
7. Использование – незаметное обновление ядра
• Последовательность действий
– Сохраняем состояние контейнеров в памяти
– Меняем ядро без перезагрузки оборудования (kexec)
– Восстанавливаем контейнеры
• Доп. требование – блокирование свободного доступа к
памяти на раннем этапе загрузги
– Готово в OpenVZ/PCS – persistent ramfs
– Разрабатывается в основном ядре
7
8. Использование – остальное
• Отложенная отладка “зависшего” сервиса
• Быстрый старт процесса
• Сохранение удалённой терминальной сессии
• Серия “снимков” приложений
8
9. Текущее состояние проекта
• V1.6
– Умеет работать со всеми стандартными сервисами –
apache, mysql, sshd, crond, nginx, ...
– Интегрирована с LXC, Docker libcontainer и OpenVZ
• Сообщество
– Odin/Parallels, Google, Canonical, RedHat, SuSE (Novell),
Debian, CloudLinux, Samsung, Huawei и энтузиасты
– Linux kernel разработчики знают о проекте и содействуют
необходимым ядерным улучшениям
9
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
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
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
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
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
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
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
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