60804c5a09
* Refactor: pass segment-reading function as param To allow a different implementation to be used when garbage-collecting. Signed-off-by: Bryan Boreham <bjboreham@gmail.com> * remote_write: reduce blocking from GC of series Add a method `UpdateSeriesSegment()` which is used together with `SeriesReset()` to garbage-collect old series. This allows us to split the lock around queueManager series data and avoid blocking `Append()` while reading series from the last checkpoint. Signed-off-by: Bryan Boreham <bjboreham@gmail.com> * Cosmetic: review feedback on comments Signed-off-by: Bryan Boreham <bjboreham@gmail.com> * remote-write benchmark: include GC of series Reduce the total number of samples per iteration from 5000*5000 (25 million) which is too big for my laptop, to 1*10000. Extend `createTimeseries()` to add additional labels, so that the queue manager is doing more realistic work. Move the Append() call to a background goroutine - this works because TestWriteClient uses a WaitGroup to signal completion. Call `StoreSeries()` and `SeriesReset()` while adding samples, to simulate the garbage-collection that wal.Watcher does. Signed-off-by: Bryan Boreham <bjboreham@gmail.com> * Change BenchmarkSampleDelivery to call UpdateSeriesSegment This matches what Watcher.garbageCollectSeries() is doing now Signed-off-by: Bryan Boreham <bjboreham@gmail.com> |
||
---|---|---|
.. | ||
chunkenc | ||
chunks | ||
docs/format | ||
encoding | ||
errors | ||
fileutil | ||
goversion | ||
index | ||
record | ||
test | ||
testdata | ||
tombstones | ||
tsdbutil | ||
wal | ||
.gitignore | ||
CHANGELOG.md | ||
README.md | ||
block.go | ||
block_test.go | ||
blockwriter.go | ||
blockwriter_test.go | ||
compact.go | ||
compact_test.go | ||
db.go | ||
db_test.go | ||
exemplar.go | ||
exemplar_test.go | ||
head.go | ||
head_bench_test.go | ||
head_test.go | ||
isolation.go | ||
isolation_test.go | ||
mocks_test.go | ||
querier.go | ||
querier_bench_test.go | ||
querier_test.go | ||
repair.go | ||
repair_test.go | ||
tsdbblockutil.go | ||
wal.go | ||
wal_test.go |
README.md
TSDB
This directory contains the Prometheus storage layer that is used in its 2.x releases.
A writeup of its design can be found here.
Based on the Gorilla TSDB white papers.
Video: Storing 16 Bytes at Scale from PromCon 2017.
See also the format documentation.
A series of blog posts explaining different components of TSDB: