Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise default number of workers #1288

Merged
merged 1 commit into from
Jul 16, 2024
Merged

Raise default number of workers #1288

merged 1 commit into from
Jul 16, 2024

Conversation

elopez
Copy link
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
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
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

lib/Echidna/Types/Campaign.hs Outdated Show resolved Hide resolved
where
n = numCapabilities
maxN = max 1 (n - 1) -- one dedicated thread for shrinking
defaultN = min 3 maxN -- capped at 3 by default
Copy link
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
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
Member

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
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

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.
@ggrieco-tob ggrieco-tob merged commit 3b5d6d9 into master Jul 16, 2024
8 checks passed
@ggrieco-tob ggrieco-tob deleted the dev-workers-default branch July 16, 2024 12:08
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