8 comments

  • bregma15 days ago
    So, if I understand correctly, a &quot;unikernel&quot; is what we used to call an &quot;executive&quot; except it is intended to be run as a guest on a virtual machine provided by a full-fledged traditional kernel&#x2F;userspace OS instead of on bare metal.<p>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&#x27;s great that someone can get new credit for an old idea with just a little bit of marketing spin.
    • valyala12 days ago
      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.
    • fulafel15 days ago
      Amiga: <a href="https:&#x2F;&#x2F;wiki.amigaos.net&#x2F;wiki&#x2F;Introduction_to_Exec" rel="nofollow">https:&#x2F;&#x2F;wiki.amigaos.net&#x2F;wiki&#x2F;Introduction_to_Exec</a><p>&gt; The Multitasking Executive, better known as Exec, is the heart of the Amiga&#x27;s operating system.<p>&gt; 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.
    • g-b-r15 days ago
      They can generally be run on bare metal, to my knowledge.<p>I personally don&#x27;t remember exactly what was meant with &quot;executive&quot;.
      • simtel2015 days ago
        I&#x27;ve only ever heard of that as the type of a DOS&#x2F;Windows .exe binary.
        • g-b-r15 days ago
          that&#x27;s an executable...
          • simtel206 days ago
            There were publications in the 80s that used that term iirc, and I do recall the term for how slightly incongruous it was, and how it didn&#x27;t come with an explanation.<p>In looking into ut some more, it looks like the executive was a term from mainframes for the layer of the kernel that enforced isolation, but I must have read the term being loosely used in pc magazines. Or maybe mockingly?
  • deivid15 days ago
    This is really well written, thanks for sharing.<p>I didn&#x27;t understand the point of using Unikraft though, if you can boot linux in much less than 150ms, with a far less exotic environment
    • nderjung15 days ago
      Hey! Co-founder of Unikraft here.<p>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&#x2F;runtime performance and operational security.<p>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?<p>Linux gives you the safety-net of generality and if you want to do anything remotely performant, you by-pass&#x2F;hack it altogether.<p>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&#x27;t need to store this separately either.
      • deivid15 days ago
        Unikraft is cool, I still have it in my &#x27;todo&#x27; list to play around with sometime.<p>Linking the app with the &#x27;kernel&#x27; seems pretty nice, would be cool to see what that looks like for a virtio-only environment.<p>Just wanted to point out that the 150ms is not snapshot based, you can get &lt;10ms for small vms (128MB ram, 2GB ram moves you to ~15ms range), for &#x27;cold&#x27; boots.
    • pjmlp15 days ago
      Security, it isn&#x27;t only memory footprint.
    • iberator15 days ago
      Which architecture can boot it in 150ms ?!
      • jumploops15 days ago
        Boot is a misleading term, but you can resume snapshotted VMs in single digit ms<p>(and without unikernels, though they certainly help)
        • deivid15 days ago
          You can boot a vm without snapshots in &lt; 10ms, just need a minimal kernel.
      • rwmj15 days ago
        I think &quot;in a VM&quot; was elided. It&#x27;s easy to tune qemu + Linux to boot up a VM in 150ms (or much less in fact).<p>Real hardware is unfortunately limited by the time it takes to initialize firmware, some of which could be solvable with open source firmware and some (eg. RAM training) is not easily fixable.
      • hun315 days ago
        Stripping away unused drivers (.config) and other &quot;bloats&quot; can get you surprisingly far.
        • TacticalCoder15 days ago
          And most importantly and TFA mentions it several times: stripping unused drivers (and even the ability to <i>load</i> drivers&#x2F;modules) and bloat brings very real security benefits.<p>I know you were responding about the boot times but that&#x27;s just the icing on the cake.
          • hun36 days ago
            Mostly depends on how bloat correlates to attack surface, but you&#x27;re right
        • iberator15 days ago
          But 150ms? That&#x27;s boot time for dos or minix maybe (tiny kernels). 1s sure.
          • balou2315 days ago
            FreeBSD did some work to boot in 25ms.<p>Source: <a href="https:&#x2F;&#x2F;www.theregister.com&#x2F;2023&#x2F;08&#x2F;29&#x2F;freebsd_boots_in_25ms&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.theregister.com&#x2F;2023&#x2F;08&#x2F;29&#x2F;freebsd_boots_in_25ms...</a>
          • deivid15 days ago
            You can do &lt;10ms. I was working to see if I could get it under 1ms, but my best was 3.5ms
          • gpderetta15 days ago
            for example: <a href="https:&#x2F;&#x2F;firecracker-microvm.github.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;firecracker-microvm.github.io&#x2F;</a>
      • binsquare15 days ago
        Microvm&#x27;s
    • victorbjorklund15 days ago
      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.
  • hun315 days ago
    Hypervisor as a microkernel
    • pjmlp15 days ago
      Yes, there is a certain irony when you look at the cloud workloads with a type 1 hypervisor managing either serverless or container workloads.
  • tuananh15 days ago
    the missing piece of unikernel is debuggability &amp; observability<p>- it need to be easy to replicate on dev machine &amp; easy to debug - it needs to integrate well with current obs stack. easy to debug in production.<p>without clear debuggability &amp; observability, i would never put it into production
    • imiric15 days ago
      This is a common myth. Debugging unikernels is indeed possible[1][2]. It may not be the type of debugging you&#x27;re already used to, but then again, unikernels are very different from containers and VMs, so some adjustment is expected.<p>As for observability, why is that the concern of unikernels? That&#x27;s something your application should do. You&#x27;re free to hook it up to any observability stack you want.<p>[1]: <a href="https:&#x2F;&#x2F;nanovms.com&#x2F;dev&#x2F;tutorials&#x2F;debugging-nanos-unikernels-with-gdb-and-ops" rel="nofollow">https:&#x2F;&#x2F;nanovms.com&#x2F;dev&#x2F;tutorials&#x2F;debugging-nanos-unikernels...</a><p>[2]: <a href="https:&#x2F;&#x2F;unikraft.org&#x2F;docs&#x2F;internals&#x2F;debugging" rel="nofollow">https:&#x2F;&#x2F;unikraft.org&#x2F;docs&#x2F;internals&#x2F;debugging</a>
      • godisdad15 days ago
        Respectfully, neither of these docs strike me as really sufficient to debug live running systems in the critical path for paying users. The first seems to be related to the inner development loop and local the second is again how to attach gdb to debug something in a controlled environment<p>Crash reporting, telemetry, useful queuing&#x2F;saturation measures or a Rosetta Stone of “we look at X today in system and app level telemetry, in the &lt;unikernel system&gt; world we look at Y (or don’t need X for reason Z) would be more in the spirit of parity<p>Systems are often somewhat “hands off” in more change control sensitive environments too, these guides presume full access, line of sight connectivity and a expert operator which are three unsafe assumptions in larger production systems IMO
        • valyala12 days ago
          You can expose Unikernel application metrics in Prometheus text exposition format at `&#x2F;metrics` http page and collect them with Prometheus or any other collector, which can scrape Prometheus-compatible targets. Alternatively, you can push metrics from the Unikernel to the centralized database for metrics for further investigation. Both pull-based and push-based metrics&#x27; collection is supported by popular client libraries for metrics such as <a href="https:&#x2F;&#x2F;github.com&#x2F;VictoriaMetrics&#x2F;metrics" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;VictoriaMetrics&#x2F;metrics</a> .<p>You can emit logs by the Unikernel app and send them to a centralized database for logs via syslog protocol (or any other protocol) for further analysis. See, for example, how to set up collect ing logs via syslog protocol at VictoriaLogs - <a href="https:&#x2F;&#x2F;docs.victoriametrics.com&#x2F;victorialogs&#x2F;data-ingestion&#x2F;syslog&#x2F;" rel="nofollow">https:&#x2F;&#x2F;docs.victoriametrics.com&#x2F;victorialogs&#x2F;data-ingestion...</a><p>You can expose various debug endpoints via http at the Unikernel application for debugging assistance. For example, if the application is written in Go, it is recommended exposing endpoints for collecting CPU, memory and goroutines profiles from the running application.
    • pjmlp15 days ago
      Easy the very same kind of mechanisms for rootless&#x2F;no-ssh containers are available.
  • traxler15 days ago
    I&#x27;ve found the idea of unikernels interesting for several years now, is there a tl;dr on why they don&#x27;t seem to have taken off, like at all? Or is it all happening behind some doors I don&#x27;t have access to?
    • gucci-on-fleek15 days ago
      I think that part of it is that relatively few people use bare-metal servers these days, and nested virtualisation isn&#x27;t universally supported. I also found this technical critique [0] compelling, but I have no idea if any of it is accurate or not.<p>[0]: <a href="https:&#x2F;&#x2F;www.tritondatacenter.com&#x2F;blog&#x2F;unikernels-are-unfit-for-production" rel="nofollow">https:&#x2F;&#x2F;www.tritondatacenter.com&#x2F;blog&#x2F;unikernels-are-unfit-f...</a>
      • eyberg15 days ago
        The majority of nanos users don&#x27;t do either of these methods. They simply create the image (in the case of aws that&#x27;s an ami) and boot it. This is part of what makes them vastly more simple than using normal linux vms or containers as you don&#x27;t have to manage the &quot;orchestration&quot;.
      • traxler15 days ago
        When I first heard about unikernels my hope&#x2F;thought was that people would go back to using more bare-metal servers for unikernels.
      • tuananh15 days ago
        there is a workaround for nested virt requirements.<p>you can use PVM patch and para-virtualization. I&#x27;ve seen several startup using that approach to be able to create VM on small&#x2F;cheap EC2 instances.
    • pjmlp15 days ago
      They kind of did, that is basically how serverless works.<p>Managed runtimes on top of hypervisors.
    • meehai15 days ago
      [dead]
  • rantingdemon15 days ago
    I would like to follow the tutorial but it mentions a playground.<p>Am I missing something as I cannot find a link or instructions for the playground.
    • chloeburbank15 days ago
      once you login with github there&#x27;s a start button on top left for that
  • chloeburbank15 days ago
    cool stuff