Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

Limit jail cpu and memory resources

Status
Not open for further replies.

Sol42

Junior Member
Joined
Aug 9, 2014
Messages
22
I'm trying to figure out how to limit cpu and memory usage for a jail so it does not impact other processes. When I look at the jail configuration, I don't see any options to set such limits. Is there somewhere else this can be set? And/or can we ask the powers that be to add such choices to the configurations tab so as to make it easy for us the end user to place resource limits on our jails.
 

Sol42

Junior Member
Joined
Aug 9, 2014
Messages
22
I have a 4 core xeon processor (actually shows 8 because of hyperthreading of course). I'm wanting to limit my handbrake jail to only use 7 of the cores or only use 85% (i.e. 680% when adding all cores) of the cpu resources. When I have it transcode my files, it'll hit as high as 780% (97.5%) of cpu resources.
 
D

dlavigne

Guest
This will require a feature request as rctl is not enabled in the 9.x kernel by default. Create the request at bugs.freenas.org and post the issue number here.
 

Sol42

Junior Member
Joined
Aug 9, 2014
Messages
22
Thank you so much dlavigne! I've opened Issue #9237 . I hope the team find it as a valuable suggestion!
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,428
What you are trying to achieve can be done via virtualbox. You'll have to install a host OS but you can set the number of CPU's and allocated memory.
 

Noctris

Member
Joined
Jul 3, 2013
Messages
163
Are you using x264? Because you could use the threads=# parameter to handle this
 

b88

Member
Joined
Nov 29, 2016
Messages
30
Was this implemented? I tried the issue link, but it is broken.
This would be a very useful feature, since it isn't really necessary to run an entire VM and limiting ajail's CPU and RAM usage is supported in FreeBSD.
https://wiki.freebsd.org/JailResourceLimits
https://wiki.freebsd.org/JailResourceLimits

It is also possible to give a jail access to only one specific cpu or core, e.g. core 0.
I would really like to see this in the GUI, since i am not super familiar with bsd.
 
Status
Not open for further replies.
Top