lightning talk: erlang on xen - mikhail bortnyk
TRANSCRIPT
Erlang on XenMikhail Bortnyk, Amoniac OU
What to know• XEN
What to know• XEN - virtualization hypervisor, modified Linux
kernel, isolated domains, paravirtualization support
What to know• XEN - virtualization hypervisor, modified Linux
kernel, isolated domains, paravirtualization support
• Erlang - functional concurrent programming language (all you guys know about it, right?)
What to know• XEN - virtualization hypervisor, modified Linux
kernel, isolated domains, paravirtualization support
• Erlang - functional concurrent programming language (all you guys know about it, right?)
• Linux - Unix-like operating system created by Linus Torvalds
Typical application case
Bare metal
Typical application case
Bare metal
Operating system
Typical application case
Bare metal
Operating system
Your application
Wait, everything is about clouds currently!
Typical cloud application case
Bare metal
Typical cloud application case
Bare metal
Virtualization hypervisor HOST OS
Typical cloud application case
Bare metal
Virtualization hypervisor HOST OS
Guest OS Guest OS Guest OS
Typical cloud application case
Bare metal
Virtualization hypervisor HOST OS
Guest OS Guest OS Guest OS
Your application Your application Your application
Looks pretty familiar, huh?
And anyone is sick on microservices now
What’s wrong with this?• Let’s imagine: our app is like, huh, 200 kilobytes
What’s wrong with this?• Let’s imagine: our app is like, huh, 200 KB
• It doesn’t matter - Linux kernel is ~10 MB
What’s wrong with this?• Let’s imagine: our app is like, huh, 200 KB
• It doesn’t matter - Linux kernel is ~10 MB
• Typical Linux image is ~ 400 MB
What’s wrong with this?• Let’s imagine: our app is like, huh, 200 KB
• It doesn’t matter - Linux kernel is ~10 MB
• Typical Linux image is ~ 400 MB
• Multiply this on amount of instances
What’s wrong with this?• Let’s imagine: our app is like, huh, 200 KB
• It doesn’t matter - Linux kernel is ~10 MB
• Typical Linux image is ~ 400 MB
• Multiply this on amount of instances
• More than 500MB overhead for 200 KB application
What’s wrong with this?• Let’s imagine: our app is like, huh, 200 KB
• It doesn’t matter - Linux kernel is ~10 MB
• Typical Linux image is ~ 400 MB
• Multiply this on amount of instances
• More than 500MB overhead for 200 KB application
• Overheating, war for resources, depression, death
We all gonna die
Erlang on Xen to the rescue!
Erlang on XEN• Erlang VM running on XEN guest without operating
system
Erlang on XEN• Erlang VM running on XEN guest without operating
system
• Actually named LING
Erlang on XEN• Erlang VM running on XEN guest without operating
system
• Actually named LING
• Developed by Cloudozer
Erlang on XEN• Erlang VM running on XEN guest without operating
system
• Actually named LING
• Developed by Cloudozer
• Performed in C and Erlang
Erlang on XEN• Erlang VM running on XEN guest without operating
system
• Actually named LING
• Developed by Cloudozer
• Performed in C and Erlang
• Footprint is pretty small: 1.2 MB of low-level code + 2 MB of C stack + 2 MB of imported modules + 2 MB of network buffers = ~ 8 MB
Erlang on XEN• Erlang VM running on XEN guest without operating system
• Actually named LING
• Developed by Cloudozer
• Performed in C and Erlang
• Footprint is pretty small: 1.2 MB of low-level code + 2 MB of C stack + 2 MB of imported modules + 2 MB of network buffers = ~ 8 MB
• Minimal memory requirement to run: 20 MB per guest
Erlang on XEN• Erlang VM running on XEN guest without operating system
• Actually named LING
• Developed by Cloudozer
• Performed in C and Erlang
• Footprint is pretty small: 1.2 MB of low-level code + 2 MB of C stack + 2 MB of imported modules + 2 MB of network buffers = ~ 8 MB
• Minimal memory requirement to run: 20 MB per guest
• Spawns pretty fast - from 0.2 to 1 s
Some little demo (what can go wrong,
srsly?)
What to hack• Code is open-sourced (look into for license details)
What to hack• Code is open-sourced (look into for license details)
• Teach it to work with Elixir (actually, lingex)
What to hack• Code is open-sourced (look into for license details)
• Teach it to work with Elixir (actually, lingex)
• Make LING alive again! (last commit - Oct 2015)
What to hack• Code is open-sourced (look into for license details)
• Teach it to work with Elixir (actually, lingex)
• Make LING alive again! (last commit - Oct 2015)
• Just have fun with some hacking and getting into internals of Erlang and BEAM
Thank you!
Questions?