-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Description
Proposal
We have been trying to fill a chunk (the one that uses the Gorilla compression for float value samples, called XORChunk internally) with up to 120 samples with some more logic around to keep the number of samples in a chunk consistent for a series within a block. Compacting multiple blocks together also caps it at 120 samples.
This is insufficient because depending on how well some samples compress, the size of the chunk can grow big, to a few KB.
We should additionally be limiting the size of the chunk. While it may or may not benefit Prometheus directly, the predictability of a chunk size can greatly help downstream users who can later backport any optimizations back to Prometheus.
Without any numbers in hand, I propose to cap at 1024B for a chunk with float samples (there is #11219 for histogram chunks).
The proposal is to cap the chunk size across the board - in the head block, during compaction where you merge chunks, etc.