{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/11520","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/11520/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/11520/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/11520/events","html_url":"https://github.com/JuliaLang/julia/pull/11520","id":83442255,"number":11520,"title":"WIP : Refactored asynchronous worker setup code ","user":{"login":"amitmurthy","id":117461,"avatar_url":"https://avatars.githubusercontent.com/u/117461?v=3","gravatar_id":"","url":"https://api.github.com/users/amitmurthy","html_url":"https://github.com/amitmurthy","followers_url":"https://api.github.com/users/amitmurthy/followers","following_url":"https://api.github.com/users/amitmurthy/following{/other_user}","gists_url":"https://api.github.com/users/amitmurthy/gists{/gist_id}","starred_url":"https://api.github.com/users/amitmurthy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amitmurthy/subscriptions","organizations_url":"https://api.github.com/users/amitmurthy/orgs","repos_url":"https://api.github.com/users/amitmurthy/repos","events_url":"https://api.github.com/users/amitmurthy/events{/privacy}","received_events_url":"https://api.github.com/users/amitmurthy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-01T11:13:45Z","updated_at":"2015-06-03T12:00:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/11520","html_url":"https://github.com/JuliaLang/julia/pull/11520","diff_url":"https://github.com/JuliaLang/julia/pull/11520.diff","patch_url":"https://github.com/JuliaLang/julia/pull/11520.patch"},"body":"This PR refactors code touched by an `addprocs` call. It also fixes the relatively slower addition of tunneled workers in the current code base.\r\n\r\nLocal tests pass. I am yet to get timings w.r.t. expected speedups in adding workers. Have opened this PR to get any feedback at all.\r\n\r\n@JeffBezanson , just fyi, I have used changes from https://github.com/JuliaLang/julia/pull/11503 in this PR. \r\n\r\n "},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/108341357","html_url":"https://github.com/JuliaLang/julia/pull/11520#issuecomment-108341357","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/11520","id":108341357,"user":{"login":"amitmurthy","id":117461,"avatar_url":"https://avatars.githubusercontent.com/u/117461?v=3","gravatar_id":"","url":"https://api.github.com/users/amitmurthy","html_url":"https://github.com/amitmurthy","followers_url":"https://api.github.com/users/amitmurthy/followers","following_url":"https://api.github.com/users/amitmurthy/following{/other_user}","gists_url":"https://api.github.com/users/amitmurthy/gists{/gist_id}","starred_url":"https://api.github.com/users/amitmurthy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amitmurthy/subscriptions","organizations_url":"https://api.github.com/users/amitmurthy/orgs","repos_url":"https://api.github.com/users/amitmurthy/repos","events_url":"https://api.github.com/users/amitmurthy/events{/privacy}","received_events_url":"https://api.github.com/users/amitmurthy/received_events","type":"User","site_admin":false},"created_at":"2015-06-03T12:00:48Z","updated_at":"2015-06-03T12:00:48Z","body":"`addprocs` now waits till all workers have established and tested their connections with their peers. In spite of these additional checks, `addprocs(8)`  on my local machine is marginally faster - it takes 2.5 seconds now as opposed to 2.9 seconds previously.\r\n\r\nI added the functions required at worker startup to `precompile.jl`.  It resulted in a reduction of `addprocs(8)` for this PR from 4.0 (without `precompile.jl` additions) to 2.5 seconds. How does one decide what functions to add to `precompile.jl`? Should we add all possible functions required at startup? I am not very clear on how exactly `precompile.jl` speeds up things....\r\n\r\n`addprocs` from my local machine via ssh tunnelling to a 32-core AWS server was previously timing out since my local machine connects to the Internet via a relatively high latency 4G cellular network. With this PR it completes in approximately 30 seconds.\r\n"}}