time - SLURM 报告的时间使用问题

标签 time slurm sacct

我无法理解下面的时间使用情况报告:

1) 为什么作业步骤 1 和 2 的时间加起来不在批处理行中?

2) 每一列之间的关系是什么,特别是TotalCPUCPUTime

3) 对于工作的时间使用情况,最好报告哪一个?

$ sacct -o JOBID,AllocCPUs,AveCPU,reqcpus,systemcpu,usercpu,tot
alcpu,cputime,cputimeraw -j 649176
       JobID  AllocCPUS     AveCPU  ReqCPUS  SystemCPU    UserCPU   TotalCPU    CPUTime CPUTimeRAW 
------------ ---------- ---------- -------- ---------- ---------- ---------- ---------- ---------- 
649176               24                  24  00:02.047  01:06.896  01:08.943   00:23:36       1416 
649176.batch         24   00:00:00       24  00:00.027  00:00.014  00:00.041   00:23:36       1416 
649176.0             24   00:00:00       24  00:00.813  00:24.886  00:25.699   00:08:48        528 
649176.1             24   00:00:18       24  00:01.207  00:41.996  00:43.203   00:14:24        864 

最佳答案

1) why the times for job step 1 & 2 do not add up to the batch line?

SystemCPU、UserCPU 和 TotalCPU 的 .batch 报告的时间是运行批处理文件中的命令所花费的时间,不包括生成的进程 [1]。 CPUTime 和 CPUTimeRAW 会计算生成的进程,因此它们加起来与作业步骤对应的行。

2) what is the relationship between each column, especially for TotalCPU and CPUTime?

TotalCPU 是每个 CPU 的 UserCPU 和 SystemCPU 的总和,而 CPUTime 是耗时乘以请求的 CPU 数。两者之间的区别在于 CPU 无所事事的时间(既不在用户模式也不在内核模式),大部分时间等待 I/O [2]

3) for time usage of the job, which one is best to report?

这取决于你想展示什么。 Elapsed(您未在此处显示)给出了“解决时间”。 CPUTimeRAW 是经常被计算和支付的。 CPUTime 和 TotalCPU 之间的差异提供了有关 I/O 开销的信息。

[1] 来自手册页

SystemCPU The amount of system CPU time used by the job or job step. The format of the output is identical to that of the Elapsed field.

NOTE: SystemCPU provides a measure of the task’s parent process and does not include CPU time of child processes.

[2] https://en.wikipedia.org/wiki/CPU_time

关于time - SLURM 报告的时间使用问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31217488/

相关文章:

python - 有没有更快的运行 GridsearchCV 的方法

objective-c - 如果时间为零,如何使 NSDateFormatter 不包括时间?

slurm - 在 SLURM 中与 mpi 任务一起运行 "monitor"任务

slurm - 如果作业失败,我如何自动重新排队 SLURM 的 srun 作业?

memory-management - 作业分配的核心数量是我在 SLURM 上请求的两倍

slurm - 是否可以通过仅提供作业名称的开头来使用 `sacct --name` ?

mysql - 超过两周的 MySQL 考勤卡加类

r - 如何在 R 中创建具有特定 MA(或 q)项的 ARIMA 模型