-
Notifications
You must be signed in to change notification settings - Fork 604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider using hardlink instead of cow for preparing ~/.lima/<INSTANCE>/basedisk
from the downloader cache
#2818
Comments
You could use reflinks, where available. |
We have been already using reflinks when available, but hardlinks would be preferable when reflinks are not supported by the filesystem. lima/pkg/downloader/downloader.go Line 426 in f4e50c2
|
COW feels slightly safer because it guarantees that the source is immutable. Hardlinks rely on there being no bugs or future changes that could modify the source. |
I think we would need to introduce CAS*, since currently the images are just indexed by their URL?
Currently I think that it will work with "prune", since the cache file will be deleted (before recreated). But that means that the instance will end up "owning" the old file which might not be ideal either? What I meant was that it should be possible for instances to continue to exist, after a cache cleanup. But ultimately it would need some kind of "garbage collect" to clean up also those entires, if unused. * With a CAS solution, then there would be a secondary layer for the data - like "by-content-sha256".
Probably overengineered here, but could help with mirrors and other distribution systems like IPFS? i.e. main reason we introduced this in another project, was to be able to keep metadata in memory By keeping the big files in separate storage ("rados"), all of the small files could be indexed ("redis")... Like so: https://juicefs.com/docs/community/architecture Where RADOS would be Ceph, and REDIS would be Valkey |
Why do we want to avoid that? I thought the clone took care of backing? |
I am assuming that the basic idea here is to keep each instance directory smaller, which sounds like a good idea. And to avoid the time it takes to copy from the cache to the instance (assuming that it is in the right format...)? |
I think using |
Yes, we have been already using |
I am currently investigating whether |
As the
basedisk
remains immutable, it could be just hardlinked from the downloader cache (when the cache exists on the same filesystem).This may make the situation complicated though, if we want to support squashing the
diffdisk
tobasedisk
in future.The text was updated successfully, but these errors were encountered: