Making Applications Mobile using containers Ottawa Linux Symposium, - - PowerPoint PPT Presentation

making applications mobile
SMART_READER_LITE
LIVE PREVIEW

Making Applications Mobile using containers Ottawa Linux Symposium, - - PowerPoint PPT Presentation

Making Applications Mobile using containers Ottawa Linux Symposium, July 2006 Cedric Le Goater <clg@fr.ibm.com> Daniel Lezcano <dlezcano@fr.ibm.com> Clement Calmels <clement.calmels@fr.ibm.com> Dave Hansen


slide-1
SLIDE 1

Making Applications Mobile

using containers

Ottawa Linux Symposium, July 2006 Cedric Le Goater <clg@fr.ibm.com> Daniel Lezcano <dlezcano@fr.ibm.com> Clement Calmels <clement.calmels@fr.ibm.com> Dave Hansen <haveblue@us.ibm.com> Serge E. Hallyn <serue@us.ibm.com> Hubertus Franke <frankeh@watson.ibm.com> IBM

slide-2
SLIDE 2

Legal Statement

This work represents the view of the author and does not necessarily represent the view of IBM. IBM, IBM (logo), e-business (logo), pSeries, e (logo) server, and xSeries are trademarks or registered trademarks of International Business Machines Corporation in the United States and/or other countries. Linux is a registered trademark of Linus Torvalds. Other company, product, and service names may be trademarks or service marks of others.

slide-3
SLIDE 3

What are we going to talk about ?

What is application mobility ? What are the issues ? Why containers ? Current state Future

slide-4
SLIDE 4

What we are *not* going to talk about

Security

common requirements on isolation

  • ne of the feature of containers

Resource management

common requirements on process aggregation

  • ne of the feature of containers

System administration and management

container management is probably the most important topic : create, clone, configure, start/stop/suspend, migrate a lot of work in user space

slide-5
SLIDE 5

What we are *not* going to talk about

This is not about Virtualization !

  • ne word, plenty of meanings

related because application Mobility requires an isolated environment

This is not a Xen Challenge

Xen is also working on live migration

slide-6
SLIDE 6

What is this mobility about ?

Cluster

100, 1000 nodes are common figures jobs running for months will need to be protected from node failure load balancing to run high priority jobs on the fast nodes it is also used for tuning and debugging mobility API is already integrated in most batch managers

slide-7
SLIDE 7

What is this mobility about ? more

Enterprise applications

service uptime is the most important criteria manage quality of service by moving application across the servers fast application startup predictive failover tied to system health monitoring framework

slide-8
SLIDE 8

What is this mobility about ? last one

Misc

Lazy engineers working from home Application crashes <cough> Evolution Debugging Fun

Hardware upgrade OS upgrade

slide-9
SLIDE 9

Good News

Real users Real interest of the community Good feedback from ksummit (on containers) Real effort to go mainline

OpenVZ, Linux-VServer, IBM and Linux Networx

Working together to provide basic framework

slide-10
SLIDE 10

Ugly issues

Define resource usage

which processes ? ipcs ? sockets ? which files ? network interface ?

Ensure resource availability on target

systems ids should be available to prevent conflict files and network also !

Preserve consistency during migration

freeze the whole system block network, flush I/Os

slide-11
SLIDE 11

Processes

process identifier

should be available at restart !

process hierarchy

define init process or ancestor respect waitpid() ... preserve session leaders, group leaders

funky stuff

LinuxThread model

slide-12
SLIDE 12

Network

we need to identify the network traffic virtualization of network interfaces

we need to isolate interface for each application and also keep loopback support enable applications to bind on the same INADDR_ANY:port and finally block the traffic

funky stuff

performance, you don’t want to add to much overhead on each sent or received packets get and set the kernel state keep alive mechanisms

slide-13
SLIDE 13

VM

virtual memory can be very large : 64 bits ... respect the COW mechanism at restart shared mapping should be only captured once really funky stuff

support for remap_file_pages() ... asynchronous I/Os

slide-14
SLIDE 14

Filesystems

identify application files

shared storage is highly recommended ... OS filesystems should not be taken into account (except /var and /tmp)

/proc is a difficult beast

exposes most of the system configuration, difficult to handle /proc/$pid easier

devices support

/dev/zero, /dev/null are easily supported access to any hardware device should be forbidden. remove mknod()

NFS mounts ... arg

slide-15
SLIDE 15

Looking for the holy Grail

Cluster / single system image

  • riginal way on UNICOS and IRIX

Embedded into application

fits the need for a while

User-level

based on the LD_PRELOAD trick kernel module used as a kernel proxy to capture internal state

slide-16
SLIDE 16

Looking for the holy Grail

Virtual Machine approach

migrate the whole operating system performance overhead

Containers

found it !

slide-17
SLIDE 17

Virtualization : one word, many meanings

What is Virtualization ? sigh.

Harware partitions Hypervisors Para virtualization Emulators Simulators ABI OS virtualization or Containers

More on Virtualization Abuse

http://en.wikipedia.org/wiki/Comparison_of_virtual_machines http://en.wikipedia.org/wiki/Virtualization

slide-18
SLIDE 18

What do we mean by Containers ?

soft partitions subsystem isolation light virtualization, at the OS level fast == native performance with still a large feature set :

resource management security live migration of application efficient administration

relatively small kernel patch

slide-19
SLIDE 19

Existing Container solutions

BSD

FreeBSD jail

linux

Linux-VServer OpenVZ MetaCluster

Research

Zap

Others

Solaris Zones

slide-20
SLIDE 20

Container overhead

slide-21
SLIDE 21

Resource Isolation

a container is a set of namespaces

a namespace for each subsystem

assembling the whole to provide a view of a real system

system containers

assembling bits and pieces to optimize resource usage

application containers

isolation provides resource aggregation which is a requirement to have a clear picture of an application state

slide-22
SLIDE 22

Resource Virtualization

Next step after isolation.

virtualization is built on top of isolation it provides private namespaces

uniqueness of ids to avoid conflict at restart a way to reassign ids at restart

slide-23
SLIDE 23

suspend (and resume) to disk

The killer feature ! required steps :

we need to freeze a container we need to provide suspend/resume to disk for each subsystem we’re working on using a swap file per container to store the snapshot

slide-24
SLIDE 24

Linux Container Project

The goal of this project is to provide a container framework enabling features like :

resource management security mobility

The development approach is very incremental. No massive patch. Cleanups first. More info on :

http://lxc.sf.net

slide-25
SLIDE 25

Current status on patchsets

utsname namespace patchset is -mm ipc namespace also in -mm net namespace is under construction user namespace just started but the difficulty is to have people focus on the initial enablement and not the whole picture "first patchsets are baby steps" (Dave Hansen)

slide-26
SLIDE 26

Next steps

bring the pid namespace patchset down from the attic hopefully, complete net namespace ... integrate the whole in a container object (nsproxy) to provide an initial framework provide the user space API necessary to manage such objects leverage this initial framework to start studies on the suspend/resume feature of each subsystem

slide-27
SLIDE 27

Who do we need help from ?

Bringing a container feature to linux is not only about checkpoint and

  • restart. Integration and interaction with :

community security people resource management (UBC/OpenVZ or similar)

Complementary technologies

Distributed Filesystems and Storage X11

slide-28
SLIDE 28

Credits

Many thanks to : Dave Hansen, Serge E. Hallyn, Hubertus Franke, Daniel Lezcano, Clement Calmels, Jonghyuk Choi, Byoung-jip Kim, Gerrit Huizenga OpenVZ team Linux-VServer Community

slide-29
SLIDE 29

This is the end

Thank you!