forked from TrueCloudLab/restic
Increase concurrency for loading blobs
This commit is contained in:
parent
b6f25aa690
commit
677a5038c5
1 changed files with 4 additions and 3 deletions
|
@ -18,6 +18,7 @@ import (
|
||||||
const (
|
const (
|
||||||
maxConcurrentBlobs = 32
|
maxConcurrentBlobs = 32
|
||||||
maxConcurrency = 10
|
maxConcurrency = 10
|
||||||
|
maxConcurrencyPreload = 100
|
||||||
|
|
||||||
// chunkerBufSize is used in pool.go
|
// chunkerBufSize is used in pool.go
|
||||||
chunkerBufSize = 512 * chunker.KiB
|
chunkerBufSize = 512 * chunker.KiB
|
||||||
|
@ -80,7 +81,7 @@ func (arch *Archiver) Preload() error {
|
||||||
|
|
||||||
// start workers
|
// start workers
|
||||||
var wg sync.WaitGroup
|
var wg sync.WaitGroup
|
||||||
for i := 0; i < maxConcurrency; i++ {
|
for i := 0; i < maxConcurrencyPreload; i++ {
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
go worker(&wg, idCh)
|
go worker(&wg, idCh)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue