Overhead of Distributed module vs. Threads

It’s been a long, long time since I last used Julia and I need to update code written for version 0.4 which used parallelization primitives which seem to have since been moved into their own module, Distributed. While looking at the documentation, I see that there is a new experimental module Threads which if I understand correctly is designed for a single compute node with multiple cores. My question is how much extra overhead is there in continuing to use the Distributed module when anyway the code most likely will only be run on a single compute node with multiple cores? If each remotecall_fetch(…) requires multiple seconds to finish its computation, then am I correct to assume that the extra overhead will be insignificant?

1 Like

The answer to the question is program dependent. Threading generally damages the scalability and clarity of the code. For simple programs and operations it can improve performance but if overheads of seconds are large, you may not need threading at all… There were some very interesting videos from an older juliacon (2016 i think) where some people from Intel were discussing this. I guess the best way is to give it a try with both parallel and threaded implementations and check out the complexity implications of both.