# jail CPU,memory limit



## lykich (Sep 26, 2011)

Hi,

I have FreeBSD 7.4-RELEASE-p1 and two jails. I find http://wiki.freebsd.org/JailResourceLimits and http://www.tomjudge.com/index.php/FreeBSD/Jails/MemoryLimits. Which of this variants should I use?

Can I use this patch?  http://www.ualberta.ca/~cdjones/cdjones_jail_soc2006.patch

Are there any other options?


----------



## jake (Sep 26, 2011)

I have used the cdjones_jail_soc2006.patch against 6.2-RELEASE before with some success, but it is intended to be patched against a RELENG_6 so I doubt it can be easily patched against 7.4

You may have more joy with some of the 7.x variants listed on http://wiki.freebsd.org/Jails

Personally I'm waiting to see what can be done out the box with RCTL (http://wiki.freebsd.org/Hierarchical_Resource_Limits) in 9.0


----------



## lykich (Sep 30, 2011)

Made this patch http://www.tomjudge.com/index.php/FreeBSD/Jails/MemoryLimits.
Result.


```
In file included from /usr/src/cddl/lib/libzpool/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c:134:
/usr/obj/usr/src/tmp/usr/include/vm/vm_pageout.h:93: error: expected ')' before 'map'
*** Error code 1
Stop in /usr/src/cddl/lib/libzpool.
*** Error code 1
Stop in /usr/src/cddl/lib.
*** Error code 1
Stop in /usr/src.
```


----------

