carpentries-incubator / workflows-nextflow

Workflow management with Nextflow and nf-core
https://carpentries-incubator.github.io/workflows-nextflow/
Other
18 stars 29 forks source link

Nextflow review @bobturneruk ep5 , CPUs, cores and threads #128

Open ggrimes opened 2 months ago

ggrimes commented 2 months ago

Is it worth making the difference between CPUs, cores and threads clear here? https://carpentries-incubator.github.io/workflows-nextflow/05-processes-part2.html#directives

ggrimes commented 2 months ago

would adding this text from https://www.nextflow.io/docs/latest/process.html#cpus in a callout be sufficent?

The cpus directive allows you to define the number of CPU required by the process’ task. This directive is required for tasks that execute multi-process or multi-threaded commands/tools and it is meant to reserve enough CPUs when a pipeline task is executed through a cluster resource manager.

In the Glossary i could add

A core is a physical part of a CPU that can read and execute program instructions. Modern CPUs can have multiple cores, allowing them to perform multiple tasks simultaneously. When you specify the number of cores in Nextflow, you are typically talking about the same concept as CPUs in the cpus directive — physical cores unless the system treats hyperthreads as separate core.