4 ms·
This is precisely why I said the fact that someone would gloss over this is a red flag. The point is super critical. VMs are literally so hard to do correctly
by hardwaresofton 7y ago
This is precisely why I said the fact that someone would gloss over this is a red flag. The point is super critical.
VMs are literally so hard to do correctly and in a performant fashion that parts of CPU instruction sets[0], and kernel subsystems (KVM[1]) were created to make them easier to run. Containers, in contrast are literally a few flags and a bunch of in-kernel antics.
A few people, notably Liz Rice and Jessie Frazelle have given talks on how to make containers from scratch that are very illuminating for those that are interested:
https://www.youtube.com/watch?v=HPuvDm8IC-4 https://www.youtube.com/watch?v=HPuvDm8IC-4
https://www.youtube.com/watch?v=cYsVvV1aVss https://www.youtube.com/watch?v=cYsVvV1aVss
[0]: https://en.wikipedia.org/wiki/X86_virtualization https://en.wikipedia.org/wiki/X86_virtualization
[1]: https://en.wikipedia.org/wiki/Kernel-based_Virtual_Machine https://en.wikipedia.org/wiki/Kernel-based_Virtual_Machine
- panpanna 7y agoContainers are "easy" because they are backed by tons of kennel code (cgroups, namespaces and basically a small part of many other subsystems). You can actually create containers from the shell! VMs are "hard" because you start with nothing save some very low-level help from the hardware.
- hardwaresofton 7y agoAlso, I want to be clear that I'm using "simple" and "easy" in the rick hickey sense of the words, as in "simple" has more to do with what a thing is made of, and "easy" has more to do with ease of use, taking available tooling/familiarity and context into mind. What I should have made clearer was that I think containers are both easier and simpler than VMs. There are both less moving parts (I haven't looked, but I assume less code), and containers are easier to get started with than VMs (set some flags on some syscalls versus make sure you buy the right CPU).
- panpanna 7y agoFair enough, but don't forget there are some extremely simple hypervisor implementations out there too.