lib/mergeset: tune sizes for indexdb/dataBlocks and indexdb/indexBlocks according to production workload

This should help with https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2007#issuecomment-1032308742
This commit is contained in:
Aliaksandr Valialkin 2022-02-08 17:58:47 +02:00
parent af77f449da
commit 2455a988e4
No known key found for this signature in database
GPG Key ID: A72BEC6CD3D0DED1

View File

@ -17,7 +17,7 @@ var ibCache = blockcache.NewCache(getMaxInmemoryBlocksCacheSize)
func getMaxIndexBlocksCacheSize() int {
maxIndexBlockCacheSizeOnce.Do(func() {
maxIndexBlockCacheSize = int(0.2 * float64(memory.Allowed()))
maxIndexBlockCacheSize = int(0.1 * float64(memory.Allowed()))
})
return maxIndexBlockCacheSize
}
@ -29,7 +29,7 @@ var (
func getMaxInmemoryBlocksCacheSize() int {
maxInmemoryBlockCacheSizeOnce.Do(func() {
maxInmemoryBlockCacheSize = int(0.3 * float64(memory.Allowed()))
maxInmemoryBlockCacheSize = int(0.45 * float64(memory.Allowed()))
})
return maxInmemoryBlockCacheSize
}