Top
Best
New

Posted by binsquare 10 hours ago

Show HN: Smol machines – subsecond coldstart, portable virtual machines(github.com)
224 points | 89 commentspage 3
nonameiguess 7 hours ago|
What are you actually doing on top of libkrun? Providing really small machine images that boot quickly? If I run the smolvm run --image alpine example, what is "alpine?" Where is that image coming from? Does this have some built-in default registry of machine images it pulls from? Does it need an Internet connection that allows outbound access to wherever this registry runs? Is it one of a default set of pre-built images that comes with the software itself and is stored on my own filesystem? Where are the builds for these images? Where do these machine images end up? ~/.local/share/smolvm/?
binsquare 5 hours ago||
i run a custom fork of libkrun, libkrunfw (linux kernel), etc etc: https://github.com/orgs/smol-machines/repositories

Got a lot of questions on how I spin up linux VM's so quickly

Explanation is pretty straight forward.

Linux was built in the 90s. Hardware improved more than a 1000x. Linux virtual machine startup times stayed relatively the same.

Turns out we kept adding junk to the linux kernel + bootup operations.

So all I did was cut and remove unnecessary parts until it still worked. This ended up also getting boot up times to under 1s.

Big part of it was systemd btw.

binsquare 5 hours ago||
those images are pulling from the public docker registry.
chrisweekly 7 hours ago||
This looks awesome. Thanks for sharing!
fqiao 5 hours ago|
Thanks so much! Feel free to try it out if you have a chance, and let's us know your thoughts. Thanks!
dimitry12 4 hours ago||
https://github.com/earendil-works/gondolin is another project addressing a similar use-case.
messh 8 hours ago||
https://shellbox.dev is a hosted version of something very similar
tomComb 5 hours ago|
This sounds great, except for one thing: you can scale your compute (CPU & RAM) as needed but your storage appears to scale with it.

So, if I use a "16 vCPUs, 32GB RAM, 400GB SSD" machine for a period of intense compute, and then want to scale that down to "2 vCPUs, 4GB RAM", most of my storage disappears?

That rather ruins the potential of the advertised scalability.

harshdoesdev 9 hours ago||
its a really innovative idea! very interested in the subsecond coldstart claim, how does it achieve that?
fqiao 9 hours ago|
@binsquare basically brute-force trimmed down unnecessary linux kernel modules, tried to get the vm started with just bare minimum. There are more rooms for improvement for sure. We will keep trying!
deivid 8 hours ago|||
With this approach I managed to get to sub-10ms start (to pid1), if you can accept a few constraints there's plenty of room!

Though my version was only tested on Linux hosts

binsquare 8 hours ago||
would be interested to see how you do it, how can I connect with you - emotionally?
threecheese 6 hours ago||
Start with booze; always works :)
harshdoesdev 9 hours ago|||
nice! for most local workloads, it is actually sufficient. so, do you ship a complete disk snapshot of the machines?
fqiao 9 hours ago||
Yes. files on the disks are kept across stop and restart. We also have a pack command to compress the machine as a single file so that it can shipped and rehydrated elsewhere
cperciva 7 hours ago||
See also SmolBSD -- similar idea, similar name, using NetBSD.
fqiao 6 hours ago|
I came across SmolBSD before too. Cool project!
volume_tech 3 hours ago||
[dead]
danelliot 5 hours ago||
[dead]
volume_tech 9 hours ago|
[dead]