Skip to content

Commit

Permalink
Clarification on workers vs. processes (#35633)
Browse files Browse the repository at this point in the history
Restored from #33649
  • Loading branch information
BioTurboNick authored Apr 29, 2020
1 parent c194a21 commit bff96e2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion doc/src/manual/distributed-computing.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ co-ordinate their processing by referencing the same remote `Channel`.
Each process has an associated identifier. The process providing the interactive Julia prompt
always has an `id` equal to 1. The processes used by default for parallel operations are referred
to as "workers". When there is only one process, process 1 is considered a worker. Otherwise,
workers are considered to be all processes other than process 1.
workers are considered to be all processes other than process 1. As a result, adding 2 or more
processes is required to gain benefits from parallel processing methods like [`pmap`](@ref). Adding
a single process is beneficial if you just wish to do other things in the main process while a long
computation is running on the worker.

Let's try this out. Starting with `julia -p n` provides `n` worker processes on the local machine.
Generally it makes sense for `n` to equal the number of CPU threads (logical cores) on the machine. Note that the `-p`
Expand Down

0 comments on commit bff96e2

Please sign in to comment.