Skip to content

Commit

Permalink
perf: improve concurrency numberS
Browse files Browse the repository at this point in the history
  • Loading branch information
istae committed Jan 23, 2025
1 parent 4006aaf commit 25ef1da
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
6 changes: 1 addition & 5 deletions pkg/pusher/pusher.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,10 @@ type Service struct {

const (
traceDuration = 30 * time.Second // duration for every root tracing span
ConcurrentPushes = 100 // how many chunks to push simultaneously
ConcurrentPushes = swarm.Branches // how many chunks to push simultaneously
DefaultRetryCount = 6
)

var (
ErrInvalidAddress = errors.New("invalid address")
)

func New(
networkID uint64,
storer Storer,
Expand Down
1 change: 0 additions & 1 deletion pkg/pushsync/pushsync.go
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,6 @@ func (ps *PushSync) push(parentCtx context.Context, resultChan chan<- receiptRes
select {
case resultChan <- receiptResult{pushTime: now, peer: peer, err: err, receipt: receipt}:
case <-parentCtx.Done():
ps.logger.Debug("push result parent context canceled", "chunk_address", ch.Address(), "peer_address", peer)
}
}()

Expand Down
2 changes: 1 addition & 1 deletion pkg/storer/storer.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ const (
defaultWriteBufferSize = uint64(32 * 1024 * 1024)
defaultDisableSeeksCompaction = false
defaultCacheCapacity = uint64(1_000_000)
defaultBgCacheWorkers = 16
defaultBgCacheWorkers = 128
DefaultReserveCapacity = 1 << 22 // 4194304 chunks

indexPath = "indexstore"
Expand Down

0 comments on commit 25ef1da

Please sign in to comment.