mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/mergeset: tune caches size limits for indexdb/dataBlocks
and indexdb/indexBlocks
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2007
This commit is contained in:
parent
5f84b17ed6
commit
ede93469ea
2 changed files with 3 additions and 3 deletions
|
@ -17,7 +17,7 @@ var ibCache = blockcache.NewCache(getMaxInmemoryBlocksCacheSize)
|
||||||
|
|
||||||
func getMaxIndexBlocksCacheSize() int {
|
func getMaxIndexBlocksCacheSize() int {
|
||||||
maxIndexBlockCacheSizeOnce.Do(func() {
|
maxIndexBlockCacheSizeOnce.Do(func() {
|
||||||
maxIndexBlockCacheSize = memory.Allowed() / 10
|
maxIndexBlockCacheSize = int(0.2 * float64(memory.Allowed()))
|
||||||
})
|
})
|
||||||
return maxIndexBlockCacheSize
|
return maxIndexBlockCacheSize
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ var (
|
||||||
|
|
||||||
func getMaxInmemoryBlocksCacheSize() int {
|
func getMaxInmemoryBlocksCacheSize() int {
|
||||||
maxInmemoryBlockCacheSizeOnce.Do(func() {
|
maxInmemoryBlockCacheSizeOnce.Do(func() {
|
||||||
maxInmemoryBlockCacheSize = memory.Allowed() / 4
|
maxInmemoryBlockCacheSize = int(0.3 * float64(memory.Allowed()))
|
||||||
})
|
})
|
||||||
return maxInmemoryBlockCacheSize
|
return maxInmemoryBlockCacheSize
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ var ibCache = blockcache.NewCache(getMaxIndexBlocksCacheSize)
|
||||||
|
|
||||||
func getMaxIndexBlocksCacheSize() int {
|
func getMaxIndexBlocksCacheSize() int {
|
||||||
maxIndexBlockCacheSizeOnce.Do(func() {
|
maxIndexBlockCacheSizeOnce.Do(func() {
|
||||||
maxIndexBlockCacheSize = memory.Allowed() / 10
|
maxIndexBlockCacheSize = int(0.1 * float64(memory.Allowed()))
|
||||||
})
|
})
|
||||||
return maxIndexBlockCacheSize
|
return maxIndexBlockCacheSize
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue