Date: Mon, 21 Aug 2006 05:09:44 -0600 From: Chris Jones <cdjones-freebsd-hackers@novusordo.net> To: freebsd-hackers@freebsd.org Cc: Kip Macy <kmacy@freebsd.org> Subject: [SoC] Jail Resource Limits Message-ID: <98C569DD-B559-4243-8C15-0DA1D832C387@novusordo.net>
next in thread | raw e-mail | index | archive | help
Hi, folks: I've completed the Summer of Code work on the jail resource limits (http://wikitest.freebsd.org/JailResourceLimits); jails can now have soft-ish limits placed on their memory and CPU usage. Briefly, when a jail uses more memory than its limit, pages are clawed back by a new kernel process, jpager. The clawback is at a configurable rate, though the proportion is currently fixed. When a jail uses more CPU time in proportion to total CPU time used than the number of its CPU usage shares to the total CPU usage shares, its processes are dropped in priority until it's had its fair share of the total CPU time; if there are no other processes that want to run, they'll use up as much CPU time as they otherwise would. We have a new command, jtune(8), which allows you to change the memory limit and CPU shares for a jail while it's running. You can also set these when a jail's created. Note that some sysctls need to be set (see jail(8) for details) before the limits will be enforced. A tarball with everything you need to build the experimental kernel can be at http://www.ualberta.ca/~cdjones/cdjones_jail_soc2006.tgz --- please read the INSTALL document in docs/ carefully, as it's pretty easy to trash your libc.so. The tarball is against RELENG_6 as of a few hours ago; I expect to port it to CURRENT sometime this week, once I build CURRENT on the desktop whose libc.so I trashed while writing docs/INSTALL. :) I look forward to your feedback. Cheers, Chris
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?98C569DD-B559-4243-8C15-0DA1D832C387>