-
Notifications
You must be signed in to change notification settings - Fork 30
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
Make ~num_domains
in Task.setup_pool
optional
#91
base: main
Are you sure you want to change the base?
Conversation
Makes the command line between sequential and parallel versions identical.
The latter part of your question ("-1 peppered around") is related to the discussion in #77. We have to be a bit careful about "a pool of n domains" means. Your default choice of |
This is related to #77 (comment). |
The idea to have multiple pools came from @yurug for the Tezos usecase. The idea was that you could have separate pools for parallelising crypto and serialization. This would allow Tezos to model an ideal machines with a fixed number of domains for crypto and serialisation so that they can estimate the gas costs well. |
Slightly more comments;
(What's a reasonable "simplest workflow" for Task.run ? Do we expect people to call |
I think that's a reasonable assumption for default values. For other cases we can expect users to customise pools for their needs. As an example, I've found this to not work on our benchmarking servers with isolated cores.
Agreed! That's definitely useful to have.
We discussed this a while ago (to be fair, before effect handlers were introduced to manage tasks); having a default pool would indeed simplify the Task API. A downside to this is when there is more than one application using domainslib interacting with each other, with a default pool of its own. Also, some applications could use the default pool and others set up their own, again possibly creating more domains than ideal. |
The first commit closes #87
I then updated the tests to utilise this default - this changes the behaviour of
dune runtest
which now runs those tests in parallel (which presumably was wanted??).I changed the argument order for all tests to put the number of domains last - that's an optional change, but I think it looks slightly better for the execution of the sequential and parallel implementations.$Fib_{42}$ where before $Fib_{43}$ using 42 domains.
fib_par 42
andfib 42
now both computefib_par 42
computed~num_domains
should be changed to be~num_domains
is the number of additional domains that should be spawned to facilitate that. It also results in a lot of- 1
being peppered around the examples! What do you think?