CPU Resource Usage

CPU Resource Usage For Running Jobs

For a running job, the sstat command will report on CPU and memory usage.

In this example, the job has been running on 20 cores for about 4 days.

CPU Resource Usage For Completed Jobs

For a completed job , the seff command will return an efficiency report.

  • CPU Efficiency: This is good usage for the number of cores.
  • Memory Efficiency: Only about 4 GB of (CPU) memory was needed.

Visit our documentation about CPU and Memory Usage for more information.

CPU Efficiency

It may be the case that even if CPU Efficiency is a low percentage, you need all of the requested CPU cores for a specific part of the code, e.g., data preprocessing. In this case, request the number of CPU cores that you need for the compute intensive part of the code.

Previous Job Numbers

The sacct command will return a list of previous Slurm jobs on the current day.

  • To get jobs run on previous days, use the -S flag and provide a start date
  • Ex: to display all Slurm jobs submitted after 2/1/2024
$ sacct -X -S2024-02-01

(the -X flag is optional, but tells sacct to skip the output of intermediate steps):

Check Your Knowledge

  • Find your most recent job number using sacct.
  • Print out the resource usage using seff for the job number you found in step 2.
    • How efficient was your CPU and memory usage?
Previous
Next