-
Notifications
You must be signed in to change notification settings - Fork 6
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
rfe: multithread splitstream creation #62
Comments
This also needs to work for |
For the splitstream case: I think some sort of model like this:
|
For the edit: although maybe we don't have to worry about this so much. When creating from the filesystem we aren't doing multiple layers or anything, so the order of operations is actually not very important... |
cfsctl oci pull
is kinda slow right now.When converting the container image
.tar.gz
into splitstreams it does the gzip decompression, sha256 verification (of the underlying.tar
), fs-verity calculations (of the split objects),fdatasync()
(of the split objects), zstd compression of the splitstream, and finally fs-verity andfdatasync()
of the splitstream, all in a single thread.mkcomposefs
is smarter here: it spawns a bunch of worker threads to do the fs-verity and fdatasync() on the split objects.This would be pretty easy for us to do, and Rust would help us make sure we're doing it right, except the way that splitstreams are currently constructed is pretty linear: you need to get the object ID of each object to write into the stream before you can proceed to the next one. But: we're just writing to a
Vec<u8>
anyway, so we can easily go back in fill those parts in, or come up with some kind of a "chunks" model where we merge all the chunks into the linear stream at the end, or any other design. We could then make some of the chunks be promises or something — I'm really not sure how this works in Rust...The text was updated successfully, but these errors were encountered: