Message: Re: What's the best choice for number of processes and threads? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: What's the best choice for number of processes and threads? 

Forum: Multithreading
Re: Question What's the best choice for number of processes and threads? (Huan Yao)
Re: Feedback Re: What's the best choice for number of processes and threads? (Andrea Dotti)
Date: 13 Jan, 2017
From: Tom Roberts <Tom Roberts>

On Fri, 13 Jan 2017 23:54:38 GMT, Andrea Dotti wrote: > if your machine has 2 cores, it make no sense to go above 2 threads.

Unless each core supports 2 hardware threads -- then it can make sense to configure your compute-bound program to use 4 threads, or even 5.

This is dependent on both the hardware and the details of how the program accesses memory: for programs that have a small working set, the hardware threads don't gain very much. But for a typical Geant4 program with a large working set most of the time, the CPU is often blocked waiting for memory and using both hardware threads nearly doubles throughput.

My program, G4beamline, uses Geant4 with MPI (implemented long before Geant4 supported multithreading); rank 0 does I/O while the rest perform tracking. On my 8-core/2-thread Mac Pro, the best throughput is with 17 ranks. I usually use 15 ranks so the user interface and system services get adequate response.

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 More: Re: What's the best choice for number of processes and threads?   (Andrea Dotti - 13 Jan, 2017)
(_ None: Re: What's the best choice for number of processes and threads?   (Huan Yao - 13 Jan, 2017)
(_ More: Re: What's the best choice for number of processes and threads?   (Andrea Dotti - 14 Jan, 2017)
(_ None: Re: What's the best choice for number of processes and threads?   (Huan Yao - 17 Jan, 2017)
 Add Message Add Message
to: "Re: What's the best choice for number of processes and threads?"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews