prometheus/storage/local
beorn7 b02d900e61 Improve chunk and chunkDesc loading.
Also, clean up some things in the code (especially introduction of the
chunkLenWithHeader constant to avoid the same expression all over the place).

Benchmark results:

BEFORE
BenchmarkLoadChunksSequentially     5000            283580 ns/op          152143 B/op        312 allocs/op
BenchmarkLoadChunksRandomly        20000             82936 ns/op           39310 B/op         99 allocs/op
BenchmarkLoadChunkDescs            10000            110833 ns/op           15092 B/op        345 allocs/op

AFTER
BenchmarkLoadChunksSequentially    10000            146785 ns/op          152285 B/op        315 allocs/op
BenchmarkLoadChunksRandomly        20000             67598 ns/op           39438 B/op        103 allocs/op
BenchmarkLoadChunkDescs            20000             99631 ns/op           12636 B/op        192 allocs/op

Note that everything is obviously loaded from the page cache (as the
benchmark runs thousands of times with very small series files). In a
real-world scenario, I expect a larger impact, as the disk operations
will more often actually hit the disk. To load ~50 sequential chunks,
this reduces the iops from 100 seeks and 100 reads to 1 seek and 1
read.
2015-04-13 21:06:04 +02:00
..
codable Clean up license issues. 2015-01-21 20:07:45 +01:00
fixtures/b0 Add benchmark for loading chunks and chunk descs. 2015-03-19 19:28:21 +01:00
flock Use named returns in flock.New. 2015-01-19 14:31:16 +01:00
index Declare storage.local.index-cache-size.* default values as tweaked. 2015-01-29 13:04:54 +01:00
chunk.go Improve chunk and chunkDesc loading. 2015-04-13 21:06:04 +02:00
crashrecovery.go Improve chunk and chunkDesc loading. 2015-04-13 21:06:04 +02:00
delta.go Improve chunk and chunkDesc loading. 2015-04-13 21:06:04 +02:00
delta_helpers.go Make floats exact again. 2015-03-06 17:03:56 +01:00
doubledelta.go Improve chunk and chunkDesc loading. 2015-04-13 21:06:04 +02:00
instrumentation.go Instrument series maintenance durations. 2015-03-19 17:06:16 +01:00
interface.go Remove the sample ingestion channel. 2015-03-15 14:08:22 +01:00
locker.go Fix and improve the fp locker. 2014-11-25 17:07:45 +01:00
locker_test.go Fix a few concurrency issues before starting to use the new fp locker. 2014-11-25 17:07:45 +01:00
persistence.go Improve chunk and chunkDesc loading. 2015-04-13 21:06:04 +02:00
persistence_test.go Add benchmark for loading chunks and chunk descs. 2015-03-19 19:28:21 +01:00
preload.go Clean up license issues. 2015-01-21 20:07:45 +01:00
series.go Increase resilience of the storage against data corruption - step 3. 2015-03-19 15:44:11 +01:00
storage.go Fix the case where a series in memory has 0 chunks, but chunks on disk. 2015-04-09 15:57:11 +02:00
storage_test.go Remove obsolete debug message. 2015-04-13 16:59:52 +02:00
test_helpers.go Increase resilience of the storage against data corruption - step 4. 2015-03-19 15:58:02 +01:00