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

Make the default S3 buffer size depend on the available memory. #21299

Merged
merged 2 commits into from Nov 3, 2016

Conversation

jpountz
Copy link
Contributor

@jpountz jpountz commented Nov 3, 2016

Currently the default S3 buffer size is 100MB, which can be a lot for small
heaps. This pull request updates the default to be 100MB for heaps that are
greater than 2GB and 5% of the heap size otherwise.

Currently the default S3 buffer size is 100MB, which can be a lot for small
heaps. This pull request updates the default to be 100MB for heaps that are
greater than 2GB and 5% of the heap size otherwise.
/**
* buffer_size
* @see Repositories#BUFFER_SIZE_SETTING
*/
Setting<ByteSizeValue> BUFFER_SIZE_SETTING =
Setting.byteSizeSetting("buffer_size", new ByteSizeValue(100, ByteSizeUnit.MB),
Setting.byteSizeSetting("buffer_size", DEFAULT_BUFFER_SIZE,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other BUFFER_SIZE_SETTING (~ line 111) must also be updated.

(I hate those settings overrides...)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! I pushed an additional commit.

@s1monw
Copy link
Contributor

s1monw commented Nov 3, 2016

LGTM

@tlrx
Copy link
Member

tlrx commented Nov 3, 2016

LGTM 2

@jpountz jpountz merged commit 7ec51d6 into elastic:master Nov 3, 2016
@jpountz jpountz deleted the fix/smaller_buffer_size_s3 branch November 3, 2016 15:07
jpountz added a commit that referenced this pull request Nov 3, 2016
Currently the default S3 buffer size is 100MB, which can be a lot for small
heaps. This pull request updates the default to be 100MB for heaps that are
greater than 2GB and 5% of the heap size otherwise.
@clintongormley clintongormley added :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs and removed :Plugin Repository S3 labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >enhancement v5.1.1 v6.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants