Bug 275049 - Network resource control limit not mentioned in rctl.8
Summary: Network resource control limit not mentioned in rctl.8
Status: New
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-13 01:58 UTC by RJ Nowling
Modified: 2024-12-17 22:53 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description RJ Nowling 2023-11-13 01:58:06 UTC
Section 16.14 Resource Limits section of the FreeBSD handbook mentions that network resources ("Limits the amount of network resources (e.g., sockets) a process can use") can be limited with rctl. I don't see any mention of those in the rctl man page. Does rctl support limiting network resources? E.g., bandwidth or number of connections?  Or is the handbook incorrect?  Thanks!
Comment 1 RJ Nowling 2023-11-14 03:05:46 UTC
It appears that kernel isn't aware of any network resources that can be controlled with rctl according to the source code:

https://github.com/freebsd/freebsd-src/blob/main/sys/kern/kern_rctl.c#L145
Comment 2 Jason W. Bacon freebsd_committer freebsd_triage 2024-12-08 01:00:08 UTC
One thing that certainly should be mentioned under SEE ALSO is rctl_add_rule(2)and friends.  

Upon reading rctl(8) and seeing no mention of it, I couldn't believe that the API would not be exposed, so I ran

    find /usr/src/ -name '*rctl*'

This revealed /usr/src/lib/libc/sys/rctl_add_rule.2.

The man page is pretty minimal and could probably be fleshed out in general.  I'll have more to say once I've had time to play with it.

If the RSS limits work as I hope, this tool is a godsend for enforcing job parameters on HPC clusters.  I plan to incorporate it into my new resource manager, LPJS.
Comment 3 Jason W. Bacon freebsd_committer freebsd_triage 2024-12-17 22:53:21 UTC
Another thing that would be useful to mention is whether resource limits are inherited by child processes.