-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Memory tracking issue in groupBitmapState ? #26555
Copy link
Copy link
Closed
Labels
comp-aggregate-functionsAggregate function implementations (sum, avg, count, quantile, combinators, etc.).Aggregate function implementations (sum, avg, count, quantile, combinators, etc.).memoryWhen memory usage is higher than expectedWhen memory usage is higher than expectedminorPriority: minorPriority: minor
Description
That query uses about 10Gb of RAM, should fail with that setting.
In practice it can go OOM, and clickhouse memory tracker doesn't know about that:
SET max_threads = 8, max_memory_usage = '3G';
CREATE TABLE oom_issue ENGINE = AggregatingMergeTree ORDER BY n AS SELECT cityHash64(rand() % 1000) as n, groupBitmapState(number) FROM numbers_mt(2000000000) GROUP BY n;
[laptop-5591] 2021.07.20 13:22:45.739115 [ 272424 ] {cda8ab45-5c7c-47de-83eb-14ec6d0fdb4c} <Debug> MemoryTracker: Peak memory usage (for query): 6.53 MiB.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
comp-aggregate-functionsAggregate function implementations (sum, avg, count, quantile, combinators, etc.).Aggregate function implementations (sum, avg, count, quantile, combinators, etc.).memoryWhen memory usage is higher than expectedWhen memory usage is higher than expectedminorPriority: minorPriority: minor