Job scripts¶
Changing the layout of a job may improve its overall performance. For most parallel applications, communication affects the overall runtime of a job significantly. To reduce communication cost consider the following suggestions.
Selection of nodes¶
Selecting nodes for a job is done by slurm automatically. Slurm uses topology information of the cluster and runs multi-node jobs on nodes which are close to each other with respect to network latencies. Since the cluster is a shared resource, communication even over a High-Performance network like InfiniBand may be affected by other jobs utilizing the same network or the parallel file system using the same network resources. In rare cases that can lead to congestion. Congestion on neighboring nodes is less likely but still possible.
Number of nodes¶
It is recommended to use the least amount of nodes possible to reduce communication costs between the processes/threads of a job. Communication inside a node is more efficient, even when using MPI. Reducing the number of cores the application is using may improve overall runtime of a job if fewer nodes are used.
Caching¶
Depending on the processor different levels of cache are available to different CPU cores on a system.
The AMD EPYC 9655 processor in the HoreKa 2 Onyx partition has 3 cache levels. The L1 (80 KB) and L2 (1 MB) caches are specific to each core. The L3 cache (384 MB per CPU) is split into 32 MB slices, each shared by the cores of one chiplet (CCD, 8 cores). To avoid/reduce cache thrashing in L3, requesting nodes exclusively (--exclusive) may improve overall performance of an application, even though not all cores are used for computation.
More optimization with respect to cache sizes can be done within the application source code but this is out of scope here.
NUMA and core placement¶
On an even deeper level threads/processes can be bound to specific CPU cores. The job scheduler on HoreKa 2 uses information about Non-uniform memory access (NUMA) domains of each of the CPUs and places threads accordingly. In some cases, e.g. hybrid MPI/OpenMP applications, it may be necessary to control the distribution of processes to cores. Examples can be found in the Hybrid MPI + OpenMP Jobs section of the Slurm examples.
I/O¶
File I/O especially using many small files can have a big impact on the runtime of a job.
Each compute node has a local scratch file system which is better at handling small files and small file I/O than the parallel file systems. In some cases it can be better to copy the files to a local directory ($TMPDIR) and run the application on the local copy of the data. Also see the best practices.
If there is not sufficient space for your data locally, there is also the option to use BeeOND.