Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Lightning Talk: Erlang on Xen - Mikhail Bortnyk

146 views

Published on

Elixir Club 5

Published in: Software
  • Be the first to comment

Lightning Talk: Erlang on Xen - Mikhail Bortnyk

  1. 1. Erlang on Xen Mikhail Bortnyk, Amoniac OU
  2. 2. What to know • XEN
  3. 3. What to know • XEN - virtualization hypervisor, modified Linux kernel, isolated domains, paravirtualization support
  4. 4. 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?)
  5. 5. 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
  6. 6. Typical application case Bare metal
  7. 7. Typical application case Bare metal Operating system
  8. 8. Typical application case Bare metal Operating system Your application
  9. 9. Wait, everything is about clouds currently!
  10. 10. Typical cloud application case Bare metal
  11. 11. Typical cloud application case Bare metal Virtualization hypervisor HOST OS
  12. 12. Typical cloud application case Bare metal Virtualization hypervisor HOST OS Guest OS Guest OS Guest OS
  13. 13. Typical cloud application case Bare metal Virtualization hypervisor HOST OS Guest OS Guest OS Guest OS Your application Your application Your application
  14. 14. Looks pretty familiar, huh?
  15. 15. And anyone is sick on microservices now
  16. 16. What’s wrong with this? • Let’s imagine: our app is like, huh, 200 kilobytes
  17. 17. What’s wrong with this? • Let’s imagine: our app is like, huh, 200 KB • It doesn’t matter - Linux kernel is ~10 MB
  18. 18. 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
  19. 19. 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
  20. 20. 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
  21. 21. 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
  22. 22. We all gonna die
  23. 23. Erlang on Xen to the rescue!
  24. 24. Erlang on XEN • Erlang VM running on XEN guest without operating system
  25. 25. Erlang on XEN • Erlang VM running on XEN guest without operating system • Actually named LING
  26. 26. Erlang on XEN • Erlang VM running on XEN guest without operating system • Actually named LING • Developed by Cloudozer
  27. 27. Erlang on XEN • Erlang VM running on XEN guest without operating system • Actually named LING • Developed by Cloudozer • Performed in C and Erlang
  28. 28. 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
  29. 29. 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
  30. 30. 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
  31. 31. Some little demo (what can go wrong, srsly?)
  32. 32. What to hack • Code is open-sourced (look into for license details)
  33. 33. What to hack • Code is open-sourced (look into for license details) • Teach it to work with Elixir (actually, lingex)
  34. 34. 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)
  35. 35. 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
  36. 36. Thank you!
  37. 37. Questions?

×