Skip to content

Commit

Permalink
[chore] - Reduce VerificationOverlapWorkers (#3082)
Browse files Browse the repository at this point in the history
* reduce worker count

* reduce detector worker count
  • Loading branch information
ahrav committed Jul 20, 2024
1 parent 7a36e89 commit 8f172b2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/engine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -620,9 +620,8 @@ func (e *Engine) startScannerWorkers(ctx context.Context) {
}
}

const detectorWorkerMultiplier = 50

func (e *Engine) startDetectorWorkers(ctx context.Context) {
const detectorWorkerMultiplier = 4
ctx.Logger().V(2).Info("starting detector workers", "count", e.concurrency*detectorWorkerMultiplier)
for worker := uint64(0); worker < uint64(e.concurrency*detectorWorkerMultiplier); worker++ {
e.wgDetectorWorkers.Add(1)
Expand All @@ -636,9 +635,8 @@ func (e *Engine) startDetectorWorkers(ctx context.Context) {
}

func (e *Engine) startVerificationOverlapWorkers(ctx context.Context) {
const verificationOverlapWorkerMultiplier = detectorWorkerMultiplier
ctx.Logger().V(2).Info("starting verificationOverlap workers", "count", e.concurrency)
for worker := uint64(0); worker < uint64(e.concurrency*verificationOverlapWorkerMultiplier); worker++ {
for worker := uint64(0); worker < uint64(e.concurrency); worker++ {
e.verificationOverlapWg.Add(1)
go func() {
ctx := context.WithValue(ctx, "verification_overlap_worker_id", common.RandomID(5))
Expand Down

0 comments on commit 8f172b2

Please sign in to comment.