The big problem with Katacontainers is not whether or not they are slightly faster or slower than containers, but the fixed memory allocation which means you must first know and then allocate the maximum amount of memory they might ever need up front. This can practically limit the number of Katacontainers you can run to something much smaller than is possible with ordinary containers, since RAM is the constrained resource on most servers.
Nevertheless, with confidential computing coming along, it's likely that at some point in the future many containers will really be VMs, since current CPUs implement confidential computing on top of existing VM primitives (and that's basically necessary due to the way the guest RAM is encrypted). It's likely that any workload that touches PII, finance, health, etc will be required to use confidential computing.
Yup, that's always been the big reason to use containers for me. Startup time and runtime performance are nice benefits, but the memory usage is the giant win. Freeing memory in response to the apps need and also not needing extra memory for running the various OS parts and pieces.
The down side is, of course, security. But that was always the case with containers.
We've always had 'compile once, run anywhere' but there's always been caveats and gotchas.
edit: don't shoot the messenger. I was merely highlighting the main difference between native and webasm in the context of the discussion.
I don’t think it will replace Docker files since they let you package up such a wide variety of existing server software and WASM is more limited. But if your software does compile to WASM then maybe you don’t care about that.
I think of WASM more like a plugin format, but I expect there will be a lot of engineering effort put into optimizing it, like happened with V8 for JavaScript. Not all web standards win, but betting against one that’s well-established and has a lot of support seems like a mistake.
For the stuff people run on their Kubernetes clusters I have more mixed expectations. Containers are more universal, but I can totally see a microservice architecture running as a lot of WASM runtimes with a handful of containers.
Conversely the problem with containers is that memory allocation including the OS page cache is not guaranteed. That's bad for a lot of applications, especially databases. It seems Docker has some support for shared page cache but it's not in the Kubernetes pod spec as far as I can see. [0] You would probably need some kind of annotations and a specialized controller to make this work.
https://github.com/kata-containers/kata-containers/blob/d50f... uses virtio-mem
There is still a benefit to ballooning support even if it's not exposed to userspace within the VM, because VMs aren't always used purely to host a single infinitely-long-lived application without outside intervention.
virtualization adds very overhead, a Windows VM running with a dedicated GPU can get 95% of the host's score on 3dmark.
the biggest issue on these cases is IO which can be handled in a few ways.
Missing word?
"Very little"? 5% is enough to turn this year's high-end machine into last year's model.
Nested virtualisation is also a thing now, and 5% per layer adds up fast.
There's usually overhead in the places where the communication requires an additional hop. If you want your host filesystem isolated you're going to need a translation layer and it will be slower. If you're willing to open up your host OS's filesystem, you can basically get ~0 overhead.
Kata gives you a few different options for what/how you'd like to boot including firecracker.
This isn't exclusive to firecracker but if you stay lightweight you can have vm's booting under a half second if you're using slim images.
https://jvns.ca/blog/2021/01/23/firecracker--start-a-vm-in-l...
I honestly think for a lot of people, vm's with the convenience/orchestration tools of containers make more sense for a lot of general use cases simply because of the security benefits. The convenience still needs some work though.
Compare that to a docker container where there's basically 0 additional work that has to be done to be up and running.
For most cases I'd be really tempted to work on hardening the docker container than on setting up a VM. Things like Apparmor and seccomp in particular would likely go a very long way.