refactor: tune up max workers

This commit is contained in:
Urko 2023-07-27 09:46:14 +02:00
parent 46c1f03454
commit 4230146965
1 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ import (
) )
const writers = 10 const writers = 10
const maxConcurrentWeight = 4 const maxConcurrentWeight = 6
const largeFileSize = 500 * 1024 * 1024 // 500 MB const largeFileSize = 500 * 1024 * 1024 // 500 MB
type BackBalze struct { type BackBalze struct {
@ -40,7 +40,7 @@ func NewBackBlaze(bbID, bbKey string) *BackBalze {
return &BackBalze{ return &BackBalze{
bbID: bbID, bbID: bbID,
bbKey: bbKey, bbKey: bbKey,
maxWorkers: runtime.NumCPU(), maxWorkers: runtime.NumCPU() * 3,
} }
} }
func (b *BackBalze) WithBucket(bucketName string) *BackBalze { func (b *BackBalze) WithBucket(bucketName string) *BackBalze {