From 4efc60174b7d4ba32f7e92767ab387b76cf29231 Mon Sep 17 00:00:00 2001 From: Bjoern Rabenstein Date: Tue, 4 Nov 2014 16:27:14 +0100 Subject: [PATCH] Tweak and verify a few parameters. Remove TODOs accordingly. Change-Id: Ic062e13b6ae89a9135d3f14011114fe1cca1cef8 --- storage/local/persistence.go | 4 +--- storage/local/storage.go | 2 +- storage/local/storage_test.go | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/storage/local/persistence.go b/storage/local/persistence.go index 6f6232655..e9d116db2 100644 --- a/storage/local/persistence.go +++ b/storage/local/persistence.go @@ -43,15 +43,13 @@ const ( headsFormatVersion = 1 headsMagicString = "PrometheusHeads" - fileBufSize = 1 << 16 // 64kiB. TODO: Tweak. + fileBufSize = 1 << 16 // 64kiB. chunkHeaderLen = 17 chunkHeaderTypeOffset = 0 chunkHeaderFirstTimeOffset = 1 chunkHeaderLastTimeOffset = 9 - // TODO: Consider making any of these configurable? At least tweak - // them. As of now, these are educated guesses. indexingMaxBatchSize = 1024 * 1024 indexingBatchTimeout = 500 * time.Millisecond // Commit batch when idle for that long. indexingQueueCapacity = 1024 diff --git a/storage/local/storage.go b/storage/local/storage.go index a970486af..15b8b7175 100644 --- a/storage/local/storage.go +++ b/storage/local/storage.go @@ -98,7 +98,7 @@ func NewMemorySeriesStorage(o *MemorySeriesStorageOptions) (Storage, error) { numSeries.Set(float64(fpToSeries.length())) return &memorySeriesStorage{ - fpLocker: newFingerprintLocker(100), // TODO: Tweak value. + fpLocker: newFingerprintLocker(256), fpToSeries: fpToSeries, loopStopping: make(chan struct{}), diff --git a/storage/local/storage_test.go b/storage/local/storage_test.go index 51d4b7944..2cd0b4d8b 100644 --- a/storage/local/storage_test.go +++ b/storage/local/storage_test.go @@ -492,7 +492,7 @@ func BenchmarkFuzz(b *testing.B) { o := &MemorySeriesStorageOptions{ MemoryEvictionInterval: time.Second, MemoryRetentionPeriod: 10 * time.Minute, - PersistencePurgeInterval: 10 * time.Second, +le PersistencePurgeInterval: 10 * time.Second, PersistenceRetentionPeriod: time.Hour, PersistenceStoragePath: directory.Path(), CheckpointInterval: 3 * time.Second,