2

I am using GNU Parallel to perform benchmarking using 20 cores to test speedup in comparison to doing the same job on only 1 core. Should I expect almost complete linear scaling i.e. will my computation be roughly 20x faster than if I was using only one core?

To clarify, a scheduler (e.g. slurm) is not being used.

1 Answer 1

3

It depends. The only way to know for sure is to measure.

If the CPUs have hyperthreading: No. Hyperthreading converts your CPU to 2 cores with around 70% the performance of single threading.

If the cores share cache: Maybe no. Depending on your application it may be heavily dependent on a big cache. With multiple cores sharing the same cache, you risk more cache misses.

If the CPUs scale frequency based on temperature (also called turbo boosting): No. A single core will cause the CPU to be less hot than if two cores in the CPU is running at the same speed. This can cause the CPU to work faster as a single core than if more cores are active. This is typically similar to hyperthreading: Each core will be slower, but the total throughput will be higher.

If your jobs are heavily dependent on I/O: It depends. See https://oletange.wordpress.com/2015/07/04/parallel-disk-io-is-it-faster/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.