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

Add max_concurrent_runs setting #99

Merged
merged 1 commit into from
Apr 11, 2022

Conversation

rikhuijzer
Copy link
Owner

@rikhuijzer rikhuijzer commented Apr 11, 2022

Unfortunately, #98 turned out to be a bit of a failure. It worked locally, but ran into JuliaLang/Downloads.jl#94 in CI on Julia 1.7.2. Luckily, starting multiple threads actually was a bit dumb because PlutoStaticHTML.jl then starts threads in which Pluto.jl starts distributed workers which can start multiple threads. This PR aims to reduce the number of started threads by starting Pluto.jl's workers from asynchronous tasks (coroutines) instead of threads. As it turns out, there is a nice Julia function asyncmap exactly for this purpose.

This PR also adds a new BuildOptions setting called max_concurrent_runs which specifies how many notebooks can be evaluated concurrently. This defaults to 4 to be on the safe side in case a notebook starts multiple threads too and overwhelms the system.

EDIT: Checked this in a CI run. No problems now.

@rikhuijzer rikhuijzer enabled auto-merge (squash) April 11, 2022 14:05
@rikhuijzer rikhuijzer merged commit 6c4d634 into main Apr 11, 2022
@rikhuijzer rikhuijzer deleted the rh/add-max-concurrent-runs-setting branch April 11, 2022 14:10
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.

1 participant