xl walk: Limit walk concurrent IO (#12885)

We are observing heavy system loads, potentially
locking the system up for periods when concurrent
listing operations are performed.

We place a per-disk lock on walk IO operations.
This will minimize the impact of concurrent listing
operations on the entire system and de-prioritize
them compared to other operations.

Single list operations should remain largely unaffected.
This commit is contained in:
Klaus Post
2021-08-19 03:10:36 +02:00
committed by GitHub
parent ee028a4693
commit c25816eabc
2 changed files with 13 additions and 0 deletions

View File

@@ -139,6 +139,9 @@ type xlStorage struct {
ctx context.Context
sync.RWMutex
// mutex to prevent concurrent read operations overloading walks.
walkMu sync.Mutex
}
// checkPathLength - returns error if given path name length more than 255