prometheus/tsdb
Oleg Zaytsev cd1f8ac129
MemPostings: keep a map of label values slices (#15426)
While investigating lock contention on `MemPostings`, we saw that lots
of locking is happening in `LabelValues` and
`PostingsForLabelsMatching`, both copying the label values slices while
holding the mutex.

This adds an extra map that holds an append-only label values slice for
each one of the label names. Since the slice is append-only, it can be
copied without holding the mutex.

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2024-11-29 12:52:56 +01:00
..
agent
chunkenc tsdb/chunkenc: don't reuse custom value slices between histograms 2024-11-29 16:28:09 +11:00
chunks
docs [DOCS] Improve description of WAL record format (#14936) 2024-11-26 11:48:17 +00:00
encoding
errors
fileutil
goversion
index MemPostings: keep a map of label values slices (#15426) 2024-11-29 12:52:56 +01:00
record
testdata
tombstones
tsdbutil
wlog [TESTS] Remote-Write: Fix BenchmarkStartup 2024-11-15 11:22:07 +00:00
.gitignore
CHANGELOG.md
README.md
block.go [PERF] TSDB: Optimize inverse matching (#14144) 2024-11-19 15:49:01 +00:00
block_test.go feat: Allow customizing TSDB postings decoder (#13567) 2024-11-11 07:59:24 +01:00
blockwriter.go
blockwriter_test.go feat: Allow customizing TSDB postings decoder (#13567) 2024-11-11 07:59:24 +01:00
compact.go Merge pull request #14489 from harry671003/implement_metadata_limit 2024-11-19 17:32:16 +01:00
compact_test.go feat: Allow customizing TSDB postings decoder (#13567) 2024-11-11 07:59:24 +01:00
db.go feat: Allow customizing TSDB postings decoder (#13567) 2024-11-11 07:59:24 +01:00
db_test.go Always return unknown hint for first sample in non-gauge histogram chunk (#15343) 2024-11-12 15:14:06 +01:00
example_test.go
exemplar.go
exemplar_test.go
head.go
head_append.go [BUGFIX] TSDB: Fix race on stale values in headAppender (#15322) 2024-11-06 16:51:39 +01:00
head_bench_test.go
head_dedupelabels.go
head_other.go
head_read.go [PERF] TSDB: Optimize inverse matching (#14144) 2024-11-19 15:49:01 +00:00
head_read_test.go
head_test.go Always return unknown hint for first sample in non-gauge histogram chunk (#15343) 2024-11-12 15:14:06 +01:00
head_wal.go [BUGFIX] TSDB: Apply fixes from loadWAL to loadWBL 2024-11-11 18:41:33 +00:00
isolation.go
isolation_test.go
mocks_test.go
ooo_head.go
ooo_head_read.go [PERF] TSDB: Optimize inverse matching (#14144) 2024-11-19 15:49:01 +00:00
ooo_head_read_test.go
ooo_head_test.go Always return unknown hint for first sample in non-gauge histogram chunk (#15343) 2024-11-12 15:14:06 +01:00
ooo_isolation.go
ooo_isolation_test.go
querier.go Optimize l=~".+" matcher (#15474) 2024-11-27 12:33:20 +01:00
querier_bench_test.go feat: Allow customizing TSDB postings decoder (#13567) 2024-11-11 07:59:24 +01:00
querier_test.go Merge pull request #14489 from harry671003/implement_metadata_limit 2024-11-19 17:32:16 +01:00
repair.go
repair_test.go feat: Allow customizing TSDB postings decoder (#13567) 2024-11-11 07:59:24 +01:00
testutil.go Always return unknown hint for first sample in non-gauge histogram chunk (#15343) 2024-11-12 15:14:06 +01:00
tsdbblockutil.go

README.md

TSDB

GoPkg

This directory contains the Prometheus TSDB (Time Series DataBase) library, which handles storage and querying of all Prometheus v2 data.

Documentation

External resources

A series of blog posts explaining different components of TSDB: