Resource Limits Within Jails

markham breitbach markham at ssimicro.com
Thu Jan 5 19:05:48 UTC 2017


I am trying to figure out the best way to manage resource limits for a
particular daemon within a jail (specifically memory usage), without
having to limit the entire jail and other processes within.

I have searched around and looked at the handbook and man pages for rctl
and login.conf, but neither seems to really do what I want.

rctl only seems to be able to operate from the jail host, and afaik can
only limit a process once you have the PID, so you can't just set it
somewhere and be done with it.  rctl user limits only apply to the host,
and not the same user within a jail, and I have not even investigated
how that behaves for a process that has started as root and done a
privilege drop.

Similarly, login.conf seems to have no effect whatsoever within a jail,
even after restarting the jail and logging in again.

Is there something I am missing?  Does anyone know how to do this?

Thanks,

-Markham





More information about the freebsd-questions mailing list