Skip to content

Commit 4c7a102

Browse files
valyalatruepele
authored andcommitted
lib/logstorage/consts.go: document that it isn't recommended setting maxColumnsPerBlock constant to too big values
This should help avoiding cases like this one - https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6425#issuecomment-2337446083
1 parent bc4ef70 commit 4c7a102

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/logstorage/consts.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ const maxUncompressedBlockSize = 2 * 1024 * 1024
1414
const maxRowsPerBlock = 8 * 1024 * 1024
1515

1616
// maxColumnsPerBlock is the maximum number of columns per block.
17+
//
18+
// It isn't recommended setting this value to too big value, because this may result
19+
// in excess memory usage during data ingestion and significant slowdown during query execution,
20+
// since every column header is unpacked in every matching block during query execution.
1721
const maxColumnsPerBlock = 1_000
1822

1923
// MaxFieldNameSize is the maximum size in bytes for field name.

0 commit comments

Comments
 (0)