Live data from Hacker News

What is a 'unikernel'?

ma.ttias.be

51–60 of 71 posts

Re: What is a 'unikernel'?

#51
post #2

Am I the only one getting a bit fatigued by all of this now? I think when we hit containers I just got a bit tired of going even further down the rabbit hole. Yes I might get a little more performance or stability or whatever from a container vs a full VM or a unikernel vs a container but it just gets more frustrating to manage in my experience. Anybody else feel the same? When I just had a full VM with a full stack…

I can certainly see a lot of benefits with this. We host for some of our customers, and this would allow us to isolate each customer completely from each other. That is worth a lot when they store sensetive data in the application.

Seperate VMs would as well, but it's not really feasible to run a full Windows Server for each customer.

Re: What is a 'unikernel'?

#52
post #26

While the term unikernel is fairly recent,the basic concept goes back a long time. One example of this general design is VAX ELN. The following is a brochure from the V2.2 release, from 1986: http://bitsavers.trailing-edge.com/pdf/dec/vax/vaxeln/2.0/VA... Compile and then link the application code with the particular pieces of the toolkits that you needed and with the provided kernel into a single download image, and…

This is also how most embedded applications utilizing an OS also works these days. The OS is a library, you link in whatever you need from the OS + compile time configuration of OS features etc. + link in whatever you need for your application.

Have they worked anyway differently?

I remember you always had to bundle everything together with the exception of what was already present in the firmware.

Also some books I had access in the mid-90's were all about creating your own libOS with tasks and lightweight communication primitives and then bundling everything together.

Coding since the 80's, but the most embedded stuff I did was PC (bypassing MS-DOS), Amiga and Symbian and reading also PIC programming on Elektor.

So maybe my perception might not be the correct one.

Re: What is a 'unikernel'?

#53
post #6

Earlier quoted context omitted.

Seems pretty weird that we think it's normal to run a computer that simulates several physical computers, each running an operating system built for the mainframe in a 70s university CS department closet that then only ever runs one user and one application. You just think it's easier because you're used to it. I'm glad that this development is happening. In a few years when it's mature, we'll all have a saner setup…

Especially given there were more effective and efficient systems designed back in the 70's for doing exactly what we're doing now. Just better. ;)

And written in safer systems programming languages! :)

Re: What is a 'unikernel'?

#54
post #31
post #2

Am I the only one getting a bit fatigued by all of this now? I think when we hit containers I just got a bit tired of going even further down the rabbit hole. Yes I might get a little more performance or stability or whatever from a container vs a full VM or a unikernel vs a container but it just gets more frustrating to manage in my experience. Anybody else feel the same? When I just had a full VM with a full stack…

Unikernels are about security by auditability, mostly. Where containers have all of the security problems of two layers of operating systems and a container daemon and a complete OS kernel (before you even get to a hypervisor), unikernels are just your app and the drivers it needs sitting on the hypervisor. Or even on bare metal. It's a fairly different philosophy—I don't think anyone really cares about the performan…

If one looks at how many OSes evolved in the early days of computing history, there was always an overlap between rich language runtimes and the OS.

The language runtime and libraries built on top of it were the OS.

Seen by this lenses, POSIX could be seen as the C runtime, if one would stretch this example.

So for me, it is quite natural that when one has languages with rich runtimes, the OS is just another layer that can be taken out and we can go back to the days when runtimes were mostly targeting bare-metal.

Re: What is a 'unikernel'?

#55
post #52

Earlier quoted context omitted.

This is also how most embedded applications utilizing an OS also works these days. The OS is a library, you link in whatever you need from the OS + compile time configuration of OS features etc. + link in whatever you need for your application.

Have they worked anyway differently? I remember you always had to bundle everything together with the exception of what was already present in the firmware. Also some books I had access in the mid-90's were all about creating your own libOS with tasks and lightweight communication primitives and then bundling everything together. Coding since the 80's, but the most embedded stuff I did was PC (bypassing MS-DOS), Amig…

Sure - I didn't mean to imply this was a new thing.

Re: What is a 'unikernel'?

#56

OSv looks really promising. Turns regular jvm bytecode into unikernals. If you are building immutable apps, why not deploy them with an immutable foundation as well? The HN hivemind has declared microservices bad for bootstrapping new apps, but I'm convinced an end to end immutable workflow could actually dramatically boost team wide productivity. Tomorrow is a snow day so I get to play with OSv and see if I'm right.

> Turns regular jvm bytecode into unikernals. ?

It has nothing to do with bytecode per se.

It allows a JVM to run bare-metal, there are plenty of them already in the embedded world.

For example J9 from IBM.

Re: What is a 'unikernel'?

#57
post #47

honest question: would elaborate run-time-environments e.g. erlang-vm considered unikernel for an application running in this environment. for example, as we now know, erlang provides some fairly low-level primitives for application execution e.g. it's own os-agnostic preemptive thread scheduling, per thread async io, per-thread-gc etc. etc.

I don't think so. But you're in luck, there is a project to turn Erlang into a unikernel: http://erlangonxen.org/ EDIT: Spelling

Re: What is a 'unikernel'?

#58
post #52

Earlier quoted context omitted.

Have they worked anyway differently? I remember you always had to bundle everything together with the exception of what was already present in the firmware. Also some books I had access in the mid-90's were all about creating your own libOS with tasks and lightweight communication primitives and then bundling everything together. Coding since the 80's, but the most embedded stuff I did was PC (bypassing MS-DOS), Amig…

Sure - I didn't mean to imply this was a new thing.

Thanks, I was just getting a clarification, trying to understand it.

As I mentioned, I have a very small view of how it all works.

Re: What is a 'unikernel'?

#59
Not an expert here, but it seems to me like unikernel is the latest buzzword. The alleged advantages are:

> Improved security: only the core of the OS is implemented, no video or USB drivers that aren't needed and could be a source of intrusion.

I am not aware of any video or USB driver vulnerability which led to security concerns on a typical server setup in the last decade.

> Very small footprint: imagine being able to remove 95% of the kernel size, simply because your application doesn't need it.

This may free up 1 MB of RAM or maybe two. Unrelevant unless you're doing embedded programming, which is not the environment unikernels are targeting.

> Specialised implementations: you know your application and you can tweak and run your kernel exactly the way you want it.

Too vague of a statement to even criticize, anyway my applications conform to the POSIX specification so that they are portable and run exactly the way I want them.

> Quick enough to be "Just in time" to summon a unikernel live (similar to live spawning Docker instances), with boot times less than 1 second.

This may be a fair point in a system where the deployment time of a new instance is critical.

Re: What is a 'unikernel'?

#60
Looks like NodeOS is gaining steam. https://github.com/NodeOS/NodeOS

A very minimal linux kernel, a basic set of CLI primitives, NPM, and a few JS ports of traditional POSIX tools.

Looks like it'll be an easy path to building immutable stateless web servers. It can be run on bare metal (Raspberry Pi), Docker containers, and everything in between.

Start small and extend using the existing ecosystem.

I'm really looking forward to this project reaching full maturity.

Post reply on HN