mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 08:23:34 +01:00
lib/storage: do not take into account -storage.minFreeDiskSpaceBytes during background merges
This commit is contained in:
parent
cf1d2f289b
commit
2e43cd9d62
@ -978,10 +978,9 @@ func SetFinalMergeDelay(delay time.Duration) {
|
|||||||
|
|
||||||
func getMaxOutBytes(path string, workersCount int) uint64 {
|
func getMaxOutBytes(path string, workersCount int) uint64 {
|
||||||
n := fs.MustGetFreeSpace(path)
|
n := fs.MustGetFreeSpace(path)
|
||||||
if n < freeDiskSpaceLimitBytes {
|
// Do not substract freeDiskSpaceLimitBytes from n before calculating the maxOutBytes,
|
||||||
return 0
|
// since this will result in sub-optimal merges - e.g. many small parts will be left unmerged.
|
||||||
}
|
|
||||||
n -= freeDiskSpaceLimitBytes
|
|
||||||
// Divide free space by the max number concurrent merges.
|
// Divide free space by the max number concurrent merges.
|
||||||
maxOutBytes := n / uint64(workersCount)
|
maxOutBytes := n / uint64(workersCount)
|
||||||
if maxOutBytes > maxBigPartSize {
|
if maxOutBytes > maxBigPartSize {
|
||||||
|
Loading…
Reference in New Issue
Block a user