[RFC] Significantly reduce memory usage in AggregatingInOrderTransform#15543
Merged
CurtizJ merged 2 commits intoClickHouse:masterfrom Oct 5, 2020
Merged
Conversation
f6cd61e to
8195a30
Compare
Clean the aggregates pools (Arena's objects) between flushes, this will reduce memory usage significantly (since Arena is not intended for memory reuse in the already full Chunk's) Before this patch you cannot run SELECT FROM huge_table GROUP BY primary_key SETTINGS optimize_aggregation_in_order=1 (and the whole point of optimize_aggregation_in_order got lost), while after, this should be possible.
8195a30 to
2a2f858
Compare
Member
|
|
This was referenced Oct 5, 2020
robot-clickhouse
pushed a commit
that referenced
this pull request
Oct 5, 2020
…ggregatingInOrderTransform
robot-clickhouse
pushed a commit
that referenced
this pull request
Oct 5, 2020
…ggregatingInOrderTransform
robot-clickhouse
pushed a commit
that referenced
this pull request
Oct 5, 2020
…ggregatingInOrderTransform
robot-clickhouse
pushed a commit
that referenced
this pull request
Oct 5, 2020
…ggregatingInOrderTransform
CurtizJ
added a commit
that referenced
this pull request
Oct 6, 2020
Backport #15543 to 20.7: [RFC] Significantly reduce memory usage in AggregatingInOrderTransform
CurtizJ
added a commit
that referenced
this pull request
Oct 6, 2020
Backport #15543 to 20.8: [RFC] Significantly reduce memory usage in AggregatingInOrderTransform
CurtizJ
added a commit
that referenced
this pull request
Oct 6, 2020
Backport #15543 to 20.9: [RFC] Significantly reduce memory usage in AggregatingInOrderTransform
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Significantly reduce memory usage in AggregatingInOrderTransform/optimize_aggregation_in_order
Detailed description / Documentation draft:
Clean the aggregates pools (Arena's objects) between flushes, this will
reduce memory usage significantly (since Arena is not intended for
memory reuse in the already full Chunk's)
Before this patch you cannot run SELECT FROM huge_table GROUP BY
primary_key SETTINGS optimize_aggregation_in_order=1 (and the whole
point of optimize_aggregation_in_order got lost), while after, this
should be possible.
P.S. marked as bug fix, since it seems that this change should be backported (but personally I don't need this, so feel free to adjust this as you wish).
Refs: #9113
Details
HEAD: