JuliaLang / JuliaLang/Distributed.jl
need precompile statements re-enabled for `addprocs` (with PR)
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 55
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
As discovered in https://discourse.julialang.org/t/help-with-binary-trees-benchmark-games-example/37307/13
❯ hyperfine -w1 "julia -p4 -E 'using Distributed; nprocs()'" "julia -E 'using Distributed; addprocs(); nprocs()'"
Benchmark JuliaLang/julia#1: julia -p4 -E 'using Distributed; nprocs()'
Time (mean ± σ): 2.040 s ± 0.010 s [User: 5.563 s, System: 0.773 s]
Range (min … max): 2.024 s … 2.054 s 10 runs
Benchmark JuliaLang/julia#2: julia -E 'using Distributed; addprocs(); nprocs()'
Time (mean ± σ): 1.785 s ± 0.014 s [User: 5.337 s, System: 0.756 s]
Range (min … max): 1.765 s … 1.816 s 10 runs
Summary
'julia -E 'using Distributed; addprocs(); nprocs()'' ran
1.14 ± 0.01 times faster than 'julia -p4 -E 'using Distributed; nprocs()''
Is there a reason spawning the extra processes with addprocs() is necessarily faster than spawning them with -p command-line argument?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the supplied hyperfine comparison between julia -p4 and addprocs() with Distributed. Then trace how the two startup paths handle precompilation and determine whether the precompile statements should be re-enabled for addprocs; done means the behavior is explained and the relevant startup performance is verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100