Describe the feature
We are caching some fairly large files in AIStore (~5 GB) stored in an OCI bucket. We're using the "AWS" backend with their S3 compatibility API, since it's more mature than the OCI backend. The issue we have is that, when cold getting these files, fetching the file into AIStore is very slow. It would be nice if AIStore would use multipart downloading for better performance.
I'm aware of the blob downloader, which does download large files in multiple parts. It doesn't quite work for our use case though, as it pushes the decision between single-threaded and multi-threaded downloading onto users. As the cluster administrator, I would like a way to configure a multipart download threshold and part size and have it automatically apply to any applicable cold GET requests.
Use Case
When cold getting files from an upstream S3 bucket, we can get improved performance using multipart downloading. I want to configure this behavior cluster-wide, so users of AIStore don't have to think about whether to use single- or multi-threaded downloads.
Proposed Solution
There are 2 possible solutions I have in mind:
- Add cluster-wide configuration to allow switching to the blob downloader for files over a certain size. I think this would be similar to the existing
Ais-Blob-Download header, just on a cluster level instead of a request level
- Note that this would require a HEAD request before starting the cold GET to determine the implementation to use
- I believe we would also need to make an update to the behavior when multiple cold GETs are running in parallel for the same object. Right now, all but the first request will error. This contrasts to the normal cold GET implementation, where parallel requests will wait for the first cold GET to complete.
- I'm also not sure how scalable this is to fetching many files in parallel. I know that the blob downloader is implemented as an xaction, and creating large numbers of xactions isn't always well-supported (example).
- Update the AWS backend implementation to use multipart downloading, similar to the way it's implemented in the OCI backend
I'm not sure which is preferred - my main reason for opening this issue is to get opinions on that. I prefer the second one, since it's a smaller and simpler change to make, but the first would avoid duplicating the same multipart download behavior across all backend types.
Other Information
I'm happy to implement this. I just wanted to get opinions on 1. whether a PR adding this feature may be accepted, and 2. what the preferred approach is. I think it's pretty non-trivial to implement, so I wanted to check this before spending time on it.
Acknowledgements
AIStore build (latest, v3.22, ...)
v4.8
Environment details (OS name and version, etc.)
Ubuntu 24.04, Kubernetes 1.34.1
Describe the feature
We are caching some fairly large files in AIStore (~5 GB) stored in an OCI bucket. We're using the "AWS" backend with their S3 compatibility API, since it's more mature than the OCI backend. The issue we have is that, when cold getting these files, fetching the file into AIStore is very slow. It would be nice if AIStore would use multipart downloading for better performance.
I'm aware of the blob downloader, which does download large files in multiple parts. It doesn't quite work for our use case though, as it pushes the decision between single-threaded and multi-threaded downloading onto users. As the cluster administrator, I would like a way to configure a multipart download threshold and part size and have it automatically apply to any applicable cold GET requests.
Use Case
When cold getting files from an upstream S3 bucket, we can get improved performance using multipart downloading. I want to configure this behavior cluster-wide, so users of AIStore don't have to think about whether to use single- or multi-threaded downloads.
Proposed Solution
There are 2 possible solutions I have in mind:
Ais-Blob-Downloadheader, just on a cluster level instead of a request levelI'm not sure which is preferred - my main reason for opening this issue is to get opinions on that. I prefer the second one, since it's a smaller and simpler change to make, but the first would avoid duplicating the same multipart download behavior across all backend types.
Other Information
I'm happy to implement this. I just wanted to get opinions on 1. whether a PR adding this feature may be accepted, and 2. what the preferred approach is. I think it's pretty non-trivial to implement, so I wanted to check this before spending time on it.
Acknowledgements
AIStore build (latest, v3.22, ...)
v4.8
Environment details (OS name and version, etc.)
Ubuntu 24.04, Kubernetes 1.34.1