mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/storage: do not take into account -storage.minFreeDiskSpaceBytes during background merges
This commit is contained in:
parent
06eff5a72c
commit
2fb5a6ca78
1 changed files with 3 additions and 4 deletions
|
@ -978,10 +978,9 @@ func SetFinalMergeDelay(delay time.Duration) {
|
|||
|
||||
func getMaxOutBytes(path string, workersCount int) uint64 {
|
||||
n := fs.MustGetFreeSpace(path)
|
||||
if n < freeDiskSpaceLimitBytes {
|
||||
return 0
|
||||
}
|
||||
n -= freeDiskSpaceLimitBytes
|
||||
// Do not substract freeDiskSpaceLimitBytes from n before calculating the maxOutBytes,
|
||||
// since this will result in sub-optimal merges - e.g. many small parts will be left unmerged.
|
||||
|
||||
// Divide free space by the max number concurrent merges.
|
||||
maxOutBytes := n / uint64(workersCount)
|
||||
if maxOutBytes > maxBigPartSize {
|
||||
|
|
Loading…
Reference in a new issue