sacct:如何将 {CPUTimeRAW 和 CPUTime} 转换为以秒为单位的实时时间?
sacct: How could I convert {CPUTimeRAW and CPUTime} into real time as seconds?
我的目标是根据用户分配 CPU 的时间(以秒为单位)向用户收费。衡量它的最佳参数是什么?
我的方式运行:
示例 1:
sbatch -N1 run.sh
Submitted batch job 20
scontrol update jobid=20 TimeLimit=0-00:01
sacct -o totalcpu,cputime,cputimeraw,Elapsed,SystemCPU,time -j 20
TotalCPU CPUTime CPUTimeRAW Elapsed SystemCPU Timelimit
---------- ---------- ---------- ---------- ---------- ----------
00:00:00 00:11:52 712 00:01:29 00:01:00
00:00:00 00:11:52 712 00:01:29
我把时间限制设置为1分钟,但好像超过了时间限制29秒。正常吗?
示例 2:
sbatch -N1 run.sh
Submitted batch job 21
scontrol update jobid=21 TimeLimit=0-00:02
sacct -o totalcpu,cputime,cputimeraw,Elapsed,SystemCPU,time -j 21
TotalCPU CPUTime CPUTimeRAW Elapsed SystemCPU Timelimit
---------- ---------- ---------- ---------- ---------- ----------
00:00:00 00:18:56 1136 00:02:22 00:02:00
我把时间限制设置为2分钟,但好像超过了时间限制22秒。正常吗?
如何将 {CPUTimeRAW
和 CPUTime
} 转换为 real time
秒?根据我展示的示例,我无法找到它们之间的关系。
CPUTimeRaw = Units are cpu-seconds.
小的超时是正常的,这是由slurm.conf
中的KillWait
标志决定的:
The interval, in seconds, given to a job's processes between the
SIGTERM and SIGKILL signals upon reaching its time limit. If the job
fails to terminate gracefully in the interval specified, it will be
forcibly terminated. The default value is 30 seconds.
收费用户:
CPUTime = (Elapsed time) x (the number of CPUs allocated)
所以CPUTime
(或CPUTimeRaw
,同样用秒表示的用量)是他们实际使用的,也是可以收费的。
我的目标是根据用户分配 CPU 的时间(以秒为单位)向用户收费。衡量它的最佳参数是什么?
我的方式运行:
示例 1:
sbatch -N1 run.sh
Submitted batch job 20
scontrol update jobid=20 TimeLimit=0-00:01
sacct -o totalcpu,cputime,cputimeraw,Elapsed,SystemCPU,time -j 20
TotalCPU CPUTime CPUTimeRAW Elapsed SystemCPU Timelimit
---------- ---------- ---------- ---------- ---------- ----------
00:00:00 00:11:52 712 00:01:29 00:01:00
00:00:00 00:11:52 712 00:01:29
我把时间限制设置为1分钟,但好像超过了时间限制29秒。正常吗?
示例 2:
sbatch -N1 run.sh
Submitted batch job 21
scontrol update jobid=21 TimeLimit=0-00:02
sacct -o totalcpu,cputime,cputimeraw,Elapsed,SystemCPU,time -j 21
TotalCPU CPUTime CPUTimeRAW Elapsed SystemCPU Timelimit
---------- ---------- ---------- ---------- ---------- ----------
00:00:00 00:18:56 1136 00:02:22 00:02:00
我把时间限制设置为2分钟,但好像超过了时间限制22秒。正常吗?
如何将 {CPUTimeRAW
和 CPUTime
} 转换为 real time
秒?根据我展示的示例,我无法找到它们之间的关系。
CPUTimeRaw = Units are cpu-seconds.
小的超时是正常的,这是由slurm.conf
中的KillWait
标志决定的:
The interval, in seconds, given to a job's processes between the SIGTERM and SIGKILL signals upon reaching its time limit. If the job fails to terminate gracefully in the interval specified, it will be forcibly terminated. The default value is 30 seconds.
收费用户:
CPUTime = (Elapsed time) x (the number of CPUs allocated)
所以CPUTime
(或CPUTimeRaw
,同样用秒表示的用量)是他们实际使用的,也是可以收费的。