mirror of
https://github.com/restic/restic.git
synced 2026-02-03 12:29:37 -05:00
restore: reduce contention while writing files
This commit is contained in:
parent
b9afdf795e
commit
0ee9360f3e
1 changed files with 6 additions and 4 deletions
|
|
@ -79,10 +79,12 @@ func newFileRestorer(dst string,
|
|||
workerCount := int(connections)
|
||||
|
||||
return &fileRestorer{
|
||||
idx: idx,
|
||||
blobsLoader: blobsLoader,
|
||||
startWarmup: startWarmup,
|
||||
filesWriter: newFilesWriter(workerCount, allowRecursiveDelete),
|
||||
idx: idx,
|
||||
blobsLoader: blobsLoader,
|
||||
startWarmup: startWarmup,
|
||||
// use a large number of buckets to minimize bucket contention in filesWriter
|
||||
// buckets are relatively cheap, so we can afford to have a lot of them
|
||||
filesWriter: newFilesWriter(1024, allowRecursiveDelete),
|
||||
zeroChunk: repository.ZeroChunk(),
|
||||
sparse: sparse,
|
||||
progress: progress,
|
||||
|
|
|
|||
Loading…
Reference in a new issue