Live data from Hacker News

Unikernels: The Next Stage of Linux’s Dominance (2019)

dl.acm.org

171–180 of 187 posts

Re: Unikernels: The Next Stage of Linux’s Dominance (2019)

#171

Earlier quoted context omitted.

> You can write proprietary kernel drivers. IIRC you can write proprietary kernel modules , which are loaded at runtime. > Why can't you link user code with kernel? User code usually depends on POSIX interface and Linux is just one of the implementations. Because the kernel is licensed under GPLv2. If you statically link to the kernel, then all interpretations of the GPL are that your work is a derivation and must be…

So if your "userspace" payload is dynamically linked and loaded at runtime, it's no longer a problem? I don't think that there is a big performance hit for dynamic loading. Probably something like LTO won't work.

> So if your "userspace" payload is dynamically linked and loaded at runtime, it's no longer a problem?

Indeed but then you’re kinda missing the point of unikernels.

Re: Unikernels: The Next Stage of Linux’s Dominance (2019)

#172
post #63

Earlier quoted context omitted.

What are the plans regarding multithread / multiprocess support? On the face of it, multiprocess support might seem a bit stupid, but it would greatly help the porting of more complex applications. The 'processes' wouldn't need virtual address space or memory protection, just give them a block of memory and pick a CPU to run the code. If you have multithreading, do you need any scheduling code, or can you just pick a…

UKL is multi threaded, not multi process because there is no fork. Plus it's a Unikernel i.e., just one process. You don't need any scheduling code, Linux does it like it does normally for kernel and user threads.

>You don't need any scheduling code, Linux does it like it does normally for kernel and user threads.

That's interesting, how does Linux implement it's kernel threads without any scheduling code?

Re: Unikernels: The Next Stage of Linux’s Dominance (2019)

#173

Earlier quoted context omitted.

Could you not do all your debugging and development on a normal host and only deploy on a unikernel when you are stable? There is already a divide between development and production with debug and release builds the later of which are a massive pain to debug.

> debugging and development on a normal host and only deploy on a unikernel when you are stable? Sure! And, still, when you deploy, it fails. At least one of your assumptions that led to your conclusion that your development/testing environment is equivalent to the production one are flawed. Find which ones.

That is not a new problem. To some extent it already happens with debug and release builds, with running on a VM vs a real host, running on a different distribution than the one you developed in, etc. If the performance gains are significant in some domains that would be more than enough to pay for the extra pain.

Re: Unikernels: The Next Stage of Linux’s Dominance (2019)

#174

Earlier quoted context omitted.

Unikernels could also be the next phase of cloud orchestration technologies. They would be truly lightweight VMs, and obviate the need for containers (collapse the VM orchestration and container orchestration layers into a single orchestration layer). This would offer better security and better performance without impacting developer/operator friendliness. And a side note about improved performance, in the cloud spac…

> being able to boot in ten ms means you can start a VM in the scope of a single request That is actually a good point. Though this is also achievable with WebAssembly (see CloudFlare), but Unikernels could do it more generally I suppose. On the other hand, AWS Lambda has yet to drive classic EC2 to extinction.

Yeah, webassembly workers is an exciting idea as well. Unikernels is similar, but it removes a couple of layers of abstraction (another way to cut layers would be to implement a low-level hypervisor that runs WASM).

As for lambda not driving EC2 to extinction, these are different technologies for different use cases, and lambda is a relatively new technology—it takes a long time for big companies to change their ways, and it rarely makes sense to port a stable, legacy EC2 code base to functions. There are still plenty of mainframes kicking around for the same reasons.

Re: Unikernels: The Next Stage of Linux’s Dominance (2019)

#175

Earlier quoted context omitted.

You still won't be safe against several/most of the causes outlined in the page from the Ardour manual that I linked to. SMIs, random hardware that locks the bus for too long ... out of the kernel's control. If you really want 10msec finger->ear (a goal that I would say is reasonable, though given many live performer's and mixing engineer's normal physical setups, probably excessive) and you want to guarantee it, it'…

Paul, Thank you very much — for your ongoing work in Open Source audio, for being willing to engage at length in this thread, and for being straightforward about what the system can deliver. > If you really want 10msec finger->ear (a goal that I would say is reasonable, though given many live performer's and mixing engineer's normal physical setups, probably excessive) I worked in a recording studio for 6 years, incl…

By "probably excessive" I wasn't referring to psycho-acoustics. I merely meant that given your willingess to include speaker->ear latency, many people work on music in scenarios where that measure alone is already close to or above 10msec. The worst case scenario is likely a pipe organ player, who deals with latencies measured in units of seconds. Humans can deal with this without much difficulty - it is jitter that makes it hard (or impossible) to perform, not latency. Long-standing drummer & bass player duos generally report being able to deal with about 10 msec when performing live.

On the flip side, you have people arguing convincingly the comb filtering caused by phased reflections inside almost every listening scenario are responsible for the overwhelming majority of what people as "different". Move your head 1ft ... lose entire frequency bands ... move it again, get them all back and them some!

Regarding latency deadlines: well, the device driver can tell you (and does, if you ask it). If you use JACK, it will callback into your client every time there is an xrun reported by the audio hardware driver. This in turn has a quite simple definition: user space has not advanced the relevant buffer pointer before the next interrupt. There are circumstances where this actually isn't a problem (because the data has already been handled), but it is a fairly solid way of knowing whether the software is keeping up with the hardware. Something using ALSA directly can determine this in the same way that JACK does.

For audio, there is no other measurement of this that really matters. Using some sort of system clock to try to check timing, while likely to be kinda-sorta accurate enough, ignores the fact that the only clock that matters is the sample clock. If you're operating with huge margins of safety, some other clock measurimg time is good enough, but as you begin to inch closer to problem territory, it really isn't. For reference, we generally find that when "CPU loads" (variously measured) get close to 80% on macOS and Linux, scheduling deadlines start failing.

Nothing on linux will automatically "fallback" to less demanding latency requirements. If the system can't meet the requirements of the audio interface, it will continue to fail. This is actually part of the reason why Ardour tends not to deactivate plugins - the user can expect the DSP/CPU load to be more or less constant no matter what they do, rather than being low and then climbing through a threshold that causes problems as they do stuff.

Re: Unikernels: The Next Stage of Linux’s Dominance (2019)

#176

Earlier quoted context omitted.

> So, besides performance: what actual, real-life problems does this solve? Well, don't go jumping to "besides performance". Dennard scaling is dead, and the things that can interrupt your program in a full preemptive kernel system are myriad. Furthermore, even if your application properly manages and produces backpressure, the OS can introduce buffering where you don't want it, often by necessity (to avoid massive c…

I'm interested to learn why unikernels would be better at handling backpressure. Because there are fewer sources of interrupts that might interfere with each other?

Numerous interrupts may have an impact on latency, but for backpressure, buffering in the network layer or the filesystem/block layer can hide the limitations of the system from your application, and when you hit those limits, the hit is harder and can cause oscillations throughout a network or distributed system.

Now, of course, applications themselves can fail at this too. Look at Postgres, maybe, where typically people rely on [AUTO]VACUUM, but if your application runs continuously, then there is no right time to run it.

Re: Unikernels: The Next Stage of Linux’s Dominance (2019)

#178

Earlier quoted context omitted.

You can always "unikernelize" the JVM. OSv had a kernel-optimized JVM for example.

That’d be great for many VMs. I think it’d be interesting to see how the Erlang BEAM would perform in such a scenario. Especially for embedded devices! Yes, sometimes a few dozen micros faster is all that’s needed for many applications to become practical.

https://github.com/cloudozer/ling/blob/master/README.md

Re: Unikernels: The Next Stage of Linux’s Dominance (2019)

#179

Earlier quoted context omitted.

The crucial part of the paper is that they: • Added a new kernel configuration option to allow theuser to select if he/she wants to compile the Linux kernel as UKL. • Added a call to an undefined symbol (protected by an #ifdef) that can be used to invoke application code rather than creating the first userspace process. • Created a small UKL library which has stubs for syscalls. These stubs hide the details of invoki…

Thank you! That great summary should be the top post.

I did copy the dot points directly from the paper. It was behind a university login for me, so I wasn’t sure anyone could read it.

Re: Unikernels: The Next Stage of Linux’s Dominance (2019)

#180

Earlier quoted context omitted.

So if your "userspace" payload is dynamically linked and loaded at runtime, it's no longer a problem? I don't think that there is a big performance hit for dynamic loading. Probably something like LTO won't work.

> So if your "userspace" payload is dynamically linked and loaded at runtime, it's no longer a problem? Indeed but then you’re kinda missing the point of unikernels.

I thought that main point of unikernels is to avoid cost of kernelspace-userspace switch.
Post reply on HN