OSCON Summer 2009 cyberstalk   : irc / twitter/ identica:  irvingpop, thesethings  web:  cloudest.com/oscon  irving + andy...
OSCON Summer 2009 Hello Portland!
OSCON Summer 2009 Hello San Jose!
OSCON Summer 2009 cyberstalk   : irc / twitter/ identica:  irvingpop, thesethings  web:  cloudest.com/oscon  irving + andy...
OSCON Summer 2009 irc / twitter/ identica:  irvingpop, thesethings  web:  cloudest.com/oscon  Virtualize or Containerize? ...
OSCON Summer 2009 irc / twitter/ identica:  irvingpop, thesethings  web:  cloudest.com/oscon  Virtualize or Containerize? ...
Amazon EC2, Xen, Vmware... Perhaps you've heard of them?
Containerization branding chaos. </li></ul></ul><ul><li>Mediatemple, Dreamhost, Dotster... Perhaps you've heard of  them? ...
OSCON Summer 2009 irc / twitter/ identica:  irvingpop, thesethings  web:  cloudest.com/oscon Virtualize or Containerize? W...
OSCON Summer 2009 irc / twitter/ identica:  irvingpop, thesethings  web:  cloudest.com/oscon Virtualize or Containerize? C...
OSCON Summer 2009 irc / twitter/ identica:  irvingpop, thesethings  web:  cloudest.com/oscon Virtualize or Containerize? R...
OSCON Summer 2009 irc / twitter/ identica:  irvingpop, thesethings  web:  cloudest.com/oscon Virtualize or Containerize? R...
OSCON Summer 2009 irc / twitter/ identica:  irvingpop, thesethings  web:  cloudest.com/oscon Virtualize or Containerize? A...
OSCON Summer 2009 irc / twitter/ identica:  irvingpop, thesethings  web:  cloudest.com/oscon  Virtualize or Containerize? ...
OSCON Summer 2009 irc / twitter/ identica:  irvingpop, thesethings  web:  cloudest.com/oscon  Virtualize or Containerize? ...
The virtualization &quot;host&quot; presents a complete set of hardware (CPU, memory, disk, devices) to the &quot;guest&qu...
Analogy:   The Matrix
  </li></ul></ul>Examples <ul><ul><li>VMware (Full Virtualization)
Xen (Paravirtualization)
KVM (Paravirtualization)
Virtualbox (Full Virtualization)
  </li></ul></ul><ul><ul><li>  </li></ul></ul>
OSCON Summer 2009 irc / twitter/ identica:  irvingpop, thesethings  web:  cloudest.com/oscon Virtualize or Containerize? V...
System Protection
Simplicity - Run any x86 OS! </li></ul></ul>Disadvantage:  <ul><ul><li>CPU Performance
Memory Performance
IO Performance
Noticing a trend?  Expensive translation Scheduler Contention </li></ul></ul>
OSCON Summer 2009 irc / twitter/ identica:  irvingpop, thesethings  web:  cloudest.com/oscon Virtualize or Containerize? C...
OSCON Summer 2009 irc / twitter/ identica:  irvingpop, thesethings  web:  cloudest.com/oscon  Virtualize or Containerize? ...
OSCON Summer 2009 irc / twitter/ identica:  irvingpop, thesethings  web:  cloudest.com/oscon  Virtualize or Containerize? ...
OSCON Summer 2009 irc / twitter/ identica:  irvingpop, thesethings  web:  cloudest.com/oscon  Virtualize or Containerize? ...
Essentially, virtualization in user-land
Single kernel provides greater control of guests, yet  thinner separation between guests
Some ability to run different OS distributions </li></ul></ul>Popular Ones <ul><ul><li>OpenVZ (Linux)
Linux-Vserver
FreeBSD Jails
Solaris Containers </li></ul></ul>
OSCON Summer 2009 irc / twitter/ identica:  irvingpop, thesethings  web:  cloudest.com/oscon  Virtualize or Containerize? ...
IO and Memory Performance levels similar to native operation
CPU Scalability - no &quot;virtual SMP&quot; limits
Resource Control and Constraints </li></ul></ul>Disadvantages <ul><ul><li>Guests must be same Kernel rev/arch as Host
“ Enterprise Functionality” is a mixed bag </li></ul></ul>
OSCON Summer 2009 irc / twitter/ identica:  irvingpop, thesethings  web:  cloudest.com/oscon  Virtualize or Containerize? ...
Upcoming SlideShare
Loading in...5
×

Containerize vs Virtualize

5,940

Published on

From an Oscon 2009 talk we gave this year in San Jose, California.
It's about when to use virtualization technologies, and when to containerize (similar, but a bit different.).

Published in: Technology
0 Comments
10 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
5,940
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
119
Comments
0
Likes
10
Embeds 0
No embeds

No notes for slide

Containerize vs Virtualize

  1. 1. OSCON Summer 2009 cyberstalk : irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon irving + andy Virtualize or Containerize?
  2. 2. OSCON Summer 2009 Hello Portland!
  3. 3. OSCON Summer 2009 Hello San Jose!
  4. 4. OSCON Summer 2009 cyberstalk : irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon irving + andy Virtualize or Containerize?
  5. 5. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon Virtualize or Containerize? Agenda 1. Why we're here 2. Act I -  Virtualize or Containerize (aka &quot;So, you're a provider...&quot;) 1. Define and Differentiate 2. State of the Art -> dealbreakers + dealmakers 3. Act II - The Trouble with Clouds (aka &quot;So you're looking to buy?&quot;) 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...
  6. 6. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon 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. 
  7. 7. Amazon EC2, Xen, Vmware... Perhaps you've heard of them?
  8. 8. Containerization branding chaos. </li></ul></ul><ul><li>Mediatemple, Dreamhost, Dotster... Perhaps you've heard of them? </li></ul>
  9. 9. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon Virtualize or Containerize? Why we're here Irving said blasphemous things about virtualization in IRC.
  10. 10. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon Virtualize or Containerize? Containerization: Is that even a thing?
  11. 11. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon Virtualize or Containerize? Rollcall Virtualization users and their admirers
  12. 12. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon Virtualize or Containerize? Rollcall Containerization users and their admirers
  13. 13. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon Virtualize or Containerize? Act I Virtualize vs. Containerize: Define + Differentiate   So, you're a provider...
  14. 14. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon 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.
  15. 15. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon Virtualize or Containerize? Virtualization Explained Virtualization in a Nutshell: <ul><ul><li>A software technique used to separate an Operating System from Physical Resources
  16. 16. 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
  17. 17. Analogy:   The Matrix
  18. 18.   </li></ul></ul>Examples <ul><ul><li>VMware (Full Virtualization)
  19. 19. Xen (Paravirtualization)
  20. 20. KVM (Paravirtualization)
  21. 21. Virtualbox (Full Virtualization)
  22. 22.   </li></ul></ul><ul><ul><li>  </li></ul></ul>
  23. 23. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon Virtualize or Containerize? Virtualization Explained (cont.) Advantages: <ul><ul><li>System Consolidation
  24. 24. System Protection
  25. 25. Simplicity - Run any x86 OS! </li></ul></ul>Disadvantage:  <ul><ul><li>CPU Performance
  26. 26. Memory Performance
  27. 27. IO Performance
  28. 28. Noticing a trend? Expensive translation Scheduler Contention </li></ul></ul>
  29. 29. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon Virtualize or Containerize? Containerization: The Difference is found in the Translation Virtualization (much must be translated) Containerization (It's all native)
  30. 30. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon 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
  31. 31. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon Virtualize or Containerize? Containerization: Tools like OpenVZ are already packaged with or for your favorite distro
  32. 32. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon 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
  33. 33. Essentially, virtualization in user-land
  34. 34. Single kernel provides greater control of guests, yet thinner separation between guests
  35. 35. Some ability to run different OS distributions </li></ul></ul>Popular Ones <ul><ul><li>OpenVZ (Linux)
  36. 36. Linux-Vserver
  37. 37. FreeBSD Jails
  38. 38. Solaris Containers </li></ul></ul>
  39. 39. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon Virtualize or Containerize? Containerization Explained (cont.) Advantages <ul><ul><li>Fat-free Virtualization
  40. 40. IO and Memory Performance levels similar to native operation
  41. 41. CPU Scalability - no &quot;virtual SMP&quot; limits
  42. 42. Resource Control and Constraints </li></ul></ul>Disadvantages <ul><ul><li>Guests must be same Kernel rev/arch as Host
  43. 43. “ Enterprise Functionality” is a mixed bag </li></ul></ul>
  44. 44. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon 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)
  45. 45. Easily Access the Filesystem of Guests from the Host
  46. 46. Share identical memory between Guests and the Host
  47. 47. Super-easy Template usage and creation
  48. 48. Very fine grained resource limits </li></ul>
  49. 49. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon 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
  50. 50. irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon 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?
  51. 51. irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon 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?
  52. 52. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon 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.
  53. 53. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon Virtualize or Containerize? Convergent Evolution (Or something...)
  54. 54. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon Virtualize or Containerize? Convergent Evolution... Or Common Management Layer libvirt?
  55. 55. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon Virtualize or Containerize? What's best for you? It depends on who you are.
  56. 56. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon Virtualize or Containerize? How the heck do we describe ourselves? <ul><ul><li>buyers?
  57. 57. sellers?
  58. 58. administrators?
  59. 59. administrator  and  user?!?!
  60. 60. providers?
  61. 61. users?
  62. 62. developers?
  63. 63. just need to run a dang app? </li></ul></ul>
  64. 64. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon Virtualize or Containerize? The big buckets <ul><ul><li>Selling infrastructure or applications on top of infrastructure to people outside your organization
  65. 65. Providing infrastructure, or applications on top of an infrastructure, within your organization/company
  66. 66. Your own customer </li></ul></ul><ul><ul><ul><li>a dev/groups of devs managing your own production/dev/QA server
  67. 67. using an app that needs infrastructure </li></ul></ul></ul>
  68. 68. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon Virtualize or Containerize? Rollcall Need help? Let's help you choose... <ul><ul><li>Selling infrastructure or applications on top of infrastructure to people outside your organization
  69. 69. Providing infrastructure, or applications on top of an infrastructure, within your organization/company
  70. 70. Your own customer </li></ul></ul><ul><ul><ul><li>a dev/groups of devs managing your own production/dev/QA server
  71. 71. using an app that needs infrastructure </li></ul></ul></ul>
  72. 72. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon Virtualize or Containerize? Let's help you choose You care about:  &quot;Enterprise&quot; functionality, support, clustering, pretty dashboards. Virtualize!
  73. 73. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon 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!
  74. 74. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon 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!
  75. 75. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon 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!
  76. 76. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon Virtualize or Containerize? Act II The Trouble with Clouds So, you're a consumer of infrastructure... 
  77. 77. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon 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.
  78. 78. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon Virtualize or Containerize? (interrupting record scratch sound)
  79. 79. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon 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
  80. 80. API
  81. 81. Pricing and Features
  82. 82. 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.
  83. 83. Install smart Caching mechanisms by default (WP-Super-Cache, memcached, Boost, mod_cache)
  84. 84. Don't fool buyers into thinking that they can get by without a proper sysadmin.
  85. 85. Don't instantly upsell more widgets when the customer's performance goes south. </li></ul>
  86. 86. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon 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
  87. 87. Compare real-world task response times
  88. 88. 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
  89. 89. Discussion forums
  90. 90. How-to articles </li></ul></ul>Encourage vendors to be more transparent and describe their offerings in a more meaningful way.
  91. 91. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon Virtualize or Containerize? Okay, Now take a deep breath
  92. 92. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon Virtualize or Containerize? Further Resources <ul><ul><li>Wikipedia &quot;Virtualization&quot; article:   http://en.wikipedia.org/wiki/Virtualization
  93. 93. VMware whitepaper:  Understanding Paravirtualization http://www.vmware.com/files/pdf/VMware_paravirtualization.pdf
  94. 94. Intel whitepaper:  Hybrid Virtualization  http://www.vmware.com/files/pdf/VMware_paravirtualization.pdf
  95. 95. Troubleshooting hosted Xen story:   http://wiki.xen.prgmr.com/xenophilia/2009/06/see-this-is-why-i-dont-assume.html
  96. 96. Popek and Goldberg Virtualization Requirements   http://en.wikipedia.org/wiki/Popek_and_Goldberg_virtualization_requirements </li></ul></ul>
  97. 97. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon 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/
  98. 98. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon Virtualize or Containerize? Questions??
  99. 99. OSCON Summer 2009 irc / twitter/ identica: irvingpop, thesethings web: cloudest.com/oscon Virtualize or Containerize? Thanks for coming!
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×