Topaz slower with more threads

Hi

I was running a TOPAZ extract job with Number of parallel threads = 20 and Number of CPUs = 20 compared the the default settings (4 threads. 8 CPU). The higher number of threads took 5160.96s to process while the default took 938.44s, about 5 times slower.

I changed the number of CPUs to 20 and left threads at the default 4 and the job completed in 608.64s. I was wondering if this made sense? I looked on the TOPAZ info pages and couldn’t find a differentiation of threads and CPUs (I assumed they would be the same).

Summary
4 thread, 8 CPU = 938.44s
4 thread 20 CPU = 608.64s
20 thread, 20 CPU = 5160.96s

Apologies if I have misunderstood something but what is the difference between threads and CPU? I see that by running 5 times more threads it takes 5 times longer (ish) but any additional explanation would be welcomed.

working on latest cryoSPARC.

Kind regards
Mike

Hi @mplockhartuom,

Each parallel thread allocates the input number of CPUs.

In the example where Number of parallel threads = 20 and Number of CPUs = 20, each thread will attempt to allocate 20 CPUs, resulting with 400 attempted CPU allocations. The reason for the increased time cost is likely due to the resultant overhead.

The specific purpose of the Number of parallel threads parameter is to parallelize the input micrographs. If this parameter is set to 1, Topaz will extract the micrographs one by one. If the parameter is set to a greater value such as 4, the input micrographs will be split into 4 groups and will have a dedicated Topaz process for each group, all of which are running in parallel.

If you have any additional questions, please feel free to ask.

Regards,
Jay Yoo

1 Like