Light Sleep: Waking VMs in 200ms with eBPF and snapshots
1–10 of 20 posts
Re: Light Sleep: Waking VMs in 200ms with eBPF and snapshots
#2> But Firecracker comes with a few limitations, specifically around PCI passthrough and GPU virtualization, which prevented Firecracker from working with GPU Instances
Worth mentioning that Firecracker supports PCI passthrough as of 1.13.0. But that doesn't diminish the value of Cloud Hypervisor - it's really good to have multiple options in this space with different design goals (including QEMU, which has the most features).
> We use the sk_buff.mark field — a kernel-level metadata flag on packets - to tag health check traffic.
Clever!
> Light Sleep, which reduces cold starts to around 200ms for CPU workloads.
If you're restoring on the same box, I suspect 200ms is significantly above the best you can do (unless your images are huge). Do you know what you're spending those 200ms doing? Is it just creating the VMM process and setting up kvm? Device and networking setup? I assume you're mmapping the snapshot of memory and loading it on demand, but wouldn't expect anywhere near 200ms of page faults to handle a simple request.
Re: Light Sleep: Waking VMs in 200ms with eBPF and snapshots
#3> No polling. No heuristics. Just fast, kernel-level idle detection.
Isn't the `scaletozero-agent` daemon effectively polling eBPF map counters...?
Re: Light Sleep: Waking VMs in 200ms with eBPF and snapshots
#4> Alongside the eBPF program, we run a lightweight daemon — scaletozero-agent — that monitors those counters. If no new packets show up for a set period, it initiates the sleep process. > No polling. No heuristics. Just fast, kernel-level idle detection. Isn't the `scaletozero-agent` daemon effectively polling eBPF map counters...?
Re: Light Sleep: Waking VMs in 200ms with eBPF and snapshots
#5Does this include the RAM for the VM? For auto-idle systems like this where to park the RAM tends to be a significant concern. If you don't "retire" the RAM too the idling savings are limited to CPU cycles but if you do, the overheads of moving RAM around can easily wreck any latency budget you may have.
Curious how you are dealing with it.
Re: Light Sleep: Waking VMs in 200ms with eBPF and snapshots
#6Re: Light Sleep: Waking VMs in 200ms with eBPF and snapshots
#7Slightly OT but would be cool if there was a way to run computations in some on-demand VM that cold started in 200ms, did it thing, died and you only paid for the time you used it. In essence s lambda that exposed you a full blown VM rather than a limited environment.
Re: Light Sleep: Waking VMs in 200ms with eBPF and snapshots
#8Slightly OT but would be cool if there was a way to run computations in some on-demand VM that cold started in 200ms, did it thing, died and you only paid for the time you used it. In essence s lambda that exposed you a full blown VM rather than a limited environment.
If you don't even want to pay for that though scheduling unikernels on something like ec2 gets you your full vm, is cheaper, has more resources than lambda and doesn't have the various limitations such as no gpu or timeouts or anything like that.
Re: Light Sleep: Waking VMs in 200ms with eBPF and snapshots
#9Slightly OT but would be cool if there was a way to run computations in some on-demand VM that cold started in 200ms, did it thing, died and you only paid for the time you used it. In essence s lambda that exposed you a full blown VM rather than a limited environment.