Post Job Checks

It is good practice to have a look at the resources your job used on completion, this way you can improve your job specifications in the future.

Once your job has finished check the relevant details using;

sacct --format="JobID,JobName,Elapsed,AveCPU,MinCPU,TotalCPU,Alloc,NTask,MaxRSS,State" -j <jobid>


If you want to make this your default sacct setting, run;

echo 'export SACCT_FORMAT="JobID,JobName,Elapsed,AveCPU,MinCPU,TotalCPU,Alloc%2,NTask%2,MaxRSS,State"' >> ~/.bash_profile
source ~/.bash_profile

Below is an output for reference:

       JobID    JobName    Elapsed     AveCPU     MinCPU   TotalCPU  AllocCPUS   NTasks     MaxRSS      State
------------ ---------- ---------- ---------- ---------- ---------- ---------- -------- ---------- ----------
3007056      rfm_ANSYS+   00:27:07                         03:35:55         16                      COMPLETED
3007056.bat+      batch   00:27:07   03:35:54   03:35:54   03:35:55         16        1  13658349K  COMPLETED
3007056.ext+     extern   00:27:07   00:00:00   00:00:00   00:00:00         16        1        89K  COMPLETED

All of the adjustments below still allow for a degree of variation. There may be factors you have not accounted for.


From the Elapsed field we may want to update our next run to have a more appropriate walltime.

#SBATCH --time=00:40:00


The MaxRSS field show the maximum memory used by each of the job steps, so in this case 13GB. For our next run we may want to set:

#SBATCH --mem=15G


TotalCPU is the number of computation hours, in the best case scenario the computation hours would be equal to Elapsed x AllocCPUS.

In this case our ideal TotalCPU would be 07:12:00, as our job only managed 03:35:55 we can estimate the CPU usage was around 50%
It might be worth considering reducing the number of CPU's requested, however bear in mind there are other factors that effect CPU efficiency.

#SBATCH --cpus-per-task=10



The command nn_seff <jobid> can be used to generate a summary on the efficiency of jobid

Labels: slurm
Was this article helpful?
1 out of 1 found this helpful