1

Say I want to run a parallelize a program to process a bunch of files, and this program accepts a -t option to increase the number of threads used. The machine I am using has the following specs from the output of lscpu:

CPU(s):                16
Thread(s) per core:    1
Core(s) per socket:    8
Socket(s):             2
...

I'm unclear on the difference between running the program with multiple threads specified vs. piping the list of input files to parallel. As there is just one thread per core, would it be completely redundant to do both?

1 Answer 1

0

The best recommendation is: test and measure.

Even if a program can run in multiple threads it may pause now and then (to read or write to disk) and during this time other threads can use the CPU.

So there is really no one true answer - except for test and measure.

Related: https://oletange.wordpress.com/2015/07/04/parallel-disk-io-is-it-faster/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .