Skip to content

Raise default number of workers#1288

Merged
gustavo-grieco merged 1 commit intomasterfrom
dev-workers-default
Jul 16, 2024
Merged

Raise default number of workers#1288
gustavo-grieco merged 1 commit intomasterfrom
dev-workers-default

Conversation

@elopez
Copy link
Copy Markdown
Member

@elopez elopez commented Jul 15, 2024

Now the default number of workers will be equal to the number of cores on the system, with a minimum of 1 and a maximum of 4.

getNFuzzWorkers conf = fromIntegral (fromMaybe 1 (conf.workers))
getNFuzzWorkers conf = maybe defaultN fromIntegral conf.workers
where
n = numCapabilities
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it the same as getNumCapabilities?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, but this is "pure", getNumCapabilities is IO

where
n = numCapabilities
maxN = max 1 (n - 1) -- one dedicated thread for shrinking
defaultN = min 3 maxN -- capped at 3 by default
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we cap at 3?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ggrieco-tob suggested the value

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a reasonable number for default, we can increase if we want later.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I switched it to 4, considering I dropped the -1

@0xalpharush
Copy link
Copy Markdown

Does this close #1252

Now the default number of workers will be equal to the number
of cores on the system, with a minimum of 1 and a maximum of 4.
@elopez elopez force-pushed the dev-workers-default branch from d514836 to 28575e5 Compare July 16, 2024 11:57
@gustavo-grieco gustavo-grieco merged commit 3b5d6d9 into master Jul 16, 2024
@gustavo-grieco gustavo-grieco deleted the dev-workers-default branch July 16, 2024 12:08
datradito pushed a commit to datradito/echidna-mcp that referenced this pull request Dec 29, 2025
Now the default number of workers will be equal to the number
of cores on the system, with a minimum of 1 and a maximum of 4.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants