mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-03 16:21:14 +01: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
@ -1323,10 +1323,7 @@ func getCompressLevel(itemsCount uint64) int {
|
||||
if itemsCount <= 1<<25 {
|
||||
return 2
|
||||
}
|
||||
if itemsCount <= 1<<28 {
|
||||
return 3
|
||||
}
|
||||
return 4
|
||||
return 3
|
||||
}
|
||||
|
||||
func (tb *Table) nextMergeIdx() uint64 {
|
||||
|
@ -1542,13 +1542,7 @@ func getCompressLevel(rowsPerBlock float64) int {
|
||||
if rowsPerBlock <= 1000 {
|
||||
return 2
|
||||
}
|
||||
if rowsPerBlock <= 2000 {
|
||||
return 3
|
||||
}
|
||||
if rowsPerBlock <= 4000 {
|
||||
return 4
|
||||
}
|
||||
return 5
|
||||
return 3
|
||||
}
|
||||
|
||||
func (pt *partition) nextMergeIdx() uint64 {
|
||||
|
Loading…
Reference in New Issue
Block a user