Limiting resources on FreeBSD
freebsd rctl
What is rctl In FreeBSD, in addition to login.conf, we also get a very nice and flexible mechanism for setting resource limits: rctl. I like it in particular for limiting resources allocated to each jail.
Configuration Here is a short example:
jail:example_jail:vmemoryuse:deny=2G/jail jail:example_jail:maxproc:deny=200/jail jail:example_jail:readiops:throttle=500/jail jail:example_jail:pcpu:deny=70/jail In the above, for the jail identified by example_jail we allow:
2G of memory, 200 processes, 500 I/O read operations per second, 70% of CPU. Enabling rctl on boot Actually, there is no need to enable anything in rc.
Read more...