No one puts java in the container

K
© 2016 Mesosphere, Inc. All Rights Reserved. 1
No one puts
Java in the
Container
MesosCon 2016 – Ken Sipe
© 2016 Mesosphere, Inc. All Rights Reserved. 2
Ken Sipe
Distribute Application
Engineer
Apache Mesos Contributor
Apache Committer Myriad, Open DCOS
Developer: Embedded, C++, Java, Groovy, Grails, C#, GoLang
@KenSipe
© 2016 Mesosphere, Inc. All Rights Reserved. 3
Patrick Swayze
Actor and Dancer
Red Dawn, Dirty Dancing , Roadhouse and Ghost
@patrickswayze09 and
@patrick_swayze
© 2016 Mesosphere, Inc. All Rights Reserved. 4
© 2016 Mesosphere, Inc. All Rights Reserved. 5
© 2016 Mesosphere, Inc. All Rights Reserved. 6
Dev
© 2016 Mesosphere, Inc. All Rights Reserved. 7
Ops
© 2016 Mesosphere, Inc. All Rights Reserved. 8
●What is a Container
●The Heart of Container (CGROUPS / NameSpaces)
●Java Mem / CPU
●Java in a Container
Agenda
© 2016 Mesosphere, Inc. All Rights Reserved. 9
Does Java
fit in a
container?
© 2016 Mesosphere, Inc. All Rights Reserved. 10
Ops
© 2016 Mesosphere, Inc. All Rights Reserved. 11
Containers
© 2016 Mesosphere, Inc. All Rights Reserved. 12
Container
© 2016 Mesosphere, Inc. All Rights Reserved. 13
Write Once Run Any Where
© 2016 Mesosphere, Inc. All Rights Reserved. 14
●I can get a shell on it (through SSH or otherwise)
●It "feels" like a VM:
●own process space
●own network interface
●can install packages
●can run services
High level: it's a lightweight VM
© 2016 Mesosphere, Inc. All Rights Reserved. 15
HARDWARE VIRTUALIZATION
1966-1972 IBM CP/CMS
1989 Insignia SoftPC
1997 Connectix VirtualPC
1999 VMWare Workstation
2001 IBM AIX LPAR
2002 Xen
2006 Amazon EC2
2007 Sun Logical Domains
2007 Linux KVM
2007 InnoTek VirtualBox
2008 Microsoft Hyper-V
© 2016 Mesosphere, Inc. All Rights Reserved. 16
Container
© 2016 Mesosphere, Inc. All Rights Reserved. 17
●It's not quite like a VM:
uses the host kernel

can't boot a different OS
●It's just a bunch of processes visible on the host machine
●(contrast with VMs which are opaque)
Low level: it's chroot on steroids
© 2016 Mesosphere, Inc. All Rights Reserved. 18
PROCESS VIRTUALIZATION
1979-1982 UNIX Chroot
1998 FreeBSD Jail
2001 Parallels Virtuozzo
2001 Linux-VServer
2005 Solaris Zones
2005 OpenVZ
2008 Linux LXC
2007+
PAAS:
Heroku, Joyent, CloudFoundry
2013 Docker
© 2016 Mesosphere, Inc. All Rights Reserved. 19
What’s the difference between containers and virtual machines?
© 2016 Mesosphere, Inc. All Rights Reserved. 20
Containers vs Virtual Machines
© 2016 Mesosphere, Inc. All Rights Reserved. 21
●Weaker isolation in containers
●Containers run near-native speed CPU/IO
●Containers launch in around 0.1 second (libcontainer)
●Less memory overhead
Differences between containers and virtual machines
© 2016 Mesosphere, Inc. All Rights Reserved. 22
© 2016 Mesosphere, Inc. All Rights Reserved. 23
(LINUX) KERNEL
LAYER FS
CGROUPS NAMESPACES
LIBCONTAINER
DOCKER
© 2016 Mesosphere, Inc. All Rights Reserved. 24
Namespaces provide isolation:
• pid (processes)
• net (network interfaces, routing...)
• ipc (System V IPC)
• mnt (mount points, filesystems)
• uts (hostname)
• user (UIDs)
Control groups control resources:
• cpu (CPU shares)
• cpuacct
• cpuset (limit processes to a CPU)
• memory (swap, dirty pages)
• blkio (throttle reads/writes)
• devices
• net_cls, net_prio: control packet class and
priority
• freezer
NAMESPACES VS. Cgroups
© 2016 Mesosphere, Inc. All Rights Reserved. 25
Control Groups
© 2016 Mesosphere, Inc. All Rights Reserved. 26
●Resource metering and limiting
●memory
●CPU
●block I/O
●network*
●Device node (/dev/*) access control
●freezer
Control groups
© 2016 Mesosphere, Inc. All Rights Reserved. 27
• /sys/fs/cgroup
• Each subsystem (memory, CPU...) has a hierarchy (tree)
•Each process belongs to exactly 1 node in each hierarchy
•Each hierarchy starts with 1 node (the root)
•Each node = group of processes (sharing the same resources)
Control groups - Generalities
© 2016 Mesosphere, Inc. All Rights Reserved. 28
View on DCOS on CoreOS
© 2016 Mesosphere, Inc. All Rights Reserved. 29
cpu/
!"" batch
#   !"" bitcoins
#   #   %"" 42
#   %"" hadoop
#   !"" 210
#   %"" 98
%"" realtime
!"" nginx
#   !"" 21
#   !"" 22
#   %"" 23
!"" postgres
#   %"" 404
%"" redis
%"" 2343
memory/
!"" 21
!"" 210
!"" 22
!"" 23
!"" 42
!"" 98
%"" databases
!"" 2343
%"" 404
© 2016 Mesosphere, Inc. All Rights Reserved. 30
●Metrics: swap, total rss, # pages in/out
●Keeps track of pages used by each group:
●file (read/write/mmap from block devices)
●anonymous (stack, heap, anonymous mmap)
●active (recently accessed)
●inactive (candidate for eviction)
Memory cgroup: accounting
© 2016 Mesosphere, Inc. All Rights Reserved. 31
•Each group can have hard and soft limits
•Soft limits are not enforced
•Hard limits will trigger a per-group OOM killer
•Limits can be set for physical, kernel, total memory
Memory cgroup: limits
docker run -it --rm -m 128m fedora bash
© 2016 Mesosphere, Inc. All Rights Reserved. 32
●Mar 10 17:42:39 ip-10-0-1-114.us-west-2.compute.internal mesos-slave[1190]: I0310 17:42:39.848748 
1199 status_update_manager.cpp:824] Checkpointing ACK for status update TASK_RUNNING (UUID:
8d13fbb9-b02a-45da-9b52-5393ce8f0746) for task task.datanode.datanode1.1457631756250 of
framework d83631ed-34
●Mar 10 17:42:41 ip-10-0-1-114.us-west-2.compute.internal mesos-slave[1190]: I0310 17:42:41.561954 
1200 mem.cpp:625] OOM notifier is triggered for container 6461cafd-3962-4022-a070-
f6e26488dd94
●Mar 10 17:42:41 ip-10-0-1-114.us-west-2.compute.internal mesos-slave[1190]: I0310 17:42:41.562047 
1200 mem.cpp:644] OOM detected for container 6461cafd-3962-4022-a070-f6e26488dd94
●Mar 10 17:42:41 ip-10-0-1-114.us-west-2.compute.internal mesos-slave[1190]: I0310 17:42:41.566249 
1200 mem.cpp:685] Memory limit exceeded: Requested: 2080MB Maximum Used: 2080MB
journalctl -f _TRANSPORT=kernel
© 2016 Mesosphere, Inc. All Rights Reserved. 33
●Metrics: cpuacct.stats user | system
●Allows to set weights
●Limitations based on type
●Options:
●CPU Shares
●CPU Sets
Cpu cgroup
© 2016 Mesosphere, Inc. All Rights Reserved. 34
●Priority Weighting across all the cores
●default value is 1024
CPU Shares
docker run -it --rm -c 512 stress …
© 2016 Mesosphere, Inc. All Rights Reserved. 35
●sudo cgcreate -g cpu:A
●sudo cgcreate -g cpu:B
●cgroup A: sudo cgset -r cpu.shares=768 A 75%
●cgroup B: sudo cgset -r cpu.shares=256 B 25%
CPU Shares
© 2016 Mesosphere, Inc. All Rights Reserved. 36
●Pin groups to specific CPU(s)
●Reserve CPUs for specific apps
●Avoid processes bouncing between CPUs
●Also relevant for NUMA systems
CPU Sets
docker run -it -cpuset=0,4,6 stress
© 2016 Mesosphere, Inc. All Rights Reserved. 37
●Limit: Bandwidth limits R/W, async / sync
●Limit: Weighted 10 10 1000
●Metrics: iops served, waiting and queued
Blkio cgroup
© 2016 Mesosphere, Inc. All Rights Reserved. 38
●Controls what the group can do on device nodes
●Permissions include read/write/mknod
●Typical use:
●allow /dev/{ty,zero,random,nul}...
●deny everything else
●A few interesting nodes:
●/dev/net/tun(network interface manipulation)
●/dev/fuse(filesystems in user space)
●/dev/kvm(VMs in containers, yay inception!)
●/dev/dri(GPU)
Devices cgroup
© 2016 Mesosphere, Inc. All Rights Reserved. 39
●When a process is created, it is placed in the same groups as its parent
●Groups are materialized by one (or multiple) pseudo-fs (typically mounted in /sys/fs/
cgroup)
Cgroup: More info
© 2016 Mesosphere, Inc. All Rights Reserved.
core@ip-10-0-2-26 ~ $ systemd-cgls memory
memory:
├─1 /usr/lib/systemd/systemd --switched-root --system --deserialize 12
├─mesos
│ ├─slave
│ │ ├─ 1300 /opt/mesosphere/packages/mesos--1eb02db6541da1a30af9fcbd9dc8e492351b8716/bin/mesos-slave
│ │ ├─ 9640 mesos-logrotate-logger --help=false --log_filename=/var/lib/mesos/slave/slaves/77f7bbfb-5c51-42a1-8f90-28740c68450d-S0/
frameworks/77f7bbfb-5c51-42a1-8f90-28740c68450d-0000/executors/sleep.3df1f8e0-276f-11e6-b
│ │ ├─ 9641 mesos-logrotate-logger --help=false --log_filename=/var/lib/mesos/slave/slaves/77f7bbfb-5c51-42a1-8f90-28740c68450d-S0/
frameworks/77f7bbfb-5c51-42a1-8f90-28740c68450d-0000/executors/sleep.3df1f8e0-276f-11e6-b
│ │ ├─10625 mesos-logrotate-logger --help=false --log_filename=/var/lib/mesos/slave/slaves/77f7bbfb-5c51-42a1-8f90-28740c68450d-S0/
frameworks/77f7bbfb-5c51-42a1-8f90-28740c68450d-0000/executors/docker-sleep.2d2504c1-2770
│ │ ├─10626 mesos-logrotate-logger --help=false --log_filename=/var/lib/mesos/slave/slaves/77f7bbfb-5c51-42a1-8f90-28740c68450d-S0/
frameworks/77f7bbfb-5c51-42a1-8f90-28740c68450d-0000/executors/docker-sleep.2d2504c1-2770
│ │ ├─10627 mesos-docker-executor --container=mesos-77f7bbfb-5c51-42a1-8f90-28740c68450d-S0.a0c1787b-3cd4-4b4a-aa47-87b01036130f --
docker=docker --docker_socket=/var/run/docker.sock --help=false --launcher_dir=/opt/mesos
│ │ ├─10659 docker -H unix:///var/run/docker.sock run --cpu-shares 1024 --memory 134217728 -e
MARATHON_APP_VERSION=2016-05-31T20:42:22.763Z -e HOST=10.0.2.26 -e MARATHON_APP_RESOURCE_CPUS=1.0 -e MARATHON_APP_DOCKER_IMAGE
│ │ ├─14772 mesos-logrotate-logger --help=false --log_filename=/var/lib/mesos/slave/slaves/77f7bbfb-5c51-42a1-8f90-28740c68450d-S0/
frameworks/77f7bbfb-5c51-42a1-8f90-28740c68450d-0000/executors/hdfs.6a7079c3-2841-11e6-b4
│ │ ├─14773 mesos-logrotate-logger --help=false --log_filename=/var/lib/mesos/slave/slaves/77f7bbfb-5c51-42a1-8f90-28740c68450d-S0/
frameworks/77f7bbfb-5c51-42a1-8f90-28740c68450d-0000/executors/hdfs.6a7079c3-2841-11e6-b4
│ │ ├─17369 mesos-logrotate-logger --help=false --log_filename=/var/lib/mesos/slave/slaves/77f7bbfb-5c51-42a1-8f90-28740c68450d-S0/
frameworks/77f7bbfb-5c51-42a1-8f90-28740c68450d-0001/executors/task.journalnode.journalno
│ │ └─17370 mesos-logrotate-logger --help=false --log_filename=/var/lib/mesos/slave/slaves/77f7bbfb-5c51-42a1-8f90-28740c68450d-S0/
frameworks/77f7bbfb-5c51-42a1-8f90-28740c68450d-0001/executors/task.journalnode.journalno
│ ├─5c4cde35-f267-4a67-9b31-72b6fa77dec0
│ │ ├─ 9642 /opt/mesosphere/packages/mesos--1eb02db6541da1a30af9fcbd9dc8e492351b8716/libexec/mesos/mesos-executor
│ │ ├─ 9674 sh -c while :; do echo "sandbox: $PWD"; sleep 120; done
│ │ └─14634 sleep 120
40
SystemD CGLS
© 2016 Mesosphere, Inc. All Rights Reserved. 41
/proc/<pid>/cgroup
core@ip-10-0-2-26 ~ $ cat /proc/9674/cgroup
9:freezer:/mesos/5c4cde35-f267-4a67-9b31-72b6fa77dec0
8:devices:/system.slice/dcos-mesos-slave.service
7:blkio:/system.slice/dcos-mesos-slave.service
6:net_cls,net_prio:/
5:cpu,cpuacct:/mesos/5c4cde35-f267-4a67-9b31-72b6fa77dec0
4:cpuset:/
3:perf_event:/
2:memory:/mesos/5c4cde35-f267-4a67-9b31-72b6fa77dec0
1:name=systemd:/mesos_executors.slice
© 2016 Mesosphere, Inc. All Rights Reserved. 42
systemd-cgtop
© 2016 Mesosphere, Inc. All Rights Reserved. 43
●You can find all the information about the CPU for a specific container under /sys/fs/
cgroup/cpu/system.slice/docker-$FULL_CONTAINER_ID.scope/, for example:
●$ ls /sys/fs/cgroup/cpu/system.slice/
docker-6935854d444d78abe52d629cb9d680334751a0cda82e11d2610e041d77a62b3f.scope/
cgroup.clone_children cpuacct.usage_percpu cpu.rt_runtime_us tasks
cgroup.procs cpu.cfs_period_us cpu.shares
cpuacct.stat cpu.cfs_quota_us cpu.stat
cpuacct.usage cpu.rt_period_us notify_on_release
CGroup + Docker
© 2016 Mesosphere, Inc. All Rights Reserved. 44
Namespaces
© 2016 Mesosphere, Inc. All Rights Reserved. 45
●Provide processes with their own view of the system
●Cgroups = limits how much you can use;

namespaces = limits what you can see (and therefore use)
●Multiple namespaces:
●pid, net, mnt, uts, ipc, user
●Each process is in one namespace of each type
Namespaces
© 2016 Mesosphere, Inc. All Rights Reserved. 46
●Processes within a PID namespace only see processes in the same PID namespace
●Each PID namespace has its own numbering (starting at 1)
●When PID 1 goes away, the whole namespace is killed
Pid namespace
© 2016 Mesosphere, Inc. All Rights Reserved. 47
●Mounts
●read-only
●shared - share subsequent mounts in a shared mount
●slave - only source can share with target but target mounts are private
●private - non-sharing of subsequent mounts in a shared mount
Mnt namespace
© 2016 Mesosphere, Inc. All Rights Reserved. 48
●Mount RO /usr
●Private /tmp
Typical Container Uses of MNT
© 2016 Mesosphere, Inc. All Rights Reserved. 49
●Processes within a given network namespace get their own private network stack,
including:
●network interfaces (including lo)
●routing tables
●iptables rules
●sockets (s, netstat)
net namespace
© 2016 Mesosphere, Inc. All Rights Reserved. 50
●Root namespace
●Bridging
●Private namespace with socket activation
Typical Container Uses of NET
© 2016 Mesosphere, Inc. All Rights Reserved. 51
●gethostname
●sethostname
uts namespace
© 2016 Mesosphere, Inc. All Rights Reserved. 52
●Allows a process (or group of processes) to have own:
●IPC semaphores
●IPC message queues
●IPC shared memory
IPC namespace
© 2016 Mesosphere, Inc. All Rights Reserved. 53
●Allows to map UID/GID; e.g.:
●UID 0→1999 in container C1 is mapped to UID 10000→11999 on host

UID 0→1999 in container C2 is mapped to UID 12000→13999 on host
●

Avoids extra configuration in containers

UID 0 (root) can be squashed to a non-privileged user
User namespace
© 2016 Mesosphere, Inc. All Rights Reserved. 54
●Namespaces are created with the clone() system call (i.e. with extra flags when
creating a new process)
●Namespaces are materialized by pseudo-files in
●/proc/<pid>/ns
●When the last process of a namespace exits, it is destroyed (but can be preserved by
bind-mounting the pseudo-file)
Namespace manipulation
© 2016 Mesosphere, Inc. All Rights Reserved. 55
●Can be used independently
●Use a few cgroups if you just need resource isolation
●Simulate a network of routers with network namespaces
●Put the debugger in a container's namespaces, but not its cgroups (to not use its
resource quotas)
●Setup a network interface in an isolated environment, then move it to another
cgroups and namespaces
© 2016 Mesosphere, Inc. All Rights Reserved. 56
Containers
© 2016 Mesosphere, Inc. All Rights Reserved. 57
●Even when you don't run containers ...
●you are in a container
You are always in a container
© 2016 Mesosphere, Inc. All Rights Reserved. 58
●Set of user-land tools
●A container is a directory in /var/lib/lxc
●Small config file + root filesystem
●Early versions had no support to move images around
●Requires significant amount of elbow grease (easy for sysadmins/ops, hard for devs)
LXC
© 2016 Mesosphere, Inc. All Rights Reserved. 59
●Daemon controlled by REST(ish) API
●First versions shelled out to LXC,
●now uses its own lib container runtime
●Manages containers, images, builds, and more
Docker Engine
© 2016 Mesosphere, Inc. All Rights Reserved. 60
●rkt, runC
●Focus on container execution

(no API, no image management, no build, etc.)
●They implement different specifications: rkt implements appc (App Container)
●runC implements OCP (Open Container Project), leverages Docker's libcontainer
●Mesos Container
Other Containers
© 2016 Mesosphere, Inc. All Rights Reserved. 61
●They all use the same kernel features
●Performance will be exactly the same
Which container is right for you?
© 2016 Mesosphere, Inc. All Rights Reserved. 62
Lets Talk Java
© 2016 Mesosphere, Inc. All Rights Reserved. 63
●Java Language + Java Specification + Java Runtime
Java
© 2016 Mesosphere, Inc. All Rights Reserved. 64
●Memory
●JIT Optimizations
●Mode: client vs. server
●Thread Management
●GC
Java Runtime Considerations
© 2016 Mesosphere, Inc. All Rights Reserved. 65
●Native JRE
●Heap
●Perm / meta
●JIT bytecode
●JNI
●NIO
●Threads
Java Memory Impact on a Machine
© 2016 Mesosphere, Inc. All Rights Reserved. 66
Java Memory
-Xms / -Xmx
Eden Old SpaceSS0 SS1
© 2016 Mesosphere, Inc. All Rights Reserved. 67
Java Memory
-XX:MaxPermSize
Eden Old SpaceSS0 SS1 Perm Space
© 2016 Mesosphere, Inc. All Rights Reserved. 68
Java Memory
-XX:SurvivorRatio
-XX:MaxNewSize
-XX:NewRatio
Eden Old SpaceSS0 SS1 Perm Space
© 2016 Mesosphere, Inc. All Rights Reserved. 69
© 2016 Mesosphere, Inc. All Rights Reserved. 70
Metaspace
© 2016 Mesosphere, Inc. All Rights Reserved. 71
Congratulations!! Leaky classloaders now effect the entire machine (or the container)
© 2016 Mesosphere, Inc. All Rights Reserved. 72
NIO with Native Memory Buffer
© 2016 Mesosphere, Inc. All Rights Reserved. 73
●Every thread in an application requires memory to store its stack
●Default sizes usually: 512K to 1024K / thread
Threads
© 2016 Mesosphere, Inc. All Rights Reserved. 74
●JIT differences
●larger old spaces
●code cache (JRE 7)
●client = 32M
●server = 48M
●JRE8 = 96M
client vs server mode
© 2016 Mesosphere, Inc. All Rights Reserved. 75
●Sets the default # threads for GC
●Initial value of the ForkJoin Pool
Core / Process Counts
-Djava.util.concurrent.ForkJoinPool.common.parallelism=1
-XX:ParallelGCThreads
-XX:ConcGCThreads
© 2016 Mesosphere, Inc. All Rights Reserved. 76
●JIT compiler threads
●HotSpot thresholds and optimizations
●Number of thread in the common fork-join pool
●and more…
JRE initializations based on core count
© 2016 Mesosphere, Inc. All Rights Reserved. 77
●JIT Optimization
●Another Pause Opportunity
●Affected when the number of threads outnumbers the number of cores
Time To Safe Point (TTSP)
© 2016 Mesosphere, Inc. All Rights Reserved. 78
Bringing it together
© 2016 Mesosphere, Inc. All Rights Reserved. 79
●Memory limitations are naive and most be set
Where Java Gets it’s Information
© 2016 Mesosphere, Inc. All Rights Reserved. 80
●JDK 7/8 - resources from sysconf
sysconf(_SC_NPROCESSORS_ONLN);
●JDK 9 - sched_getaffinity
●accounts for cpusets
Where Java Gets it’s CPU Information
© 2016 Mesosphere, Inc. All Rights Reserved. 81
●CPUSET
●pin to specific CPUs
●Runtime.getRuntime().availableProcessors(); == # cores assigned
Java with CPU Set
docker run -ti --cpuset=0,4,6 …
© 2016 Mesosphere, Inc. All Rights Reserved. 82
●CPU Share
●Priority Weighting across all the cores
●Runtime.getRuntime().availableProcessors(); == # cores on node
Java with CPU Share
docker run -ti -c 512 …
© 2016 Mesosphere, Inc. All Rights Reserved. 83
●Land on a 32 core box
●32 cores are seen by the JRE
●32 threads set by default for ForkJoinPool
Java and CPU Shares
© 2016 Mesosphere, Inc. All Rights Reserved. 84
●“We resisted making the JVM resource pool aware on Solaris and that turned out to
be a win because Zones became dominant.
●But now we face a similar problem with cgroups on Linux and environments like
Docker.
●We were lucky that cpusets are reflected in the output of sched_getaffinity - a nice
simple change.”
Dr. David Holmes
© 2016 Mesosphere, Inc. All Rights Reserved. 85
●“But memory constraints are far more problematic and may not even be queryable
in general.
●If there are no API's to tell the VM the real resource story what is the VM supposed to
do? I don't have any answers to that.”
●“When the environment lies to the VM about what is available it
makes it very hard for the VM to try to adjust.”
Dr. David Holmes
© 2016 Mesosphere, Inc. All Rights Reserved. 86
The JRE needs help
© 2016 Mesosphere, Inc. All Rights Reserved. 87
© 2016 Mesosphere, Inc. All Rights Reserved. 88
The Solution!!!
© 2016 Mesosphere, Inc. All Rights Reserved. 89
The Solution!!!
© 2016 Mesosphere, Inc. All Rights Reserved. 90
●“The good thing about docker containers (and some other like containers) is that
they don’t hide the underlying hardware from processes like VM technology does.”
●“The bad thing about docker containers (and some other like containers) is that they
don’t hide the underlying hardware from processes like VM technology does.”
Kirk Pepperdine
© 2016 Mesosphere, Inc. All Rights Reserved. 91
●We need a JDK
Enhancement Proposal
Call to action
© 2016 Mesosphere, Inc. All Rights Reserved. 92
●Java Memory
●Java Performance
●IBM: Thanks for the memory
References
http://www.ibm.com/developerworks/library/j-nativememory-linux/
© 2016 Mesosphere, Inc. All Rights Reserved. 93
VISIT OUR
BOOTH
Located at D1, near the main entrance
Learn more by visiting dcos.io and mesosphere.com
© 2016 Mesosphere, Inc. All Rights Reserved.
THANK YOU!
94
1 of 94

Recommended

DOD 2016 - Jörg Schad - Nobody Puts Java in the Conainer by
DOD 2016 - Jörg Schad - Nobody Puts Java in the ConainerDOD 2016 - Jörg Schad - Nobody Puts Java in the Conainer
DOD 2016 - Jörg Schad - Nobody Puts Java in the ConainerPROIDEA
130 views41 slides
Disaster recovery of OpenStack Cinder using DRBD by
Disaster recovery of OpenStack Cinder using DRBDDisaster recovery of OpenStack Cinder using DRBD
Disaster recovery of OpenStack Cinder using DRBDViswesuwara Nathan
1.9K views15 slides
Ha opensuse by
Ha opensuseHa opensuse
Ha opensuseKenny (netman)
1K views20 slides
Building android for the Cloud: Android as a Server (AnDevConBoston 2014) by
Building android for the Cloud: Android as a Server (AnDevConBoston 2014)Building android for the Cloud: Android as a Server (AnDevConBoston 2014)
Building android for the Cloud: Android as a Server (AnDevConBoston 2014)Ron Munitz
503 views46 slides
NetBSDworkshop by
NetBSDworkshopNetBSDworkshop
NetBSDworkshopJun Ebihara
844 views13 slides
Docker Forensics by
Docker ForensicsDocker Forensics
Docker ForensicsJoel Lathrop
1.4K views26 slides

More Related Content

What's hot

Hacking with ARM Mobile devices on Linux by
Hacking with ARM Mobile devices on LinuxHacking with ARM Mobile devices on Linux
Hacking with ARM Mobile devices on LinuxNetwalker lab kapper
14.5K views50 slides
DEF CON 23 - Shawn webb - hardenedBSD internals by
DEF CON 23 - Shawn webb - hardenedBSD internalsDEF CON 23 - Shawn webb - hardenedBSD internals
DEF CON 23 - Shawn webb - hardenedBSD internalsFelipe Prado
59 views30 slides
Cluster filesystems by
Cluster filesystemsCluster filesystems
Cluster filesystemsMarian Marinov
861 views30 slides
Trying and evaluating the new features of GlusterFS 3.5 by
Trying and evaluating the new features of GlusterFS 3.5Trying and evaluating the new features of GlusterFS 3.5
Trying and evaluating the new features of GlusterFS 3.5Keisuke Takahashi
6.7K views87 slides
OpenNebula Conf 2014 | Using Ceph to provide scalable storage for OpenNebula ... by
OpenNebula Conf 2014 | Using Ceph to provide scalable storage for OpenNebula ...OpenNebula Conf 2014 | Using Ceph to provide scalable storage for OpenNebula ...
OpenNebula Conf 2014 | Using Ceph to provide scalable storage for OpenNebula ...NETWAYS
1.1K views59 slides
pkgsrc on SmartOS by
pkgsrc on SmartOSpkgsrc on SmartOS
pkgsrc on SmartOSjonperkin
6.7K views26 slides

What's hot(20)

DEF CON 23 - Shawn webb - hardenedBSD internals by Felipe Prado
DEF CON 23 - Shawn webb - hardenedBSD internalsDEF CON 23 - Shawn webb - hardenedBSD internals
DEF CON 23 - Shawn webb - hardenedBSD internals
Felipe Prado59 views
Trying and evaluating the new features of GlusterFS 3.5 by Keisuke Takahashi
Trying and evaluating the new features of GlusterFS 3.5Trying and evaluating the new features of GlusterFS 3.5
Trying and evaluating the new features of GlusterFS 3.5
Keisuke Takahashi6.7K views
OpenNebula Conf 2014 | Using Ceph to provide scalable storage for OpenNebula ... by NETWAYS
OpenNebula Conf 2014 | Using Ceph to provide scalable storage for OpenNebula ...OpenNebula Conf 2014 | Using Ceph to provide scalable storage for OpenNebula ...
OpenNebula Conf 2014 | Using Ceph to provide scalable storage for OpenNebula ...
NETWAYS1.1K views
pkgsrc on SmartOS by jonperkin
pkgsrc on SmartOSpkgsrc on SmartOS
pkgsrc on SmartOS
jonperkin6.7K views
Keeping OpenStack storage trendy with Ceph and containers by Sage Weil
Keeping OpenStack storage trendy with Ceph and containersKeeping OpenStack storage trendy with Ceph and containers
Keeping OpenStack storage trendy with Ceph and containers
Sage Weil7.2K views
延伸Linux关键业务到双活高速NVMe-oF存储-OpenInfraDays-China2018 by Roger Zhou 周志强
延伸Linux关键业务到双活高速NVMe-oF存储-OpenInfraDays-China2018延伸Linux关键业务到双活高速NVMe-oF存储-OpenInfraDays-China2018
延伸Linux关键业务到双活高速NVMe-oF存储-OpenInfraDays-China2018
GlusterFS CTDB Integration by Etsuji Nakai
GlusterFS CTDB IntegrationGlusterFS CTDB Integration
GlusterFS CTDB Integration
Etsuji Nakai8.8K views
2019-09-25 Paris Time Series Meetup - Warp 10 - Advanced Time Series Technolo... by Mathias Herberts
2019-09-25 Paris Time Series Meetup - Warp 10 - Advanced Time Series Technolo...2019-09-25 Paris Time Series Meetup - Warp 10 - Advanced Time Series Technolo...
2019-09-25 Paris Time Series Meetup - Warp 10 - Advanced Time Series Technolo...
Mathias Herberts198 views
Performance optimization for all flash based on aarch64 v2.0 by Ceph Community
Performance optimization for all flash based on aarch64 v2.0Performance optimization for all flash based on aarch64 v2.0
Performance optimization for all flash based on aarch64 v2.0
Ceph Community 253 views
DOXLON November 2016: Facebook Engineering on cgroupv2 by Outlyer
DOXLON November 2016: Facebook Engineering on cgroupv2DOXLON November 2016: Facebook Engineering on cgroupv2
DOXLON November 2016: Facebook Engineering on cgroupv2
Outlyer1.2K views
Running Docker with OpenStack | Docker workshop #1 by dotCloud
Running Docker with OpenStack | Docker workshop #1Running Docker with OpenStack | Docker workshop #1
Running Docker with OpenStack | Docker workshop #1
dotCloud17.3K views
2009-06-18 CAVMEN System z Users Group Update by Shawn Wells
2009-06-18 CAVMEN System z Users Group Update2009-06-18 CAVMEN System z Users Group Update
2009-06-18 CAVMEN System z Users Group Update
Shawn Wells50 views
Ceph Day Bring Ceph To Enterprise by Alex Lau
Ceph Day Bring Ceph To EnterpriseCeph Day Bring Ceph To Enterprise
Ceph Day Bring Ceph To Enterprise
Alex Lau1.1K views

Viewers also liked

Rev william haynes by
Rev william haynesRev william haynes
Rev william hayneswinweb67
884 views4 slides
Dimension Data Cloud Business Unit - Solution Offering by
Dimension Data Cloud Business Unit - Solution OfferingDimension Data Cloud Business Unit - Solution Offering
Dimension Data Cloud Business Unit - Solution OfferingRifaHaryadi
3.5K views47 slides
APIs Are Forever - How to Design Long-Lasting APIs by
APIs Are Forever - How to Design Long-Lasting APIsAPIs Are Forever - How to Design Long-Lasting APIs
APIs Are Forever - How to Design Long-Lasting APIsLaunchAny
8.6K views33 slides
Shared information systems by
Shared information systemsShared information systems
Shared information systemsHimanshu
2.7K views29 slides
Analysis and research of system security based on android by
Analysis and research of system security based on androidAnalysis and research of system security based on android
Analysis and research of system security based on androidRavishankar Kumar
3.5K views35 slides
Cgroup resource mgmt_v1 by
Cgroup resource mgmt_v1Cgroup resource mgmt_v1
Cgroup resource mgmt_v1sprdd
996 views27 slides

Viewers also liked(12)

Rev william haynes by winweb67
Rev william haynesRev william haynes
Rev william haynes
winweb67884 views
Dimension Data Cloud Business Unit - Solution Offering by RifaHaryadi
Dimension Data Cloud Business Unit - Solution OfferingDimension Data Cloud Business Unit - Solution Offering
Dimension Data Cloud Business Unit - Solution Offering
RifaHaryadi3.5K views
APIs Are Forever - How to Design Long-Lasting APIs by LaunchAny
APIs Are Forever - How to Design Long-Lasting APIsAPIs Are Forever - How to Design Long-Lasting APIs
APIs Are Forever - How to Design Long-Lasting APIs
LaunchAny8.6K views
Shared information systems by Himanshu
Shared information systemsShared information systems
Shared information systems
Himanshu 2.7K views
Analysis and research of system security based on android by Ravishankar Kumar
Analysis and research of system security based on androidAnalysis and research of system security based on android
Analysis and research of system security based on android
Ravishankar Kumar3.5K views
Cgroup resource mgmt_v1 by sprdd
Cgroup resource mgmt_v1Cgroup resource mgmt_v1
Cgroup resource mgmt_v1
sprdd996 views
Linux container, namespaces & CGroup. by Neeraj Shrimali
Linux container, namespaces & CGroup. Linux container, namespaces & CGroup.
Linux container, namespaces & CGroup.
Neeraj Shrimali896 views
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required" by Daniel Bryant
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
Daniel Bryant21.1K views
Cassandra and Docker Lessons Learned by DataStax Academy
Cassandra and Docker Lessons LearnedCassandra and Docker Lessons Learned
Cassandra and Docker Lessons Learned
DataStax Academy40.3K views
Prometheus: From Berlin to Bonanza (Keynote CloudNativeCon+Kubecon Europe 2017) by Brian Brazil
Prometheus:  From Berlin to Bonanza (Keynote CloudNativeCon+Kubecon Europe 2017)Prometheus:  From Berlin to Bonanza (Keynote CloudNativeCon+Kubecon Europe 2017)
Prometheus: From Berlin to Bonanza (Keynote CloudNativeCon+Kubecon Europe 2017)
Brian Brazil1.1K views
Microservices Architecture for MEAN Applications using Serverless AWS by Mitoc Group
Microservices Architecture for MEAN Applications using Serverless AWSMicroservices Architecture for MEAN Applications using Serverless AWS
Microservices Architecture for MEAN Applications using Serverless AWS
Mitoc Group3.7K views

Similar to No one puts java in the container

Spark Summit EU talk by Jorg Schad by
Spark Summit EU talk by Jorg SchadSpark Summit EU talk by Jorg Schad
Spark Summit EU talk by Jorg SchadSpark Summit
848 views45 slides
Jörg Schad - NO ONE PUTS Java IN THE CONTAINER - Codemotion Milan 2017 by
Jörg Schad - NO ONE PUTS Java IN THE CONTAINER - Codemotion Milan 2017Jörg Schad - NO ONE PUTS Java IN THE CONTAINER - Codemotion Milan 2017
Jörg Schad - NO ONE PUTS Java IN THE CONTAINER - Codemotion Milan 2017Codemotion
692 views43 slides
DRBD + OpenStack (Openstack Live Prague 2016) by
DRBD + OpenStack (Openstack Live Prague 2016)DRBD + OpenStack (Openstack Live Prague 2016)
DRBD + OpenStack (Openstack Live Prague 2016)Jaroslav Jacjuk
2K views47 slides
Lying, Cheating, and Winning with Containers in Networking by
Lying, Cheating, and Winning with Containers in NetworkingLying, Cheating, and Winning with Containers in Networking
Lying, Cheating, and Winning with Containers in NetworkingSargun Dhillon
1.8K views107 slides
BlackStor - World's fastest & most reliable Cloud Native Software Defined Sto... by
BlackStor - World's fastest & most reliable Cloud Native Software Defined Sto...BlackStor - World's fastest & most reliable Cloud Native Software Defined Sto...
BlackStor - World's fastest & most reliable Cloud Native Software Defined Sto...Michal Němec
1.3K views61 slides
Webinar: Nightmares of a Container Orchestration System - Jorg Schad by
Webinar: Nightmares of a Container Orchestration System - Jorg SchadWebinar: Nightmares of a Container Orchestration System - Jorg Schad
Webinar: Nightmares of a Container Orchestration System - Jorg SchadCodemotion
238 views51 slides

Similar to No one puts java in the container(20)

Spark Summit EU talk by Jorg Schad by Spark Summit
Spark Summit EU talk by Jorg SchadSpark Summit EU talk by Jorg Schad
Spark Summit EU talk by Jorg Schad
Spark Summit848 views
Jörg Schad - NO ONE PUTS Java IN THE CONTAINER - Codemotion Milan 2017 by Codemotion
Jörg Schad - NO ONE PUTS Java IN THE CONTAINER - Codemotion Milan 2017Jörg Schad - NO ONE PUTS Java IN THE CONTAINER - Codemotion Milan 2017
Jörg Schad - NO ONE PUTS Java IN THE CONTAINER - Codemotion Milan 2017
Codemotion692 views
DRBD + OpenStack (Openstack Live Prague 2016) by Jaroslav Jacjuk
DRBD + OpenStack (Openstack Live Prague 2016)DRBD + OpenStack (Openstack Live Prague 2016)
DRBD + OpenStack (Openstack Live Prague 2016)
Jaroslav Jacjuk2K views
Lying, Cheating, and Winning with Containers in Networking by Sargun Dhillon
Lying, Cheating, and Winning with Containers in NetworkingLying, Cheating, and Winning with Containers in Networking
Lying, Cheating, and Winning with Containers in Networking
Sargun Dhillon1.8K views
BlackStor - World's fastest & most reliable Cloud Native Software Defined Sto... by Michal Němec
BlackStor - World's fastest & most reliable Cloud Native Software Defined Sto...BlackStor - World's fastest & most reliable Cloud Native Software Defined Sto...
BlackStor - World's fastest & most reliable Cloud Native Software Defined Sto...
Michal Němec1.3K views
Webinar: Nightmares of a Container Orchestration System - Jorg Schad by Codemotion
Webinar: Nightmares of a Container Orchestration System - Jorg SchadWebinar: Nightmares of a Container Orchestration System - Jorg Schad
Webinar: Nightmares of a Container Orchestration System - Jorg Schad
Codemotion238 views
Webinar - Nightmares of a Container Orchestration System - Jorg Schad by Codemotion
Webinar - Nightmares of a Container Orchestration System - Jorg SchadWebinar - Nightmares of a Container Orchestration System - Jorg Schad
Webinar - Nightmares of a Container Orchestration System - Jorg Schad
Codemotion21 views
Downtime is not an option - day 2 operations - Jörg Schad by Codemotion
Downtime is not an option - day 2 operations -  Jörg SchadDowntime is not an option - day 2 operations -  Jörg Schad
Downtime is not an option - day 2 operations - Jörg Schad
Codemotion544 views
Dealing with kubesprawl tetris style ! by Taco Scargo
Dealing with kubesprawl   tetris style !Dealing with kubesprawl   tetris style !
Dealing with kubesprawl tetris style !
Taco Scargo147 views
Building the Glue for Service Discovery & Load Balancing Microservices by Sargun Dhillon
Building the Glue for Service Discovery & Load Balancing MicroservicesBuilding the Glue for Service Discovery & Load Balancing Microservices
Building the Glue for Service Discovery & Load Balancing Microservices
Sargun Dhillon1.6K views
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space? by ArangoDB Database
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
ArangoDB Database1.7K views
Production Plone on OpenStack Cloud by Serg Melikyan
Production Plone on OpenStack CloudProduction Plone on OpenStack Cloud
Production Plone on OpenStack Cloud
Serg Melikyan476 views
DCOS Presentation by Jan Repnak
DCOS PresentationDCOS Presentation
DCOS Presentation
Jan Repnak3.1K views
Tackling non-determinism in Hadoop - Testing and debugging distributed system... by Akihiro Suda
Tackling non-determinism in Hadoop - Testing and debugging distributed system...Tackling non-determinism in Hadoop - Testing and debugging distributed system...
Tackling non-determinism in Hadoop - Testing and debugging distributed system...
Akihiro Suda2.4K views
Highly efficient container orchestration and continuous delivery with DC/OS a... by Christian Bogeberg
Highly efficient container orchestration and continuous delivery with DC/OS a...Highly efficient container orchestration and continuous delivery with DC/OS a...
Highly efficient container orchestration and continuous delivery with DC/OS a...
Christian Bogeberg279 views
Webinar: OpenEBS - Still Free and now FASTEST Kubernetes storage by MayaData Inc
Webinar: OpenEBS - Still Free and now FASTEST Kubernetes storageWebinar: OpenEBS - Still Free and now FASTEST Kubernetes storage
Webinar: OpenEBS - Still Free and now FASTEST Kubernetes storage
MayaData Inc525 views
Why kernelspace sucks? by OpenFest team
Why kernelspace sucks?Why kernelspace sucks?
Why kernelspace sucks?
OpenFest team1.7K views
Flink Forward San Francisco 2018: Jörg Schad and Biswajit Das - "Operating Fl... by Flink Forward
Flink Forward San Francisco 2018: Jörg Schad and Biswajit Das - "Operating Fl...Flink Forward San Francisco 2018: Jörg Schad and Biswajit Das - "Operating Fl...
Flink Forward San Francisco 2018: Jörg Schad and Biswajit Das - "Operating Fl...
Flink Forward1K views

Recently uploaded

Quality Engineer: A Day in the Life by
Quality Engineer: A Day in the LifeQuality Engineer: A Day in the Life
Quality Engineer: A Day in the LifeJohn Valentino
6 views18 slides
Keep by
KeepKeep
KeepGeniusee
75 views10 slides
Sprint 226 by
Sprint 226Sprint 226
Sprint 226ManageIQ
5 views18 slides
Advanced API Mocking Techniques by
Advanced API Mocking TechniquesAdvanced API Mocking Techniques
Advanced API Mocking TechniquesDimpy Adhikary
19 views11 slides
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko... by
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...Deltares
14 views23 slides
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J... by
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...Deltares
9 views24 slides

Recently uploaded(20)

Quality Engineer: A Day in the Life by John Valentino
Quality Engineer: A Day in the LifeQuality Engineer: A Day in the Life
Quality Engineer: A Day in the Life
John Valentino6 views
Sprint 226 by ManageIQ
Sprint 226Sprint 226
Sprint 226
ManageIQ5 views
Advanced API Mocking Techniques by Dimpy Adhikary
Advanced API Mocking TechniquesAdvanced API Mocking Techniques
Advanced API Mocking Techniques
Dimpy Adhikary19 views
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko... by Deltares
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...
Deltares14 views
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J... by Deltares
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
Deltares9 views
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated... by TomHalpin9
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...
TomHalpin96 views
DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -... by Deltares
DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -...DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -...
DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -...
Deltares6 views
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx by animuscrm
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
animuscrm14 views
DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the... by Deltares
DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the...DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the...
DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the...
Deltares6 views
Software evolution understanding: Automatic extraction of software identifier... by Ra'Fat Al-Msie'deen
Software evolution understanding: Automatic extraction of software identifier...Software evolution understanding: Automatic extraction of software identifier...
Software evolution understanding: Automatic extraction of software identifier...
DSD-INT 2023 Thermobaricity in 3D DCSM-FM - taking pressure into account in t... by Deltares
DSD-INT 2023 Thermobaricity in 3D DCSM-FM - taking pressure into account in t...DSD-INT 2023 Thermobaricity in 3D DCSM-FM - taking pressure into account in t...
DSD-INT 2023 Thermobaricity in 3D DCSM-FM - taking pressure into account in t...
Deltares9 views
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols by Deltares
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - DolsDSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols
Deltares7 views
DSD-INT 2023 Exploring flash flood hazard reduction in arid regions using a h... by Deltares
DSD-INT 2023 Exploring flash flood hazard reduction in arid regions using a h...DSD-INT 2023 Exploring flash flood hazard reduction in arid regions using a h...
DSD-INT 2023 Exploring flash flood hazard reduction in arid regions using a h...
Deltares5 views

No one puts java in the container

  • 1. © 2016 Mesosphere, Inc. All Rights Reserved. 1 No one puts Java in the Container MesosCon 2016 – Ken Sipe
  • 2. © 2016 Mesosphere, Inc. All Rights Reserved. 2 Ken Sipe Distribute Application Engineer Apache Mesos Contributor Apache Committer Myriad, Open DCOS Developer: Embedded, C++, Java, Groovy, Grails, C#, GoLang @KenSipe
  • 3. © 2016 Mesosphere, Inc. All Rights Reserved. 3 Patrick Swayze Actor and Dancer Red Dawn, Dirty Dancing , Roadhouse and Ghost @patrickswayze09 and @patrick_swayze
  • 4. © 2016 Mesosphere, Inc. All Rights Reserved. 4
  • 5. © 2016 Mesosphere, Inc. All Rights Reserved. 5
  • 6. © 2016 Mesosphere, Inc. All Rights Reserved. 6 Dev
  • 7. © 2016 Mesosphere, Inc. All Rights Reserved. 7 Ops
  • 8. © 2016 Mesosphere, Inc. All Rights Reserved. 8 ●What is a Container ●The Heart of Container (CGROUPS / NameSpaces) ●Java Mem / CPU ●Java in a Container Agenda
  • 9. © 2016 Mesosphere, Inc. All Rights Reserved. 9 Does Java fit in a container?
  • 10. © 2016 Mesosphere, Inc. All Rights Reserved. 10 Ops
  • 11. © 2016 Mesosphere, Inc. All Rights Reserved. 11 Containers
  • 12. © 2016 Mesosphere, Inc. All Rights Reserved. 12 Container
  • 13. © 2016 Mesosphere, Inc. All Rights Reserved. 13 Write Once Run Any Where
  • 14. © 2016 Mesosphere, Inc. All Rights Reserved. 14 ●I can get a shell on it (through SSH or otherwise) ●It "feels" like a VM: ●own process space ●own network interface ●can install packages ●can run services High level: it's a lightweight VM
  • 15. © 2016 Mesosphere, Inc. All Rights Reserved. 15 HARDWARE VIRTUALIZATION 1966-1972 IBM CP/CMS 1989 Insignia SoftPC 1997 Connectix VirtualPC 1999 VMWare Workstation 2001 IBM AIX LPAR 2002 Xen 2006 Amazon EC2 2007 Sun Logical Domains 2007 Linux KVM 2007 InnoTek VirtualBox 2008 Microsoft Hyper-V
  • 16. © 2016 Mesosphere, Inc. All Rights Reserved. 16 Container
  • 17. © 2016 Mesosphere, Inc. All Rights Reserved. 17 ●It's not quite like a VM: uses the host kernel
 can't boot a different OS ●It's just a bunch of processes visible on the host machine ●(contrast with VMs which are opaque) Low level: it's chroot on steroids
  • 18. © 2016 Mesosphere, Inc. All Rights Reserved. 18 PROCESS VIRTUALIZATION 1979-1982 UNIX Chroot 1998 FreeBSD Jail 2001 Parallels Virtuozzo 2001 Linux-VServer 2005 Solaris Zones 2005 OpenVZ 2008 Linux LXC 2007+ PAAS: Heroku, Joyent, CloudFoundry 2013 Docker
  • 19. © 2016 Mesosphere, Inc. All Rights Reserved. 19 What’s the difference between containers and virtual machines?
  • 20. © 2016 Mesosphere, Inc. All Rights Reserved. 20 Containers vs Virtual Machines
  • 21. © 2016 Mesosphere, Inc. All Rights Reserved. 21 ●Weaker isolation in containers ●Containers run near-native speed CPU/IO ●Containers launch in around 0.1 second (libcontainer) ●Less memory overhead Differences between containers and virtual machines
  • 22. © 2016 Mesosphere, Inc. All Rights Reserved. 22
  • 23. © 2016 Mesosphere, Inc. All Rights Reserved. 23 (LINUX) KERNEL LAYER FS CGROUPS NAMESPACES LIBCONTAINER DOCKER
  • 24. © 2016 Mesosphere, Inc. All Rights Reserved. 24 Namespaces provide isolation: • pid (processes) • net (network interfaces, routing...) • ipc (System V IPC) • mnt (mount points, filesystems) • uts (hostname) • user (UIDs) Control groups control resources: • cpu (CPU shares) • cpuacct • cpuset (limit processes to a CPU) • memory (swap, dirty pages) • blkio (throttle reads/writes) • devices • net_cls, net_prio: control packet class and priority • freezer NAMESPACES VS. Cgroups
  • 25. © 2016 Mesosphere, Inc. All Rights Reserved. 25 Control Groups
  • 26. © 2016 Mesosphere, Inc. All Rights Reserved. 26 ●Resource metering and limiting ●memory ●CPU ●block I/O ●network* ●Device node (/dev/*) access control ●freezer Control groups
  • 27. © 2016 Mesosphere, Inc. All Rights Reserved. 27 • /sys/fs/cgroup • Each subsystem (memory, CPU...) has a hierarchy (tree) •Each process belongs to exactly 1 node in each hierarchy •Each hierarchy starts with 1 node (the root) •Each node = group of processes (sharing the same resources) Control groups - Generalities
  • 28. © 2016 Mesosphere, Inc. All Rights Reserved. 28 View on DCOS on CoreOS
  • 29. © 2016 Mesosphere, Inc. All Rights Reserved. 29 cpu/ !"" batch #   !"" bitcoins #   #   %"" 42 #   %"" hadoop #   !"" 210 #   %"" 98 %"" realtime !"" nginx #   !"" 21 #   !"" 22 #   %"" 23 !"" postgres #   %"" 404 %"" redis %"" 2343 memory/ !"" 21 !"" 210 !"" 22 !"" 23 !"" 42 !"" 98 %"" databases !"" 2343 %"" 404
  • 30. © 2016 Mesosphere, Inc. All Rights Reserved. 30 ●Metrics: swap, total rss, # pages in/out ●Keeps track of pages used by each group: ●file (read/write/mmap from block devices) ●anonymous (stack, heap, anonymous mmap) ●active (recently accessed) ●inactive (candidate for eviction) Memory cgroup: accounting
  • 31. © 2016 Mesosphere, Inc. All Rights Reserved. 31 •Each group can have hard and soft limits •Soft limits are not enforced •Hard limits will trigger a per-group OOM killer •Limits can be set for physical, kernel, total memory Memory cgroup: limits docker run -it --rm -m 128m fedora bash
  • 32. © 2016 Mesosphere, Inc. All Rights Reserved. 32 ●Mar 10 17:42:39 ip-10-0-1-114.us-west-2.compute.internal mesos-slave[1190]: I0310 17:42:39.848748  1199 status_update_manager.cpp:824] Checkpointing ACK for status update TASK_RUNNING (UUID: 8d13fbb9-b02a-45da-9b52-5393ce8f0746) for task task.datanode.datanode1.1457631756250 of framework d83631ed-34 ●Mar 10 17:42:41 ip-10-0-1-114.us-west-2.compute.internal mesos-slave[1190]: I0310 17:42:41.561954  1200 mem.cpp:625] OOM notifier is triggered for container 6461cafd-3962-4022-a070- f6e26488dd94 ●Mar 10 17:42:41 ip-10-0-1-114.us-west-2.compute.internal mesos-slave[1190]: I0310 17:42:41.562047  1200 mem.cpp:644] OOM detected for container 6461cafd-3962-4022-a070-f6e26488dd94 ●Mar 10 17:42:41 ip-10-0-1-114.us-west-2.compute.internal mesos-slave[1190]: I0310 17:42:41.566249  1200 mem.cpp:685] Memory limit exceeded: Requested: 2080MB Maximum Used: 2080MB journalctl -f _TRANSPORT=kernel
  • 33. © 2016 Mesosphere, Inc. All Rights Reserved. 33 ●Metrics: cpuacct.stats user | system ●Allows to set weights ●Limitations based on type ●Options: ●CPU Shares ●CPU Sets Cpu cgroup
  • 34. © 2016 Mesosphere, Inc. All Rights Reserved. 34 ●Priority Weighting across all the cores ●default value is 1024 CPU Shares docker run -it --rm -c 512 stress …
  • 35. © 2016 Mesosphere, Inc. All Rights Reserved. 35 ●sudo cgcreate -g cpu:A ●sudo cgcreate -g cpu:B ●cgroup A: sudo cgset -r cpu.shares=768 A 75% ●cgroup B: sudo cgset -r cpu.shares=256 B 25% CPU Shares
  • 36. © 2016 Mesosphere, Inc. All Rights Reserved. 36 ●Pin groups to specific CPU(s) ●Reserve CPUs for specific apps ●Avoid processes bouncing between CPUs ●Also relevant for NUMA systems CPU Sets docker run -it -cpuset=0,4,6 stress
  • 37. © 2016 Mesosphere, Inc. All Rights Reserved. 37 ●Limit: Bandwidth limits R/W, async / sync ●Limit: Weighted 10 10 1000 ●Metrics: iops served, waiting and queued Blkio cgroup
  • 38. © 2016 Mesosphere, Inc. All Rights Reserved. 38 ●Controls what the group can do on device nodes ●Permissions include read/write/mknod ●Typical use: ●allow /dev/{ty,zero,random,nul}... ●deny everything else ●A few interesting nodes: ●/dev/net/tun(network interface manipulation) ●/dev/fuse(filesystems in user space) ●/dev/kvm(VMs in containers, yay inception!) ●/dev/dri(GPU) Devices cgroup
  • 39. © 2016 Mesosphere, Inc. All Rights Reserved. 39 ●When a process is created, it is placed in the same groups as its parent ●Groups are materialized by one (or multiple) pseudo-fs (typically mounted in /sys/fs/ cgroup) Cgroup: More info
  • 40. © 2016 Mesosphere, Inc. All Rights Reserved. core@ip-10-0-2-26 ~ $ systemd-cgls memory memory: ├─1 /usr/lib/systemd/systemd --switched-root --system --deserialize 12 ├─mesos │ ├─slave │ │ ├─ 1300 /opt/mesosphere/packages/mesos--1eb02db6541da1a30af9fcbd9dc8e492351b8716/bin/mesos-slave │ │ ├─ 9640 mesos-logrotate-logger --help=false --log_filename=/var/lib/mesos/slave/slaves/77f7bbfb-5c51-42a1-8f90-28740c68450d-S0/ frameworks/77f7bbfb-5c51-42a1-8f90-28740c68450d-0000/executors/sleep.3df1f8e0-276f-11e6-b │ │ ├─ 9641 mesos-logrotate-logger --help=false --log_filename=/var/lib/mesos/slave/slaves/77f7bbfb-5c51-42a1-8f90-28740c68450d-S0/ frameworks/77f7bbfb-5c51-42a1-8f90-28740c68450d-0000/executors/sleep.3df1f8e0-276f-11e6-b │ │ ├─10625 mesos-logrotate-logger --help=false --log_filename=/var/lib/mesos/slave/slaves/77f7bbfb-5c51-42a1-8f90-28740c68450d-S0/ frameworks/77f7bbfb-5c51-42a1-8f90-28740c68450d-0000/executors/docker-sleep.2d2504c1-2770 │ │ ├─10626 mesos-logrotate-logger --help=false --log_filename=/var/lib/mesos/slave/slaves/77f7bbfb-5c51-42a1-8f90-28740c68450d-S0/ frameworks/77f7bbfb-5c51-42a1-8f90-28740c68450d-0000/executors/docker-sleep.2d2504c1-2770 │ │ ├─10627 mesos-docker-executor --container=mesos-77f7bbfb-5c51-42a1-8f90-28740c68450d-S0.a0c1787b-3cd4-4b4a-aa47-87b01036130f -- docker=docker --docker_socket=/var/run/docker.sock --help=false --launcher_dir=/opt/mesos │ │ ├─10659 docker -H unix:///var/run/docker.sock run --cpu-shares 1024 --memory 134217728 -e MARATHON_APP_VERSION=2016-05-31T20:42:22.763Z -e HOST=10.0.2.26 -e MARATHON_APP_RESOURCE_CPUS=1.0 -e MARATHON_APP_DOCKER_IMAGE │ │ ├─14772 mesos-logrotate-logger --help=false --log_filename=/var/lib/mesos/slave/slaves/77f7bbfb-5c51-42a1-8f90-28740c68450d-S0/ frameworks/77f7bbfb-5c51-42a1-8f90-28740c68450d-0000/executors/hdfs.6a7079c3-2841-11e6-b4 │ │ ├─14773 mesos-logrotate-logger --help=false --log_filename=/var/lib/mesos/slave/slaves/77f7bbfb-5c51-42a1-8f90-28740c68450d-S0/ frameworks/77f7bbfb-5c51-42a1-8f90-28740c68450d-0000/executors/hdfs.6a7079c3-2841-11e6-b4 │ │ ├─17369 mesos-logrotate-logger --help=false --log_filename=/var/lib/mesos/slave/slaves/77f7bbfb-5c51-42a1-8f90-28740c68450d-S0/ frameworks/77f7bbfb-5c51-42a1-8f90-28740c68450d-0001/executors/task.journalnode.journalno │ │ └─17370 mesos-logrotate-logger --help=false --log_filename=/var/lib/mesos/slave/slaves/77f7bbfb-5c51-42a1-8f90-28740c68450d-S0/ frameworks/77f7bbfb-5c51-42a1-8f90-28740c68450d-0001/executors/task.journalnode.journalno │ ├─5c4cde35-f267-4a67-9b31-72b6fa77dec0 │ │ ├─ 9642 /opt/mesosphere/packages/mesos--1eb02db6541da1a30af9fcbd9dc8e492351b8716/libexec/mesos/mesos-executor │ │ ├─ 9674 sh -c while :; do echo "sandbox: $PWD"; sleep 120; done │ │ └─14634 sleep 120 40 SystemD CGLS
  • 41. © 2016 Mesosphere, Inc. All Rights Reserved. 41 /proc/<pid>/cgroup core@ip-10-0-2-26 ~ $ cat /proc/9674/cgroup 9:freezer:/mesos/5c4cde35-f267-4a67-9b31-72b6fa77dec0 8:devices:/system.slice/dcos-mesos-slave.service 7:blkio:/system.slice/dcos-mesos-slave.service 6:net_cls,net_prio:/ 5:cpu,cpuacct:/mesos/5c4cde35-f267-4a67-9b31-72b6fa77dec0 4:cpuset:/ 3:perf_event:/ 2:memory:/mesos/5c4cde35-f267-4a67-9b31-72b6fa77dec0 1:name=systemd:/mesos_executors.slice
  • 42. © 2016 Mesosphere, Inc. All Rights Reserved. 42 systemd-cgtop
  • 43. © 2016 Mesosphere, Inc. All Rights Reserved. 43 ●You can find all the information about the CPU for a specific container under /sys/fs/ cgroup/cpu/system.slice/docker-$FULL_CONTAINER_ID.scope/, for example: ●$ ls /sys/fs/cgroup/cpu/system.slice/ docker-6935854d444d78abe52d629cb9d680334751a0cda82e11d2610e041d77a62b3f.scope/ cgroup.clone_children cpuacct.usage_percpu cpu.rt_runtime_us tasks cgroup.procs cpu.cfs_period_us cpu.shares cpuacct.stat cpu.cfs_quota_us cpu.stat cpuacct.usage cpu.rt_period_us notify_on_release CGroup + Docker
  • 44. © 2016 Mesosphere, Inc. All Rights Reserved. 44 Namespaces
  • 45. © 2016 Mesosphere, Inc. All Rights Reserved. 45 ●Provide processes with their own view of the system ●Cgroups = limits how much you can use;
 namespaces = limits what you can see (and therefore use) ●Multiple namespaces: ●pid, net, mnt, uts, ipc, user ●Each process is in one namespace of each type Namespaces
  • 46. © 2016 Mesosphere, Inc. All Rights Reserved. 46 ●Processes within a PID namespace only see processes in the same PID namespace ●Each PID namespace has its own numbering (starting at 1) ●When PID 1 goes away, the whole namespace is killed Pid namespace
  • 47. © 2016 Mesosphere, Inc. All Rights Reserved. 47 ●Mounts ●read-only ●shared - share subsequent mounts in a shared mount ●slave - only source can share with target but target mounts are private ●private - non-sharing of subsequent mounts in a shared mount Mnt namespace
  • 48. © 2016 Mesosphere, Inc. All Rights Reserved. 48 ●Mount RO /usr ●Private /tmp Typical Container Uses of MNT
  • 49. © 2016 Mesosphere, Inc. All Rights Reserved. 49 ●Processes within a given network namespace get their own private network stack, including: ●network interfaces (including lo) ●routing tables ●iptables rules ●sockets (s, netstat) net namespace
  • 50. © 2016 Mesosphere, Inc. All Rights Reserved. 50 ●Root namespace ●Bridging ●Private namespace with socket activation Typical Container Uses of NET
  • 51. © 2016 Mesosphere, Inc. All Rights Reserved. 51 ●gethostname ●sethostname uts namespace
  • 52. © 2016 Mesosphere, Inc. All Rights Reserved. 52 ●Allows a process (or group of processes) to have own: ●IPC semaphores ●IPC message queues ●IPC shared memory IPC namespace
  • 53. © 2016 Mesosphere, Inc. All Rights Reserved. 53 ●Allows to map UID/GID; e.g.: ●UID 0→1999 in container C1 is mapped to UID 10000→11999 on host
 UID 0→1999 in container C2 is mapped to UID 12000→13999 on host ●
 Avoids extra configuration in containers
 UID 0 (root) can be squashed to a non-privileged user User namespace
  • 54. © 2016 Mesosphere, Inc. All Rights Reserved. 54 ●Namespaces are created with the clone() system call (i.e. with extra flags when creating a new process) ●Namespaces are materialized by pseudo-files in ●/proc/<pid>/ns ●When the last process of a namespace exits, it is destroyed (but can be preserved by bind-mounting the pseudo-file) Namespace manipulation
  • 55. © 2016 Mesosphere, Inc. All Rights Reserved. 55 ●Can be used independently ●Use a few cgroups if you just need resource isolation ●Simulate a network of routers with network namespaces ●Put the debugger in a container's namespaces, but not its cgroups (to not use its resource quotas) ●Setup a network interface in an isolated environment, then move it to another cgroups and namespaces
  • 56. © 2016 Mesosphere, Inc. All Rights Reserved. 56 Containers
  • 57. © 2016 Mesosphere, Inc. All Rights Reserved. 57 ●Even when you don't run containers ... ●you are in a container You are always in a container
  • 58. © 2016 Mesosphere, Inc. All Rights Reserved. 58 ●Set of user-land tools ●A container is a directory in /var/lib/lxc ●Small config file + root filesystem ●Early versions had no support to move images around ●Requires significant amount of elbow grease (easy for sysadmins/ops, hard for devs) LXC
  • 59. © 2016 Mesosphere, Inc. All Rights Reserved. 59 ●Daemon controlled by REST(ish) API ●First versions shelled out to LXC, ●now uses its own lib container runtime ●Manages containers, images, builds, and more Docker Engine
  • 60. © 2016 Mesosphere, Inc. All Rights Reserved. 60 ●rkt, runC ●Focus on container execution
 (no API, no image management, no build, etc.) ●They implement different specifications: rkt implements appc (App Container) ●runC implements OCP (Open Container Project), leverages Docker's libcontainer ●Mesos Container Other Containers
  • 61. © 2016 Mesosphere, Inc. All Rights Reserved. 61 ●They all use the same kernel features ●Performance will be exactly the same Which container is right for you?
  • 62. © 2016 Mesosphere, Inc. All Rights Reserved. 62 Lets Talk Java
  • 63. © 2016 Mesosphere, Inc. All Rights Reserved. 63 ●Java Language + Java Specification + Java Runtime Java
  • 64. © 2016 Mesosphere, Inc. All Rights Reserved. 64 ●Memory ●JIT Optimizations ●Mode: client vs. server ●Thread Management ●GC Java Runtime Considerations
  • 65. © 2016 Mesosphere, Inc. All Rights Reserved. 65 ●Native JRE ●Heap ●Perm / meta ●JIT bytecode ●JNI ●NIO ●Threads Java Memory Impact on a Machine
  • 66. © 2016 Mesosphere, Inc. All Rights Reserved. 66 Java Memory -Xms / -Xmx Eden Old SpaceSS0 SS1
  • 67. © 2016 Mesosphere, Inc. All Rights Reserved. 67 Java Memory -XX:MaxPermSize Eden Old SpaceSS0 SS1 Perm Space
  • 68. © 2016 Mesosphere, Inc. All Rights Reserved. 68 Java Memory -XX:SurvivorRatio -XX:MaxNewSize -XX:NewRatio Eden Old SpaceSS0 SS1 Perm Space
  • 69. © 2016 Mesosphere, Inc. All Rights Reserved. 69
  • 70. © 2016 Mesosphere, Inc. All Rights Reserved. 70 Metaspace
  • 71. © 2016 Mesosphere, Inc. All Rights Reserved. 71 Congratulations!! Leaky classloaders now effect the entire machine (or the container)
  • 72. © 2016 Mesosphere, Inc. All Rights Reserved. 72 NIO with Native Memory Buffer
  • 73. © 2016 Mesosphere, Inc. All Rights Reserved. 73 ●Every thread in an application requires memory to store its stack ●Default sizes usually: 512K to 1024K / thread Threads
  • 74. © 2016 Mesosphere, Inc. All Rights Reserved. 74 ●JIT differences ●larger old spaces ●code cache (JRE 7) ●client = 32M ●server = 48M ●JRE8 = 96M client vs server mode
  • 75. © 2016 Mesosphere, Inc. All Rights Reserved. 75 ●Sets the default # threads for GC ●Initial value of the ForkJoin Pool Core / Process Counts -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 -XX:ParallelGCThreads -XX:ConcGCThreads
  • 76. © 2016 Mesosphere, Inc. All Rights Reserved. 76 ●JIT compiler threads ●HotSpot thresholds and optimizations ●Number of thread in the common fork-join pool ●and more… JRE initializations based on core count
  • 77. © 2016 Mesosphere, Inc. All Rights Reserved. 77 ●JIT Optimization ●Another Pause Opportunity ●Affected when the number of threads outnumbers the number of cores Time To Safe Point (TTSP)
  • 78. © 2016 Mesosphere, Inc. All Rights Reserved. 78 Bringing it together
  • 79. © 2016 Mesosphere, Inc. All Rights Reserved. 79 ●Memory limitations are naive and most be set Where Java Gets it’s Information
  • 80. © 2016 Mesosphere, Inc. All Rights Reserved. 80 ●JDK 7/8 - resources from sysconf sysconf(_SC_NPROCESSORS_ONLN); ●JDK 9 - sched_getaffinity ●accounts for cpusets Where Java Gets it’s CPU Information
  • 81. © 2016 Mesosphere, Inc. All Rights Reserved. 81 ●CPUSET ●pin to specific CPUs ●Runtime.getRuntime().availableProcessors(); == # cores assigned Java with CPU Set docker run -ti --cpuset=0,4,6 …
  • 82. © 2016 Mesosphere, Inc. All Rights Reserved. 82 ●CPU Share ●Priority Weighting across all the cores ●Runtime.getRuntime().availableProcessors(); == # cores on node Java with CPU Share docker run -ti -c 512 …
  • 83. © 2016 Mesosphere, Inc. All Rights Reserved. 83 ●Land on a 32 core box ●32 cores are seen by the JRE ●32 threads set by default for ForkJoinPool Java and CPU Shares
  • 84. © 2016 Mesosphere, Inc. All Rights Reserved. 84 ●“We resisted making the JVM resource pool aware on Solaris and that turned out to be a win because Zones became dominant. ●But now we face a similar problem with cgroups on Linux and environments like Docker. ●We were lucky that cpusets are reflected in the output of sched_getaffinity - a nice simple change.” Dr. David Holmes
  • 85. © 2016 Mesosphere, Inc. All Rights Reserved. 85 ●“But memory constraints are far more problematic and may not even be queryable in general. ●If there are no API's to tell the VM the real resource story what is the VM supposed to do? I don't have any answers to that.” ●“When the environment lies to the VM about what is available it makes it very hard for the VM to try to adjust.” Dr. David Holmes
  • 86. © 2016 Mesosphere, Inc. All Rights Reserved. 86 The JRE needs help
  • 87. © 2016 Mesosphere, Inc. All Rights Reserved. 87
  • 88. © 2016 Mesosphere, Inc. All Rights Reserved. 88 The Solution!!!
  • 89. © 2016 Mesosphere, Inc. All Rights Reserved. 89 The Solution!!!
  • 90. © 2016 Mesosphere, Inc. All Rights Reserved. 90 ●“The good thing about docker containers (and some other like containers) is that they don’t hide the underlying hardware from processes like VM technology does.” ●“The bad thing about docker containers (and some other like containers) is that they don’t hide the underlying hardware from processes like VM technology does.” Kirk Pepperdine
  • 91. © 2016 Mesosphere, Inc. All Rights Reserved. 91 ●We need a JDK Enhancement Proposal Call to action
  • 92. © 2016 Mesosphere, Inc. All Rights Reserved. 92 ●Java Memory ●Java Performance ●IBM: Thanks for the memory References http://www.ibm.com/developerworks/library/j-nativememory-linux/
  • 93. © 2016 Mesosphere, Inc. All Rights Reserved. 93 VISIT OUR BOOTH Located at D1, near the main entrance Learn more by visiting dcos.io and mesosphere.com
  • 94. © 2016 Mesosphere, Inc. All Rights Reserved. THANK YOU! 94