prometheus/tsdb/tsdbutil
Justin Lei 8ef7dfdeeb
Add a chunk size limit in bytes (#12054)
Add a chunk size limit in bytes

This creates a hard cap for XOR chunks of 1024 bytes.

The limit for histogram chunk is also 1024 bytes, but it is a soft limit as a histogram has a dynamic size, and even a single one could be larger than 1024 bytes.

This also avoids cutting new histogram chunks if the existing chunk has fewer than 10 histograms yet. In that way, we are accepting "jumbo chunks" in order to have at least 10 histograms in a chunk, allowing compression to kick in.

Signed-off-by: Justin Lei <justin.lei@grafana.com>
2023-08-24 15:21:17 +02:00
..
dir_locker_test.go Share TSDB locker code with agent (#9623) 2021-11-11 11:45:25 -05:00
dir_locker_testutil.go refactor: move from io/ioutil to io and os packages (#10528) 2022-04-27 11:24:36 +02:00
dir_locker.go Share TSDB locker code with agent (#9623) 2021-11-11 11:45:25 -05:00
histogram.go Add a chunk size limit in bytes (#12054) 2023-08-24 15:21:17 +02:00