3 ms·
I find it funny how we've ended up here: "Let's use containers, that way we aren't running unnecessary redundant kernels in each VM!" later "Oh shit, our con
by kube-system 4y ago
I find it funny how we've ended up here:
"Let's use containers, that way we aren't running unnecessary redundant kernels in each VM!"
later
"Oh shit, our containers share a kernel, let's add another kernel to each container to fix this!"
Maybe the next step is that we realize there's so many CPU bugs, that we really just need to give each container their own hardware :)
- wmf 4y agoThat's what cloud-native processors are for.
- com2kid 4y ago> Maybe the next step is that we realize there's so many CPU bugs, that we really just need to give each container their own hardware :) I am reasonably sure that most of the micro services I write would be very happy running on a 400mhz CPU with a couple hundred megs of RAM, if they were rewritten in native code, or even just compiled to native code instead of being ran on top of Node. Throw it all on a minimal OS that provides networking and some file IO. How much does it cost to manufacture 400mhz CPUs with onboard memory? Those must cost a few pennies each, throw in a 4GB SSD, preferably using SLC chips for reliability, and a NIC, and sell 4 "machine" clusters of them for ~$100 a pop.
- 0xbkt 4y ago> [...] if they were rewritten in native code, [...] Throw it all on a minimal OS that provides networking and some file IO. You may want to check out MirageOS[0]. It gives you a library OS with the primitives you say you need, and then all you have to do is import them in your application code as if you are writing your typical OCaml, build the virtual appliance and boot it up anywhere you want. [0] https://mirage.io/docs/overview-of-mirage https://mirage.io/docs/overview-of-mirage
- int_19h 4y agoThere's also https://github.com/includeos/IncludeOS https://github.com/includeos/IncludeOS However, how much is this kind of stuff is actually used at scale today?
- OneLessThing 4y agoWell we’ve kind of already started exploring that option with unikernels. Compile each app as its own complete software stack. https://en.m.wikipedia.org/wiki/Unikernel https://en.m.wikipedia.org/wiki/Unikernel
- billti 4y agoNice! Thanks for the link. As I've been playing around building a toy OS for my Raspberry Pi and learning more about hardware virtualization, I was thinking exactly along these lines, i.e. instead of virtualizing an full OS, virtualizing a minimal image with just a network driver and a flat address space per process/app seems like it would have benefits (i.e. no virtual memory mapping or privilege ring transitions eating cycles). I wasn't aware it was already an area that had much research behind it. From the article: > For example, off-the-shelf applications such as nginx, SQLite, and Redis running over a unikernel have shown a 1.7x-2.7x performance improvement That's a pretty healthy boost. Are there any significant efforts close to general use anyone is aware of in this space? (Or good reasons why it's a totally terrible idea and hasn't gone anywhere!)
- donavanm 4y agoNot first hand experience, but I was adjacent to a team that tried this approach. In short its playing on hard mode. Dev experience and tools, deployment chains, testing, etc are all possible but nowhere near your awesome userspace toolchains. Be prepared for lots of DIY action like building your own network or file io. The team also wasnt able to quite get down to the superfast ms start times and MB images that we were going for. My memory is fuzzy but ISTR that the people behind seastar/osv moved on to an approach closer to what mrkurt is emphasizing with “container” composition plus firecracker for the environment.