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.
[ Parent
| on HN ]
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).