mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/{storage,mergeset}: reduce the maxium compression level for the stored data
This reduces CPU usage a bit, while doesn't increase resulting file sizes according to synthetic tests.
This commit is contained in:
parent
05c9a4d7ce
commit
ae643ef1f1
2 changed files with 2 additions and 11 deletions
|
@ -1323,10 +1323,7 @@ func getCompressLevel(itemsCount uint64) int {
|
||||||
if itemsCount <= 1<<25 {
|
if itemsCount <= 1<<25 {
|
||||||
return 2
|
return 2
|
||||||
}
|
}
|
||||||
if itemsCount <= 1<<28 {
|
return 3
|
||||||
return 3
|
|
||||||
}
|
|
||||||
return 4
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (tb *Table) nextMergeIdx() uint64 {
|
func (tb *Table) nextMergeIdx() uint64 {
|
||||||
|
|
|
@ -1542,13 +1542,7 @@ func getCompressLevel(rowsPerBlock float64) int {
|
||||||
if rowsPerBlock <= 1000 {
|
if rowsPerBlock <= 1000 {
|
||||||
return 2
|
return 2
|
||||||
}
|
}
|
||||||
if rowsPerBlock <= 2000 {
|
return 3
|
||||||
return 3
|
|
||||||
}
|
|
||||||
if rowsPerBlock <= 4000 {
|
|
||||||
return 4
|
|
||||||
}
|
|
||||||
return 5
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (pt *partition) nextMergeIdx() uint64 {
|
func (pt *partition) nextMergeIdx() uint64 {
|
||||||
|
|
Loading…
Reference in a new issue