OSv is the new open source unikernel technology that combines the power of virtualization and micro-services architecture. This combination allows unmodified applications to be packaged just like Docker containers while at the same time outperform bare-metal deployments. Yes. You've heard it right: for the first time ever we can stop asking the question of how much performance would I lose if I virtualize. OSv lets you ask a different question: how much would my application gain in performance if I virtualize it. This talk will start by looking into the architecture of OSv and the kind of optimizations it makes possible for native, unmodified applications. We will then focus on JVM-specific optimizations and specifically on speedups available to micro-service oriented applications when they are being deployed on OSv.
11. Anatomy
of
a
μservice
Hardware
“Stuff”
[Java]
Virtual
Machine
μservice
code
12. How
are
we
doing
it
today?
Hardware
pkg1
[Java]
Virtual
Machine
μservice
code
pkgN
………….
“OS”
Linux
kernel
Puppet,
Chef
Huge
VM
image
13. Is
there
a
beber
way?
vHardware
Hardware
[Java]
Virtual
Machine
libFS,
libC,
libJVM
μservice
code
Applicacon-‐specific
stacc
linking
Tiny
VM
image
AKA
unikernel
Hardware-‐assisted
virtualizacon
14. What
the
heck
is
a
FOOkernel?
• What
OS
design
courses
have
taught
us?
– microkernels
vs.
monolithic
kernels
• What
did
they
lef
behind?
– exokernels,
nano
• What
they
should’ve
taught
us
instead:
– unikernels,
anykernels
15. Unikernels
• “Unikernels:
library
operacng
systems
for
the
cloud”
came
out
in
2013
• A
“library”
operacng
system
• A
kernel
that
can
only
support
one
process
16. Anykernels
• Programming
discipline
for
kernel
code
reuse
• “The
Design
and
Implementacon
of
the
Anykernel
and
Rump
Kernels”
by
A.
Kantee
• Capabilices
– NetBSD
filesystems
as
Linux
processes
– User-‐space
TCP/IP
stack
• Building
blocks
for…
any
kernels
17. OSv
from
Cloudius
Systems
• A
unikernel
for
“POSIX”
and
memory
managed
planorms
(JVM,
Go,
Lua)
• Anykernel’ish
– E.g.
ZFS
• Runs
on
top
of
KVM,
Xen,
VirtualBox,
VMWare
• Looks
like
an
app
to
the
host
OS
• Small,
fast
and
easy
to
manage
at
scale
18. OSv
manifesto
• Run
exiscng
Linux
applicacons
• Run
exiscng
Linux
applicacons
faster
• Make
boot
cme
~=
exec
cme
• Explore
APIs
beyond
POSIX
• Leverage
memory
managed
planorms
(JVM,
Go)
• Stay
open
19. What’s
inside?
single
address
space
in
“kernel
mode”
“kernel
threads”
“user
threads”
disk
ZFS
virco
C++
kernel
code
dynamic
linker
libjvm.so
ifconfig.so
TCP/IP
iface
20. Anything
it
can’t
do?
• A
100%
replacement
for
a
Linux
kernel
– No
fork()ing
• No
process
isolacon
• The
least
amount
of
device
drivers
ever
21. Virtualizacon
vs.
performance
• Network-‐intensive
apps:
– unmodified:
25%
gain
in
throughput
47%
decrease
in
latency
– non-‐POSIX
APIs
use
for
Memcached:
290%
increase
in
performance
• Compute-‐intensive
apps:
– YMMV
22. Van
Jacabson’s
net
channels
socket
TCP
IP
iface
socket
TCP
IP
iface
lock
lock
lock
Tradiconal
TCP/IP
stack
app
thread
kernel
(IRQ)
send/recv
socket
TCP
IP
iface
channel
classifier
iface
lock
OSv
TCP/IP
stack
app
thread
kernel
(IRQ)
send/recv
23. Memory
management
in
UNIX
OS
Memory
Process
Memory
JVM
Heap
Process
Memory
JVM
Heap
29. But
what
about
Docker?
Jailed
FS,
net,
etc.
Hardware
[Java]
Virtual
Machine
libFS,
libC,
libJVM
μservice
code
Applicacon-‐specific
stacc
linking
Docker
image
Common,
shared
kernel
30. Docker
!=
LXC
• $
docker
run
roman/PetClinic
• Socially-‐driven
image
sharing
Ubuntu
14.04
Canonical
Tomcat
Pivotal
Go
Google
PetClinic
Roman
PetClinic
service
#N
service
#1
$
docker
run
31. Why
should
it
work
this
cme?
• Unikernels/exokernels
back
in
’90
• JVM-‐on-‐bare-‐metal
(Azul,
BEA,
etc.)
back
in
‘00
• Things
they
didn’t
have
back
then
– HW-‐assisted
virtualizacon
(KVM,
XEN,
etc.)
– Elascc
infrastructure
oriented
architectures
– Cloud
Foundry
34. Elascc,
next
generacon
datacenter
• Commodity,
rack-‐provisioned
Hardware
• Commodity,
JeOS
to
get
to
Docker++
– CoreOS,
SmartOS
• Docker++
as
a
common
backed
– Osv
• Cloud
Foundry
to
rule
them
all
35. Finally
killing
DevOps
• Ops
(IT)
maintains
the
bare
OS
• Devs
maintain
the
μservices
• PaaS
maps
μservices
to
images
and
orchestrates
36. Finally
killing
DevOps
• Ops
(IT)
maintains
the
bare
OS
• Devs
maintain
the
μservices
• PaaS
maps
μservices
to
images
and
orchestrates
37. Guinea
pigs
so
far
• Cloudius
– Memcached
– Apache
Cassandra
– Redis
• Pivotal
– Apache
Geode
(incubacng)
38. Apache
Geode
(incubacng)
• Formerly
known
as
Gemfire
• Distributed,
fully
consistent,
in-‐memory
database/cache
system
with
transaccons
• Key-‐value
client
API
• Java
based
• Peer-‐to-‐peer
distributed
system
39. Quescons?
By
@cloud_opinion
Imagine
no
planorms
I
wonder
if
you
can
No
need
for
PAAS
or
IAAS
A
brotherhood
of
bare
metal
Imagine
there
is
no
VM
It's
easy
if
you
try
No
host
below
us
Above
us
only
apps