Slurm/Task-Affinity: Unterschied zwischen den Versionen

Aus IT Physics
Wechseln zu: Navigation, Suche
(neu)
 
(Checking with htop: HT)
 
Zeile 5: Zeile 5:
 
= Checking with <code>htop</code> =
 
= Checking with <code>htop</code> =
  
Following <code>/proc/cpuinfo</code>, the "effective core id" of <code>htop</code> is T*32+S*16+C with
+
Following <code>/proc/cpuinfo</code>, the "logical core id" of <code>htop</code> on a ''Xeon Gold 6226R'' is T*32+S*16+C with
* T = thread-ID ϵ {0,1} (the two threads on a core)
+
* T = thread-ID ϵ {0,1} (the two threads on a core for enabled hyperthreading)
 
* S = socket-ID ϵ {0,1} (the two CPUs with 16 cores)
 
* S = socket-ID ϵ {0,1} (the two CPUs with 16 cores)
 
* C = core-ID ϵ {0,1,...,15} (the 16 physical cores)
 
* C = core-ID ϵ {0,1,...,15} (the 16 physical cores)
  
In other words, the 4 columns in "htop" are  S0T0 | S1T0 | S0T1 | S1T1, and avoiding hyper threading means to fill only the first two columns.
+
In other words, the 4 columns in "htop" are  S0T0 | S1T0 | S0T1 | S1T1 with hyperthreading, and S0 | S0 | S1 | S1 without.

Aktuelle Version vom 20. September 2021, 22:43 Uhr

Cf. https://www.glennklockwood.com/hpc-howtos/process-affinity.html for an explanation.

Slurm is configured with TaskPlugin=task/affinity and can reserve cores for a job. srun's option --cpu-bind provides detailed control for that.

Checking with htop

Following /proc/cpuinfo, the "logical core id" of htop on a Xeon Gold 6226R is T*32+S*16+C with

  • T = thread-ID ϵ {0,1} (the two threads on a core for enabled hyperthreading)
  • S = socket-ID ϵ {0,1} (the two CPUs with 16 cores)
  • C = core-ID ϵ {0,1,...,15} (the 16 physical cores)

In other words, the 4 columns in "htop" are S0T0 | S1T0 | S0T1 | S1T1 with hyperthreading, and S0 | S0 | S1 | S1 without.