12 comments

[ 4.1 ms ] story [ 44.0 ms ] thread
I've found the idea of unikernels interesting for several years now, is there a tl;dr on why they don't seem to have taken off, like at all? Or is it all happening behind some doors I don't have access to?
This is really well written, thanks for sharing.

I didn't understand the point of using Unikraft though, if you can boot linux in much less than 150ms, with a far less exotic environment

Hey! Co-founder of Unikraft here.

Unikraft aims to offer a Linux-compatible environment (so it feels familiar) with the ability to strip out unnecessary internal components in order to improve both boot-time/runtime performance and operational security.

Why would you need a memory allocator and garbage collector if you serve static content? Why would you need a scheduler if your app is run-to-completion?

Linux gives you the safety-net of generality and if you want to do anything remotely performant, you by-pass/hack it altogether.

In the article, Unikraft cold-boots in 150ms in an emulated environment (TCG). If it was running natively with virtualization hardware extensions, it can be even shorter, and without the need for snapshots which means you don't need to store this separately either.

Because it will be slightly faster and you will use less resources? For a lot of use cases that probably does not matter but for some it does.
the missing piece of unikernel is debuggability & observability

- it need to be easy to replicate on dev machine & easy to debug - it needs to integrate well with current obs stack. easy to debug in production.

without clear debuggability & observability, i would never put it into production

I would like to follow the tutorial but it mentions a playground.

Am I missing something as I cannot find a link or instructions for the playground.

(comment deleted)
So, if I understand correctly, a "unikernel" is what we used to call an "executive" except it is intended to be run as a guest on a virtual machine provided by a full-fledged traditional kernel/userspace OS instead of on bare metal.

The article does reintroduce some concepts that were commonplace when I was first learning computers and it gives them some new names. I like that good ideas can still be useful after years of not being the latest fad, and it's great that someone can get new credit for an old idea with just a little bit of marketing spin.

Amiga: https://wiki.amigaos.net/wiki/Introduction_to_Exec

> The Multitasking Executive, better known as Exec, is the heart of the Amiga's operating system.

> All other systems in the Amiga rely on it to control multitasking, to manage the message-based interprocess communications system, and to arbitrate access to system resources.

There is no need in the operating system to run Unikernels. Every Unikernel includes parts of operating system needed for interacting with the underlying hardware. So Unikernels can run on bare metal if they know how to interact with the underlying hardware (i.e. if they have drivers for that hardware). Usually Unikernels are targeted to run on virtual machines because virtual machines have unified virtualised hardware. This allows running the same Unikernel on virtual machines across multiple cloud providers, since they have similar virtual hardware.
Hypervisor as a microkernel