I'm curious as to why this isn't 0ms for a VM. The entire state of the system can be known ahead of time. Why does the kernel need to do any kind of dynamic initialization? Why aren't all data structures and variables statically assigned to proper values for the given VM. So at VM start up time it simply enters the main dispatch loop.
A NetBSD/amd64 guest can now boot in 18ms
11–20 of 34 posts
Re: A NetBSD/amd64 guest can now boot in 18ms
#12What's the firecracker command for this? (and also for Linux)
https://dev.l1x.be/posts/2020/12/13/diving-into-firecracker-...
If you are asking for the NetBSD image I am not sure.
Re: A NetBSD/amd64 guest can now boot in 18ms
#13I'm curious as to why this isn't 0ms for a VM. The entire state of the system can be known ahead of time. Why does the kernel need to do any kind of dynamic initialization? Why aren't all data structures and variables statically assigned to proper values for the given VM. So at VM start up time it simply enters the main dispatch loop.
Re: A NetBSD/amd64 guest can now boot in 18ms
#14I'm curious as to why this isn't 0ms for a VM. The entire state of the system can be known ahead of time. Why does the kernel need to do any kind of dynamic initialization? Why aren't all data structures and variables statically assigned to proper values for the given VM. So at VM start up time it simply enters the main dispatch loop.
I wonder the same thing for my regular OS too. Sure the first time it boots on this hardware, it needs to see what's what. But the subsequent hundred/thousand boots, at least for my usage, will be identical.
Re: A NetBSD/amd64 guest can now boot in 18ms
#15I'm curious as to why this isn't 0ms for a VM. The entire state of the system can be known ahead of time. Why does the kernel need to do any kind of dynamic initialization? Why aren't all data structures and variables statically assigned to proper values for the given VM. So at VM start up time it simply enters the main dispatch loop.
I wonder the same thing for my regular OS too. Sure the first time it boots on this hardware, it needs to see what's what. But the subsequent hundred/thousand boots, at least for my usage, will be identical.
Re: A NetBSD/amd64 guest can now boot in 18ms
#16I'm curious as to why this isn't 0ms for a VM. The entire state of the system can be known ahead of time. Why does the kernel need to do any kind of dynamic initialization? Why aren't all data structures and variables statically assigned to proper values for the given VM. So at VM start up time it simply enters the main dispatch loop.
Re: A NetBSD/amd64 guest can now boot in 18ms
#17What's the firecracker command for this? (and also for Linux)
Re: A NetBSD/amd64 guest can now boot in 18ms
#18I'm curious as to why this isn't 0ms for a VM. The entire state of the system can be known ahead of time. Why does the kernel need to do any kind of dynamic initialization? Why aren't all data structures and variables statically assigned to proper values for the given VM. So at VM start up time it simply enters the main dispatch loop.
Mostly because that's not how the kernel is designed. While what you're saying is true, it would require a fundamentally different kernel design. The kernel as it is today is designed to work on a variety of devices, not just VMs, so it behaves in a way in which it doesn't have specific knowledge of the device prior to initialization. To do what you're suggesting, the kernel would need to have a special mode where it…
Re: A NetBSD/amd64 guest can now boot in 18ms
#19Earlier quoted context omitted.
I wonder the same thing for my regular OS too. Sure the first time it boots on this hardware, it needs to see what's what. But the subsequent hundred/thousand boots, at least for my usage, will be identical.
That's kind of the point of Windows' Fast Boot option. The base OS pretty much just hibernates at a normal shutdown. No point in re-initializing and restarting all the base services.
Re: A NetBSD/amd64 guest can now boot in 18ms
#20I'm curious as to why this isn't 0ms for a VM. The entire state of the system can be known ahead of time. Why does the kernel need to do any kind of dynamic initialization? Why aren't all data structures and variables statically assigned to proper values for the given VM. So at VM start up time it simply enters the main dispatch loop.
Mostly because that's not how the kernel is designed. While what you're saying is true, it would require a fundamentally different kernel design. The kernel as it is today is designed to work on a variety of devices, not just VMs, so it behaves in a way in which it doesn't have specific knowledge of the device prior to initialization. To do what you're suggesting, the kernel would need to have a special mode where it…