Skip to content
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

S3FileLoaderIterDataPipe buffer_size #1215

Open
commonism opened this issue Nov 17, 2023 · 0 comments
Open

S3FileLoaderIterDataPipe buffer_size #1215

commonism opened this issue Nov 17, 2023 · 0 comments

Comments

@commonism
Copy link

📚 The doc issue

The default for S3 buffer size is 128 MB - or 128 * (1024**2)

static const size_t S3DefaultBufferSize = 128 * 1024 * 1024; // 128 MB

The example for S3FileLoaderIterDataPipe uses a buffer_size of 256.

dp_s3_files = sharded_s3_urls.load_files_by_s3(buffer_size=256)

Using a 256 bytes buffer degrades performance and allows the assumption buffer_size is provided in mbytes, as the example would double the 128 mbyte default.

Suggest a potential alternative/fix

document buffer_size to be in bytes and have the example use 256 * (1024**2) as value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant