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:
Aliaksandr Valialkin 2024-01-23 17:44:05 +02:00
parent 05c9a4d7ce
commit ae643ef1f1
No known key found for this signature in database
GPG key ID: 52C003EE2BCDB9EB
2 changed files with 2 additions and 11 deletions

View file

@ -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 {

View file

@ -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 {