mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-26 22:19:40 -08:00
Tweak and verify a few parameters.
Remove TODOs accordingly. Change-Id: Ic062e13b6ae89a9135d3f14011114fe1cca1cef8
This commit is contained in:
parent
5f8e9617ef
commit
4efc60174b
|
@ -43,15 +43,13 @@ const (
|
||||||
headsFormatVersion = 1
|
headsFormatVersion = 1
|
||||||
headsMagicString = "PrometheusHeads"
|
headsMagicString = "PrometheusHeads"
|
||||||
|
|
||||||
fileBufSize = 1 << 16 // 64kiB. TODO: Tweak.
|
fileBufSize = 1 << 16 // 64kiB.
|
||||||
|
|
||||||
chunkHeaderLen = 17
|
chunkHeaderLen = 17
|
||||||
chunkHeaderTypeOffset = 0
|
chunkHeaderTypeOffset = 0
|
||||||
chunkHeaderFirstTimeOffset = 1
|
chunkHeaderFirstTimeOffset = 1
|
||||||
chunkHeaderLastTimeOffset = 9
|
chunkHeaderLastTimeOffset = 9
|
||||||
|
|
||||||
// TODO: Consider making any of these configurable? At least tweak
|
|
||||||
// them. As of now, these are educated guesses.
|
|
||||||
indexingMaxBatchSize = 1024 * 1024
|
indexingMaxBatchSize = 1024 * 1024
|
||||||
indexingBatchTimeout = 500 * time.Millisecond // Commit batch when idle for that long.
|
indexingBatchTimeout = 500 * time.Millisecond // Commit batch when idle for that long.
|
||||||
indexingQueueCapacity = 1024
|
indexingQueueCapacity = 1024
|
||||||
|
|
|
@ -98,7 +98,7 @@ func NewMemorySeriesStorage(o *MemorySeriesStorageOptions) (Storage, error) {
|
||||||
numSeries.Set(float64(fpToSeries.length()))
|
numSeries.Set(float64(fpToSeries.length()))
|
||||||
|
|
||||||
return &memorySeriesStorage{
|
return &memorySeriesStorage{
|
||||||
fpLocker: newFingerprintLocker(100), // TODO: Tweak value.
|
fpLocker: newFingerprintLocker(256),
|
||||||
fpToSeries: fpToSeries,
|
fpToSeries: fpToSeries,
|
||||||
|
|
||||||
loopStopping: make(chan struct{}),
|
loopStopping: make(chan struct{}),
|
||||||
|
|
|
@ -492,7 +492,7 @@ func BenchmarkFuzz(b *testing.B) {
|
||||||
o := &MemorySeriesStorageOptions{
|
o := &MemorySeriesStorageOptions{
|
||||||
MemoryEvictionInterval: time.Second,
|
MemoryEvictionInterval: time.Second,
|
||||||
MemoryRetentionPeriod: 10 * time.Minute,
|
MemoryRetentionPeriod: 10 * time.Minute,
|
||||||
PersistencePurgeInterval: 10 * time.Second,
|
le PersistencePurgeInterval: 10 * time.Second,
|
||||||
PersistenceRetentionPeriod: time.Hour,
|
PersistenceRetentionPeriod: time.Hour,
|
||||||
PersistenceStoragePath: directory.Path(),
|
PersistenceStoragePath: directory.Path(),
|
||||||
CheckpointInterval: 3 * time.Second,
|
CheckpointInterval: 3 * time.Second,
|
||||||
|
|
Loading…
Reference in a new issue