-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Over account ram usage of array-based vectors #104159
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pinging @elastic/es-analytics-geo (Team:Analytics) |
elasticsearchmachine
added
the
Team:Analytics
Meta label for analytical engine team (ESQL/Aggs/Geo)
label
Jan 9, 2024
nik9000
approved these changes
Jan 9, 2024
Thanks, Nik! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Belated LGTM. Thanks Nhat
dnhatn
added a commit
that referenced
this pull request
Jan 10, 2024
This PR enables ESQL heap attack tests. I have run this suite over 500 iterations with different hardware configurations for the last two days, and all have been successful with the changes in #104159. Additionally, this PR adds an action that can trigger OOM to generate a heap dump if a test takes more than 5 minutes. I've seen cases (previously with our CI) where the test didn't result in OOM but was taking too long. Having the ability to inspect the heap in such cases would be beneficial. Closes #103527 Closes #100678
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
:Analytics/ES|QL
AKA ESQL
>non-issue
Team:Analytics
Meta label for analytical engine team (ESQL/Aggs/Geo)
v8.13.0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is part of the effort to enable heap attack tests.
Currently, when creating Blocks from Vectors, we don't account for the extra bytes used by VectorBlock alongside the Vector. In heap attack tests, the unaccounted memory can be significant, as seen in the manyEval test, where the unaccounted bytes is 40, while the vector is just 128 bytes, resulting in an OOM instead of triggering the circuit breaker.
Ideally,
Vector#asBlock
should adjust the breaker, and callers should release the returned block. While I tried to implement this, there are many places in our tests where we useVector#asBlock
without releasing the block. This is possible becauseVector#asBlock
doesn't increase the reference to the vector. In the long run, I think we should removeVector#asBlock
and force that callers usenewBlockFromVector
from the BlockFactory. This would provide clearer semantics and enable proper tracking of blocks in assertions.This PR adds the extra bytes used by VectorBlock to ArrayVector, allowing us to run heap-attack tests.