Open cneira opened 4 years ago
FreeBSD does have rctl(8)
(it has to be enabled by setting the kern.racct.enable
loader tunable to 1
from /boot/loader.conf
). The mechanism to apply resource limits to jails is compiled into the default FreeBSD kernel configuration. What's missing is the of glue logic to update the resource limit database through the task driver.
FreeBSD does have
rctl(8)
(it has to be enabled by setting thekern.racct.enable
loader tunable to1
from/boot/loader.conf
). The mechanism to apply resource limits to jails is compiled into the default FreeBSD kernel configuration. What's missing is the of glue logic to update the resource limit database through the task driver.
The problem is not resource limits, resource limits do work. To notice the problem just create jail cap memory to 1GB, then login inside the jail and execute top, there you will see the whole host memory amount instead of the 1GB that the jail was provisioned with, work must be done in the kernel to add vmmeter per jail, I started a while ago to do it but have not the motivation to go further to completion here is what I had at the moment :
https://gitlab.com/cneira1/freebsd/-/commit/cae3ff52b58c932effcd91e82c644e16d9ded604
Currently running top inside a jail, it will report the host total memory instead of the memory allowed for the jail to use. nomads need to know how much memory is currently the container using to be able to calculate to which node the allocation will be send. This is not a problem on illumos as a zone has it own memory counter to keep track of this.