News for hackers. Stuff that matters.
Re:IBM CTO Sees Smaller Container Platforms Ahead by rwmj on Tuesday December 31, 2019 @07:56AM (#21920703)
[Disclaimer: I work for Red Hat in this area, but don't speak for IBM or their CTO]

I think reading between the lines this is really about Kata Containers-style fast booting virtual machines which run containers and give you a bit more security. Development of this is very far along, expect to see this being deployed widely soon by enterprises and others who have security sensitive container workloads.

The unikernels stuff seems rather more speculative, and I don't know specifically what IBM is referring to, but I am [at Red Hat] working with a student at BU on turning Linux into a unikernel. You link your application directly to Linux and get a vmlinuz binary which can be run in a variety of places including on cloud VMs, in qemu, in a Kata Container [in theory - not actually tried this one], or even on baremetal. Old article here: https://next.redhat.com/2018/11/14/ukl-a-unikernel-based-on-...

Edit: I should say for completeness there is also KubeVirt, which lets you run your pet VMs in a pod on Kubernetes. Sort of the opposite of Kata.

Re:IBM CTO Sees Smaller Container Platforms Ahead by windexh8er on Tuesday December 31, 2019 @09:57AM (#21921352)
This feels like IBM/RedHat are playing the "me too" game with Kata or Firecracker. Or maybe, at a higher level, IBM needs something in this space to compete with what AWS has in their Nitro architecture. But, as you say, I'm not sure that "unikernel" means anything specifically at this point other than to, maybe, generate buzz. I don't understand these fluff pieces that sound interesting but are currently vaporware.
Re:IBM CTO Sees Smaller Container Platforms Ahead by rwmj on Wednesday January 01, 2020 @11:18AM (#21928653)
Red Hat works by following open source trends. With Kata we have been following it upstream very closely since the Clear Containers days, as well as having people being involved with the project, and now we're productizing it.
Re:IBM CTO Sees Smaller Container Platforms Ahead by justincormack on Tuesday December 31, 2019 @08:24AM (#21920819)
You should talk to the Nabla containers and related work team https://nabla-containers.github.io/people/ in IBM Research, that is where I believe most of the context of this article comes from.
Re:IBM CTO Sees Smaller Container Platforms Ahead by intheclouddan on Tuesday December 31, 2019 @09:07AM (#21921054)
They also have a slack team for nabla http://slack.nabla-containers.com/
Re:IBM CTO Sees Smaller Container Platforms Ahead by pnako on Tuesday December 31, 2019 @08:20AM (#21920792)
So if I understand correctly, you end up with some sort of binary, that you can run on top of some system that abstracts away the hardware and manages resources, correct?
Re:IBM CTO Sees Smaller Container Platforms Ahead by rwmj on Tuesday December 31, 2019 @08:41AM (#21920909)
You end up with a self-contained application binary which runs anywhere that you could run a Linux kernel.

However it's different from embedding an initrd into a kernel image in several ways: The kernel is minimal, containing only the bits which are needed by your application or drivers required to run on the hardware. The application runs in kernel space and is linked with the kernel which gives you a nice performance boost because you never context switch (which is the driver behind the whole project actually). You can also call kernel functions which aren't syscalls, eg. for specialized memory management.

Re:IBM CTO Sees Smaller Container Platforms Ahead by ahoka on Tuesday December 31, 2019 @10:14AM (#21921469)
What's so wrong with the context switch? You need to have some anyway if you want threads in your unikernel.
Re:IBM CTO Sees Smaller Container Platforms Ahead by eyberg on Tuesday December 31, 2019 @10:27AM (#21921580)
This is a common misunderstanding. There are many different types of context switching and you need the context (heh!) To compare apples to apples.

Kernel to userland, thread to thread, process to process, kernel thread vs user thread, etc. It's conflated because different threading models and different kernel/userland separations exist.

Generally speaking (in linux) threads perform much much faster than switching processes.

Re:IBM CTO Sees Smaller Container Platforms Ahead by rwmj on Wednesday January 01, 2020 @11:24AM (#21928700)
This is right, and the other mistake people make is measuring just the context switch, and not the many hundreds of thousands of cycles after the context switch spent repopulating the cache.
Re:IBM CTO Sees Smaller Container Platforms Ahead by 0x445442 on Tuesday December 31, 2019 @09:42AM (#21921257)
64-bit DOS?
Re:IBM CTO Sees Smaller Container Platforms Ahead by fock on Tuesday December 31, 2019 @12:18PM (#21922628)
but with permissions you can conveniently ovveride by default!
Re:IBM CTO Sees Smaller Container Platforms Ahead by rwmj on Wednesday January 01, 2020 @11:20AM (#21928671)
It doesn't even make sense to think about permissions for unikernels. There is exactly one application running. The trust boundary is at the edge of this application/kernel/VM thing, not anywhere within it.
Re:IBM CTO Sees Smaller Container Platforms Ahead by blondin on Tuesday December 31, 2019 @09:08AM (#21921059)
> You link your application directly to Linux and get a vmlinuz binary which can be run in a variety of places including on cloud VMs, in qemu, in a Kata Container [in theory - not actually tried this one], or even on baremetal.

sounds like the promise java made when they started. but java abstracted away the OS but not the hardware resources. right here the hardware is but not the OS.

very curious to see how this turns out.

Re:IBM CTO Sees Smaller Container Platforms Ahead by angrygoat on Tuesday December 31, 2019 @08:20AM (#21920789)
Is what you're doing anything like MirageOS (NetBSD rump kernel linked with an OCaml application [Note, this was an error, see below])? It sounds really interesting – I wonder what advantages Linux vs *BSD have as unikernels, when most hardware details are out of the picture.
Re:IBM CTO Sees Smaller Container Platforms Ahead by justincormack on Tuesday December 31, 2019 @08:22AM (#21920802)
MirageOS does not link to the NetBSD rump kernel. It is a standalone unikernel.
Re:IBM CTO Sees Smaller Container Platforms Ahead by angrygoat on Tuesday December 31, 2019 @09:43AM (#21921260)
Thanks for the correction :)
Re:IBM CTO Sees Smaller Container Platforms Ahead by lima on Tuesday December 31, 2019 @08:27AM (#21920840)
> You link your application directly to Linux and get a vmlinuz binary

How does this work with proprietary applications and the kernel's GPL license?

Re:IBM CTO Sees Smaller Container Platforms Ahead by ksec on Tuesday December 31, 2019 @09:01AM (#21921016)
I assume all these Unikernels Are targeting the Cloud and Server Usage? Which is perfectly fine for GPL.
Re:IBM CTO Sees Smaller Container Platforms Ahead by rwmj on Tuesday December 31, 2019 @08:37AM (#21920896)
"Consult a lawyer" would be the best answer I could give here. The applications we're actually targeting are open source servers of various kinds (think memcached, apache, etc.) so it's not an issue we need to consider ourselves as the licenses will be compatible.
Re:IBM CTO Sees Smaller Container Platforms Ahead by justincormack on Tuesday December 31, 2019 @08:53AM (#21920976)
No one really knows if the Linux "userspace is not covered by GPL" applies if you link an application to the kernel. Or if you then apply link time optimisation.
Re:IBM CTO Sees Smaller Container Platforms Ahead by pnako on Tuesday December 31, 2019 @08:28AM (#21920846)
In the cloud no one can hear you violate the GPL.
Re:IBM CTO Sees Smaller Container Platforms Ahead by fourthark on Tuesday December 31, 2019 @09:59AM (#21921367)
This is why AGPL exists. I think it is agreed that deploying your app to the cloud is not distribution and doesn’t run foul of plain GPL.
Re:IBM CTO Sees Smaller Container Platforms Ahead by wongarsu on Tuesday December 31, 2019 @10:01AM (#21921373)
In the cloud you usually don't distribute binaries, so you don't have to distribute sources either.
Re:IBM CTO Sees Smaller Container Platforms Ahead by fock on Tuesday December 31, 2019 @12:16PM (#21922619)
so that's basically like putting the whole app in a initrd? One could have done that for some time...
Re:IBM CTO Sees Smaller Container Platforms Ahead by rwmj on Wednesday January 01, 2020 @11:22AM (#21928680)
No, it's nothing like that. See my other reply: https://news.ycombinator.com/item?id=21920909