Hprc banner tamu.png

Terra:Batch Memory Specs

Jump to: navigation, search

Clarification on Memory, Core, and Node Specifications

With Slurm, you can specify memory, number of cores, and number of nodes in a few different ways. The way that we recommend is outlined below.

To calculate how much memory is allocated per core, you will need to find the cores_per_node:

num_cores / num_nodes = cores_per_node

Then, to find the memory per core:

mem_per_node / cores_per_node = mem_per_core

Below you will find examples of these specifications as well as calculations to find the memory per core.

Memory Example 1:
This example requests:

  • 1 Core total
  • Across 1 Node
  • With 2.5GB of Memory Per Node
#SBATCH --ntasks=1           #Request 1 task/core
#SBATCH --nodes=1            #Request 1 node
#SBATCH --mem=2560M          #Request 2560MB (2.5GB) 

This results in:

1 Core / 1 Node = 1 Core per node
2.5GB / 1 Core = 2.5GB of memory per core

Memory Example 2:
This example requests:

  • 4 Cores total
  • Across 1 Node
  • With 8GB of Memory Per Node
#SBATCH --ntasks=4           #Request 4 tasks/cores
#SBATCH --nodes=1            #Request 1 node
#SBATCH --mem=8192M          #Request 8192MB (8GB)

This results in:

4 Cores / 1 Node = 4 Cores per node
8GB / 4 Cores = 2GB of memory per core.

Memory Example 3:
This example requests:

  • 8 Cores total
  • Across 2 Nodes
  • With 16GB of Memory Per Node
#SBATCH --ntasks=8            #Request 8 tasks/cores
#SBATCH --nodes=2             #Request 2 nodes
#SBATCH --mem=16384M          #Request 16384MB (16GB)

This results in:

8 Cores / 2 Nodes = 4 Cores per node
16GB / 4 Cores per node = 4GB of memory per core.

Usable Memory/RAM

While nodes on Terra have either 64GB or 128GB of RAM, some of this memory is used to maintain the software and operating system of the node.

Please review the suggested memory limits for Terra compute nodes on the Terra Hardware Page.