[Bug 283523] rctl feature requests

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 23 Dec 2024 18:37:59 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=283523

            Bug ID: 283523
           Summary: rctl feature requests
           Product: Base System
           Version: Unspecified
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: jwb@freebsd.org

I'm developing a new HPC/HTC batch system called LPJS (lightweight, portable
job scheduler).  Looking into rctl as a method to enforce resource limits, two
issues came up:

1. For rctl to be a practical solution, we would need to be able to apply a
resource limit to a process group.  (Currently it seems to support only
processes, jails, users, and login classes.)  In some cases, having LPJS create
a jail for every job might be a feasible alternative, but I have concerns about
limitations and overhead, and need to explore this more.  LPJS already creates
a new process group for each running job, so that it can be properly terminated
via the user "cancel" subcommand.  It recursively identifies members of the
group and its children, so they can all be signalled.  The same logic could be
used to identify and sum up RSS for the group.

2. It would be nice to be able to add rules for one's own processes when not
running as root.  LPJS supports job scheduling entirely in userland using
daemons started from a menu system.  Malicious users could defeat this, of
course, but that's not a problem in this environment.  The resource limits are
there to help them get computations done, so they'd only be harming themselves.

Let me know if either or both of these are feasible.

Thanks...

-- 
You are receiving this mail because:
You are the assignee for the bug.