mirror of
https://github.com/octoleo/restic.git
synced 2024-11-26 14:56:29 +00:00
archiver: Limit blob saver count to GOMAXPROCS
Now with the asynchronous uploaders there's no more benefit from using more blob savers than we have CPUs. Thus use just one blob saver for each CPU we are allowed to use.
This commit is contained in:
parent
120ccc8754
commit
bba1e81719
@ -122,7 +122,9 @@ func (o Options) ApplyDefaults() Options {
|
||||
}
|
||||
|
||||
if o.SaveBlobConcurrency == 0 {
|
||||
o.SaveBlobConcurrency = uint(runtime.NumCPU())
|
||||
// blob saving is CPU bound due to hash checking and encryption
|
||||
// the actual upload is handled by the repository itself
|
||||
o.SaveBlobConcurrency = uint(runtime.GOMAXPROCS(0))
|
||||
}
|
||||
|
||||
if o.SaveTreeConcurrency == 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user