is the communication overhead, the time period between the completion of one request and the start of servicing a new one.
is a buffered stream. You can send additional requests before receiving all outstanding results. If you can keep the buffers full at all times, there will be no latency; each remote processor will always be busy.
To turn on latency hiding, set $LoadFactor
to a value larger than 1
, such as 2
determines the maximum number of computations sent to a slave kernel before at least one of the results is read. Here are two example commands that set latency hiding.
To benefit from latency hiding, you should plan to create many more processes than there are remote kernels. You can create more processes using Queue or an appropriate parallel mapping or table construct. If the number of processes is larger than $LoadFactor*Length[$Slaves]
there is an added benefit of this scheme, automatic load balancing.
The faster processors will automatically service more processes.
Do not use latency hiding if you plan to create exactly one process for each remote kernel.
Latency hiding is incompatible with virtual shared memory. When you load Parallel`VirtualShared`
, the value of $LoadFactor
will be permanently set to 1.