群集作业的RAM使用的优化会影响HPC环境中的数据传输。有什么方法可以关闭CP或Rsync命令中的RAM的缓存?

发布于 2025-02-11 17:24:35 字数 1009 浏览 6 评论 0原文

我的问题与在大型HPC群集上执行计算机模拟有关。我有一个进行MC模拟的程序。通过模拟的某些部分之后,将结果保存到文件中,并从一开始就继续写入内存的同一部分。因此,该程序不需要所有的RAM即可运行(我们正在谈论真正低的内存使用情况,例如〜25MB)。但是,随着时间的推移产生的总数据比那大10或100倍。作业以正常方式处理:将作业数据复制到刮擦分区,程序在节点上运行,结果将从从头开始返回到Jobdir。

现在,如果不是因为在向Slurm提交工作时,我必须宣布分配了该工作的金额。如果我围绕实际程序使用情况声明了一些内容,例如50MB,我在恢复结果时遇到了问题。经过一周的仿真后,将数据从头到工作目录复制,并且复制操作被缓存到RAM,违反了Job RAM设置。最终,这项工作被Slurm杀死。我必须在刮擦上手动查找此数据并将其复制回。显然,对于几千个工作来说,这是不可行的。

用于复制的命令是:

cp -Hpv ${CONTENTS} ${TMPDIR}

如果复制的内容大于指定的MB,则该工作被一条消息杀死:

/var/lib/slurm-llnl/slurmd/job24667725/slurm_script: line 78: 46020 Killed cp -Hpv ${CONTENTS} ${TMPDIR}
slurmstepd-e1370: error: Detected 1 oom-kill event(s) in StepId=(jobid).batch. Some of your processes may have been killed by the cgroup out-of-memory handler.

在这方面,我已经联系了群集管理员,他们只是回复为这份工作保留更多的RAM。但是,这会导致模拟过程中荒谬的RAM锁定(基本上浪费)一周,并且仅在复制结果后才使用。请记住,我可以(而且经常)一次提交多达5000个作业,我正在寻找某种骇客cprsync命令强制执行他们在复制时不要缓存到RAM或根本不会缓存。

任何评论都会很高兴。 此致。

My problem is related to performing computer simulations on the large scale HPC cluster. I have a program that does MC simulation. After some part of the simulation is passed, the results are saved into files, and the simulation continues writing to the same part of memory as from the start. Thus, the program doesn't need all that much RAM to run (and we are talking about really low memory usage, like ~25MB). However, the total data generated over time are 10 or 100 times greater than that. The jobs are handled in the normal fashion: job data is copied to scratch partition, program runs on the node, results are returned from scratch to jobdir.

Now, everything would be dandy if it wasn't for the fact that when submitting a job to SLURM, I have to declare the amount o RAM assigned for the job. If I declare something around the real program usage, say 50MB, I have a problem with getting back the results. After a week-long simulation, data are copied from scratch to job directory, and the copy operation is cached to RAM, violating the job RAM setting. Ultimately, the job is killed by SLURM. I have to manually look for this data on scratch and copy them back. Obviously, this is not feasible for few thousands jobs.

The command used for copying is:

cp -Hpv ${CONTENTS} ${TMPDIR}

and if the copied content is larger than specified MB's, the job is killed with a message:

/var/lib/slurm-llnl/slurmd/job24667725/slurm_script: line 78: 46020 Killed cp -Hpv ${CONTENTS} ${TMPDIR}
slurmstepd-e1370: error: Detected 1 oom-kill event(s) in StepId=(jobid).batch. Some of your processes may have been killed by the cgroup out-of-memory handler.

I've contacted cluster admins in that regard, and they just replied to reserve more RAM for the job. However, this results in an absurd amount of ram locked (basically wasted) for a week during the simulation, and used only for the moment when the results are copied back. Keeping in mind that I can (and often do) submit up to 5000 jobs at a time, I'm looking for some kind of hack to cp or rsync commands to force them not to cache to RAM or not to cache at all, while copying.

Will be glad for any comments.
Best regards.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文