Re:FreeBSD spends 7% of its boot time running a bubblesort o...
by trasz4 on Friday May 19, 2023 @11:46AM
(#36003294)
This will also make a lot of difference once we can run lightweight, userspace kernels ("rump kernels").
Re:FreeBSD spends 7% of its boot time running a bubblesort o...
by yjftsjthsd-h on Friday May 19, 2023 @11:57AM
(#36003451)
> once we can run lightweight, userspace kernels ("rump kernels").
Er, didn't NetBSD accomplish that... like a decade ago, now? Or is FreeBSD looking into supporting rump kernels?
Re:FreeBSD spends 7% of its boot time running a bubblesort o...
by trasz4 on Friday May 19, 2023 @12:21PM
(#36003683)
Yes, NetBSD did accomplish that, but I expect it to become more commonplace.
Re:FreeBSD spends 7% of its boot time running a bubblesort o...
by EuropeOverlords on Friday May 19, 2023 @12:48PM
(#36004042)
but question is,
is this solution for people running software on other peoples computers ?
or solution for running my own code on my own computer only ?
Re:FreeBSD spends 7% of its boot time running a bubblesort o...
by trasz4 on Friday May 19, 2023 @01:01PM
(#36004233)
For my particular case it's about something similar in purpose to sandboxing, but with providing the compartment (ie a process subtree) with an alternative kernel to talk to, to minimise the attack surface between that container and the host kernel.
Re:FreeBSD spends 7% of its boot time running a bubblesort o...
by yjftsjthsd-h on Friday May 19, 2023 @12:51PM
(#36004074)
Does it matter? Running kernel pieces in userspace is useful in both directions (rather like docker), and in both cases we'd like it to run as quickly as possible.
Re:FreeBSD spends 7% of its boot time running a bubblesort o...
by chongli on Friday May 19, 2023 @01:01PM
(#36004237)
So wouldn't this fall under the category of "booting the kernel too much"? Why not find a way to keep already-booted kernels laying around and recycle them, rather than rebooting them afresh on every request? This pattern has already played out in other situations and been solved this way, such as with object pools or thread pools.
Re:FreeBSD spends 7% of its boot time running a bubblesort o...
by NovemberWhiskey on Friday May 19, 2023 @01:15PM
(#36004416)
This is the "AWS Lambda cold start" use case: you're not doing this every time, but you are doing it on scale-up, initial deploy, etc. Depending on complexity, those costs start to hit your p99 as well as your p100.
Re:FreeBSD spends 7% of its boot time running a bubblesort o...
by pavon on Friday May 19, 2023 @02:14PM
(#36005109)
All that sounds like it adds much more complexity than swapping out bubble sort for qsort, and the other various optimizations that have been going in to reduce boot time. Plus optimizing common code improves boot time for everyone running FreeBSD - routers, firewalls, etc, whereas pooling just helps that one use case. If you can make it startup up fast enough that you don't need any of that extra machinery, why wouldn't you?
Re:FreeBSD spends 7% of its boot time running a bubblesort o...
by insanitybit on Friday May 19, 2023 @08:38PM
(#36008330)
Yes, Firecracker supports snapshotting for that reason. But you still have the famous "cold start" lag. Not to mention that, for some use cases, you'll potentially want to add restarts for security reasons (Firecracker is designed to be able to execute malicious code).
Re:FreeBSD spends 7% of its boot time running a bubblesort o...
by nerpderp82 on Friday May 19, 2023 @03:08PM
(#36005708)
The problem here isn't the boot time, but the booting at all!!
Re:FreeBSD spends 7% of its boot time running a bubblesort o...
by giantrobot on Friday May 19, 2023 @03:55PM
(#36006130)
Having a microVM handle a rare endpoint and then exit is often cheaper than leaving an EC2 instance running constantly. An EC2 instance also has extra administration needs. At some scales the savings can be significant.
Shaving ms off the boot of that VM is a performance boost of that lambda (or whatever the cloud vendor calls it).
Re:FreeBSD spends 7% of its boot time running a bubblesort o...
by nerpderp82 on Tuesday May 23, 2023 @05:41PM
(#36051202)
Why does anything have to boot? What does booting do?
Re:FreeBSD spends 7% of its boot time running a bubblesort o...
by chatmasta on Friday May 19, 2023 @11:11PM
(#36009030)
Maybe you're calling the serverless function from another serverless function in the same datacenter (or more simply, maybe you're instantiating a local firecracker VM to run some user-defined function within the context of your currently executing program), in which case the latency would be more on the order of 5-10ms.
[0]: https://firecracker-microvm.github.io/