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

Significantly Lower Monitoring HttpExport Memory Footprint (#48854) #48966

Merged
merged 1 commit into from
Nov 12, 2019

Conversation

original-brownbear
Copy link
Member

The HttpExportBulk exporter is using a lot more memory than it needs to
by allocating buffers for serialization and IO:

  • Remove copying of all bytes when flushing, instead use the stream wrapper
  • Remove copying step turning the BAOS into a byte[]
    • This also avoids the allocation of a single huge byte[] and instead makes use of the internal paging logic of the BytesStreamOutput
  • Don't allocate a new BAOS for every document, just keep appending to a single BAOS

backport of #48854

…8854)

The `HttpExportBulk` exporter is using a lot more memory than it needs to
by allocating buffers for serialization and IO:

* Remove copying of all bytes when flushing, instead use the stream wrapper
* Remove copying step turning the BAOS into a `byte[]`
  * This also avoids the allocation of a single huge `byte[]` and instead makes use of the internal paging logic of the `BytesStreamOutput`
* Don't allocate a new BAOS for every document, just keep appending to a single BAOS
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (:Core/Features/Monitoring)

@original-brownbear original-brownbear merged commit ea9f094 into elastic:7.x Nov 12, 2019
@original-brownbear original-brownbear deleted the 48854-7.x branch November 12, 2019 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants