最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Clean from old data the slurm_acct_db (SLURM - mysql) - Stack Overflow

programmeradmin3浏览0评论

I'm working with SLURM v21.08 and I was looking to clean from some very old data the slurm_acct_db (mysql).

This DB become huge and I was looking to use sacctmgr, but I do not have a clear and safe solution yet. Is there any easy command or way to clean it from some data older than a specific date?

Thank you

I'm working with SLURM v21.08 and I was looking to clean from some very old data the slurm_acct_db (mysql).

This DB become huge and I was looking to use sacctmgr, but I do not have a clear and safe solution yet. Is there any easy command or way to clean it from some data older than a specific date?

Thank you

Share Improve this question edited yesterday Shadow 34.3k10 gold badges65 silver badges75 bronze badges asked yesterday Emma AthanEmma Athan 5491 gold badge6 silver badges16 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

As you mentioned, you can use sacctmgr can be used to delete the old records. You can use where clause to perform it. This can be seen from the documentation,

delete <ENTITY> where <SPECS>
    Delete the specified entities. Identical to the remove command.

For example, to delete jobs that ended before January 1, 2020, you can run:

sacctmgr delete job where endtime < '2020-01-01'

It is very important that you backup your slurm_acct_db first and test it maybe in a safe environment first (copy and try the command out in a non-production environment first).

NB: Depending on your SLURM configuration and version, you might need to also clean up related tables (such as job_steps or user associations). SLURM’s documentation and your accounting schema can provide guidance on this.

Alternatively (non direct approach) is to create a new database with only recent data and use it instead of the big old data.

发布评论

评论列表(0)

  1. 暂无评论