Containerize vs Virtualize? NGDC 2009

714 views

Published on

Published in: Technology, Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
714
On SlideShare
0
From Embeds
0
Number of Embeds
10
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Containerize vs Virtualize? NGDC 2009

  1. 1. NGDC Summer 2009 cyberstalk : irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09 irving + andy Virtualize or Containerize?
  2. 2. NGDC Summer 2009 Hello San Francisco!
  3. 3. irving + andy NGDC Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09 Virtualize or Containerize?
  4. 4. Virtualize or Containerize? Agenda 1. Why we're here 2. Act I -  Virtualize or Containerize (aka "So, you're a provider...") 1. Define and Differentiate 2. State of the Art -> dealbreakers + dealmakers 3. Act II - The Trouble with Clouds (aka "So you're looking to buy?") 1. A Market for Lemons 2. How it's hurting consumers 3. Wouldn't it be cool if... 4. Further resources 5. Get in touch... NGDC Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  5. 5. NGDC Summer 2009 Virtualize or Containerize? Containerization: Now you can handle the truth Now that we all know + love virtualization, it's easier to wrap our brains around containerization <ul><ul><li>Reminder: Virtualization is everywhere, even when you don't know it. 
  6. 6. Amazon EC2, Xen, Vmware... Perhaps you've heard of them?
  7. 7. Containerization branding chaos. </li></ul></ul><ul><li>Mediatemple, Dreamhost, Dotster... Perhaps you've heard of them? </li></ul>irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  8. 8. NGDC Summer 2009 Virtualize or Containerize? Why we're here Irving said blasphemous things about virtualization in IRC. irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  9. 9. NGDC Summer 2009 Virtualize or Containerize? Containerization: Is that even a thing? irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  10. 10. NGDC Summer 2009 Virtualize or Containerize? Rollcall Virtualization users and their admirers irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  11. 11. NGDC Summer 2009 Virtualize or Containerize? Rollcall Containerization users and their admirers irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  12. 12. NGDC Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09 Virtualize or Containerize? Act I Virtualize vs. Containerize: Define + Differentiate   So, you're a provider...
  13. 13. NGDC Summer 2009 Virtualize or Containerize? Before we begin, assumptions Our focus:      x86 Server Market      Open Source Operating Systems      Open Source & Web Application stacks      Yes, we know that:      Virtualization actually kicked off in the 1970s      Mainframe world.      Things are different when you bring Windows into the      picture. If you want to discuss Windows, Mainframes, etc, you may be at the wrong talk. irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  14. 14. NGDC Summer 2009 Virtualize or Containerize? Virtualization Explained Virtualization in a Nutshell: <ul><ul><li>A software technique used to separate an Operating System from Physical Resources
  15. 15. The virtualization &quot;host&quot; presents a complete set of hardware (CPU, memory, disk, devices) to the &quot;guest&quot;, fooling the guest into thinking it is running on real hardware
  16. 16. Analogy:   The Matrix
  17. 17.   </li></ul></ul>Examples <ul><ul><li>VMware (Full Virtualization)
  18. 18. Xen (Paravirtualization)
  19. 19. KVM (Paravirtualization)
  20. 20. Virtualbox (Full Virtualization)
  21. 21.   </li></ul></ul><ul><ul><li>  </li></ul></ul>irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  22. 22. NGDC Summer 2009 Virtualize or Containerize? Virtualization Explained (cont.) Advantages: <ul><ul><li>System Consolidation
  23. 23. System Protection
  24. 24. Simplicity - Run any x86 OS! </li></ul></ul>Disadvantage:  <ul><ul><li>CPU Performance
  25. 25. Memory Performance
  26. 26. IO Performance
  27. 27. Noticing a trend? Expensive translation Scheduler Contention </li></ul></ul>irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  28. 28. NGDC Summer 2009 Virtualize or Containerize? Containerization: The Difference is found in the Translation Virtualization (much must be translated) Containerization (It's all native) irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  29. 29. NGDC Summer 2009 Virtualize or Containerize? The Alien is the Guest, the Human is the Host *Except when you containerize, then a Human is both the Guest and Host irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  30. 30. NGDC Summer 2009 Virtualize or Containerize? Containerization: Tools like OpenVZ are already packaged with or for your favorite distro irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  31. 31. NGDC Summer 2009 Virtualize or Containerize? Containerization Explained Containerization in a Nutshell <ul><ul><li>Also called Operating System-level virtualization, the host and guests all share a single kernel
  32. 32. Essentially, virtualization in user-land
  33. 33. Single kernel provides greater control of guests, yet thinner separation between guests
  34. 34. Some ability to run different OS distributions </li></ul></ul>Popular Ones <ul><ul><li>OpenVZ (Linux)
  35. 35. Linux-Vserver
  36. 36. FreeBSD Jails
  37. 37. Solaris Containers </li></ul></ul>irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  38. 38. NGDC Summer 2009 Virtualize or Containerize? Containerization Explained (cont.) Advantages <ul><ul><li>Fat-free Virtualization
  39. 39. IO and Memory Performance levels similar to native operation
  40. 40. CPU Scalability - no &quot;virtual SMP&quot; limits
  41. 41. Resource Control and Constraints </li></ul></ul>Disadvantages <ul><ul><li>Guests must be same Kernel rev/arch as Host
  42. 42. “ Enterprise Functionality” is a mixed bag </li></ul></ul>irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  43. 43. NGDC Summer 2009 Virtualize or Containerize? Neat Containerization Tricks Tighter relationship between Host and Guest allows you to: <ul><li>Easily Administer Guests from the Host (Change IP, Change Passwords, etc)
  44. 44. Easily Access the Filesystem of Guests from the Host
  45. 45. Share identical memory between Guests and the Host
  46. 46. Super-easy Template usage and creation
  47. 47. Very fine grained resource limits </li></ul>irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  48. 48. NGDC Summer 2009 Virtualize or Containerize? Command-Line Examples List vzlist -a CTID NPROC STATUS IP_ADDR HOSTNAME 1 35 running 10.101.60.79 localhost 101 8 running 10.101.66.1 ct101.swsoft.com 102 7 running 10.101.66.159 ct102.swsoft.com 103 - stopped 10.101.66.103 ct103.swsoft.com Enter container:~# vzctl enter 100 entered into VE 100 root@www:/# Change User Password vzctl set 100 --save --userpassword apache:secretpassword! Change DNS Server vzctl set 100 --save --nameserver 192.168.0.2 irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  49. 49. ONBOOT=&quot;yes&quot; VE_ROOT=&quot;/var/lib/vz/root/$VEID&quot; VE_PRIVATE=&quot;/var/lib/vz/private/$VEID&quot; OSTEMPLATE=&quot;ubuntu-8.04-amd64-minimal&quot; ORIGIN_SAMPLE=&quot;vps.basic&quot; HOSTNAME=&quot;www.example.com&quot; IP_ADDRESS=&quot;192.168.0.220&quot; NAMESERVER=&quot;192.168.0.10&quot; NOATIME=&quot;yes&quot; DISKSPACE=&quot;10485760:11530240&quot; DISKINODES=&quot;200000:220000&quot; QUOTATIME=&quot;0&quot; CPUUNITS=&quot;1000&quot; OpenVZ Config Example VITALS QUOTAS Virtualize or Containerize? NGDC Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  50. 50. KMEMSIZE LOCKEDPAGES PRIVVMPAGES SHMPAGES NUMPROC PHYSPAGES VMGUARPAGES OOMGUARPAGES NUMTCPSOCK NUMFLOCK You Want Fine Grained Resource Limits? NUMPTY NUMSIGINFO TCPSNDBUF TCPRCVBUF OTHERSOCKBUF DGRAMRCVBUF NUMOTHERSOCK DCACHESIZE NUMFILE AVNUMPROC NUMIPTENT You got em. Hard and Soft limits for all. Virtualize or Containerize? NGDC Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  51. 51. Virtualize or Containerize? Who were Popek and Goldberg? Published a famous paper in 1974 called &quot;Formal Requirements for Virtualizable Third Generation Architectures&quot;. The fundamentals are still relevant today. Equivalence A program running under the VMM should exhibit a behavior essentially identical to that demonstrated when running on an equivalent machine directly. Resource control The VMM must be in complete control of the virtualized resources. Efficiency A statistically dominant fraction of machine instructions must be executed without VMM intervention. NGDC Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  52. 52. Virtualize or Containerize? Convergent Evolution (Or something...) NGDC Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  53. 53. Virtualize or Containerize? Convergent Evolution... Or Common Management Layer libvirt? NGDC Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  54. 54. Virtualize or Containerize? What's best for you? It depends on who you are. NGDC Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  55. 55. Virtualize or Containerize? How the heck do we describe ourselves? <ul><ul><li>buyers?
  56. 56. sellers?
  57. 57. administrators?
  58. 58. administrator  and  user?!?!
  59. 59. providers?
  60. 60. users?
  61. 61. developers?
  62. 62. just need to run a dang app? </li></ul></ul>NGDC Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  63. 63. Virtualize or Containerize? The big buckets NGDC Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09 <ul><ul><li>Selling infrastructure or applications on top of infrastructure to people outside your organization
  64. 64. Providing infrastructure, or applications on top of an infrastructure, within your organization/company
  65. 65. Your own customer </li></ul></ul><ul><ul><ul><li>a dev/groups of devs managing your own production/dev/QA server
  66. 66. using an app that needs infrastructure </li></ul></ul></ul>
  67. 67. Virtualize or Containerize? Rollcall Need help? Let's help you choose... NGDC Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09 <ul><ul><li>Selling infrastructure or applications on top of infrastructure to people outside your organization
  68. 68. Providing infrastructure, or applications on top of an infrastructure, within your organization/company
  69. 69. Your own customer </li></ul></ul><ul><ul><ul><li>a dev/groups of devs managing your own production/dev/QA server
  70. 70. using an app that needs infrastructure </li></ul></ul></ul>
  71. 71. Virtualize or Containerize? Let's help you choose You care about:  &quot;Enterprise&quot; functionality, support, clustering, pretty dashboards. Virtualize! NGDC Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  72. 72. Virtualize or Containerize? Let's help you choose You care about:  Running many, many different x86 OSes.  And a wide array of virtual appliances. Virtualize! NGDC Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  73. 73. Virtualize or Containerize? Let's help you choose You're an Infrastructure provider, and you need to run many, many instances of Linux as efficiently as possible.  You understand that fitting more guests on a host is free money. Containerize! NGDC Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  74. 74. Virtualize or Containerize? Let's help you choose You're a startup or indie developer on Linux, and you need to stretch every dollar.  However, you want to easily add Staging/Dev environments, regression test on a wide variety of distributions, etc.  People keep telling you to &quot;Get a VM for that project.&quot;  What do you do? Containerize! NGDC Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  75. 75. Virtualize or Containerize? Act II The Trouble with Clouds So, you're a consumer of infrastructure...  NGDC Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  76. 76. Virtualize or Containerize? The market for lemons Much of what you just heard doesn't matter if you are a buyer of Infrastructure services (IaaS, Cloud Computing, etc.) Building any large-scale high performance virtualization infrastructure can be very tricky (variance in technical solutions) Vendors are forced to compete primarily on Price, not Quality. See famous paper &quot;The Market for Lemons&quot; by economist George Akerlof. NGDC Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  77. 77. Virtualize or Containerize? (interrupting record scratch sound) NGDC Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  78. 78. Virtualize or Containerize? Cloud Providers, we love you, here's some valuable observations Shopping for IaaS services makes no sense, the comparison criteria has nothing to do with the Quality of the Infrastructure <ul><ul><li>User Interface
  79. 79. API
  80. 80. Pricing and Features
  81. 81. Oh yeah, and user reviews (subjective) </li></ul></ul>How about you help out the users a little bit? <ul><li>Build smarter baseline configs based on Memory Size, CPU power purchased, etc.
  82. 82. Install smart Caching mechanisms by default (WP-Super-Cache, memcached, Boost, mod_cache)
  83. 83. Don't fool buyers into thinking that they can get by without a proper sysadmin.
  84. 84. Don't instantly upsell more widgets when the customer's performance goes south. </li></ul>NGDC Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  85. 85. Virtualize or Containerize? Wouldn't it be cool if... There were independent measurements and ratings for IaaS providers: <ul><ul><li>Compare CPU, Memory, Disk, and network performance
  86. 86. Compare real-world task response times
  87. 87. Compare end-to-end performance of real application stacks </li></ul></ul>A critical mass of communities talking about cloud stuff with these new criteria in mind : <ul><ul><li>Wikis
  88. 88. Discussion forums
  89. 89. How-to articles </li></ul></ul>Encourage vendors to be more transparent and describe their offerings in a more meaningful way. NGDC Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  90. 90. Virtualize or Containerize? Okay, Now take a deep breath NGDC Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  91. 91. Virtualize or Containerize? Further Resources <ul><ul><li>Wikipedia &quot;Virtualization&quot; article:   http://en.wikipedia.org/wiki/Virtualization
  92. 92. VMware whitepaper:  Understanding Paravirtualization http://www.vmware.com/files/pdf/VMware_paravirtualization.pdf
  93. 93. Intel whitepaper:  Hybrid Virtualization  http://www.vmware.com/files/pdf/VMware_paravirtualization.pdf
  94. 94. Troubleshooting hosted Xen story:   http://wiki.xen.prgmr.com/xenophilia/2009/06/see-this-is-why-i-dont-assume.html
  95. 95. Popek and Goldberg Virtualization Requirements   http://en.wikipedia.org/wiki/Popek_and_Goldberg_virtualization_requirements </li></ul></ul>NGDC Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  96. 96. Virtualize or Containerize? Get in touch Andy (Andrea)     Sysadmin in Portland, OR      Cries when make fails.     twitter/identica:  thesethings     Blog: http://www.thesethingsmattertome.com/ Irving Popovetsky     Independent consultant from Portland, OR     Unabashed OSS nerd for nearly 15 years     twitter/identica: irvingpop     Blog:  http://www.cloudest.com/blog/ NGDC Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  97. 97. Virtualize or Containerize? Questions?? NGDC Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09
  98. 98. Virtualize or Containerize? Thanks for coming! NGDC Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: http://bit.ly/ngdc09

×