Performance and advice questions.

Miroslav Lachman 000.fbsd at quip.cz
Mon Oct 6 22:06:23 UTC 2008


Jose Amengual M wrote:
> 
> Hi all.
> 
> I have been working with jail for a couple of years now with awesome  
> results.
> 
> At first time I try creating Jails with the instructions of the  
> handbook and then I move to ezjail that give me great useland tools  for 
> admin my jails and so on.
> 
> But like any other technology there is performances tuning and new  
> features to research and test and because of that I came across  
> different approaches to achieve better performance of "easy"  
> administration, so here are my questions :
> 
> 1.- There is any benefit to run jails in images or virtual disk ? ( 
> http://www.the-labs.com/FreeBSD/JailTools/README.virtual_disks  )
>   ( the reason that I ask this is because of comparing with vmware  
> workstation that looks to run faster in a virtual disk that a hardisk ).
> 
> 2.- There is any disadvantage to use lo0 for virtual interface aliases  
> for my jails ?
> 
> 3.- with vimage or similar tool can I create a virtual interface  ( like 
> test0 or something like it ) and ad it to a jail ?
> ( I'm asking this because I will like to have a virtual interface for  
> my jails and over it make the alias for my jails, but no using a real  
> interface, so I can have a kind of DMZ and maybe achieve better  
> performance if is possible( like vswitch in vmware ) ).

I am using jails on "virtual interface" - I have created lo1 with IPs 
from some private space (like 192.168.x.x)

It can be created by hand by ifconfig create lo1, or from rc.conf at 
boot time:
cloned_interfaces="lo1"
ifconfig_lo1="inet 192.168.16.2 netmask 255.255.255.0"
ifconfig_lo1_alias0="inet 192.168.16.3 netmask 255.255.255.255"
ifconfig_lo1_alias1="inet 192.168.16.4 netmask 255.255.255.255"
...
ifconfig_lo1_aliasX="inet 192.168.16.Y netmask 255.255.255.255"

Then you can use those IPs for jails as usual.

Or you can create more interfaces with single IP each, but I do not know 
the reason.

> 4.- There is any disadvantage to store and run jails on a NFS server  ( 
> I mean the jail directory in a NFS) ?

I think that NFS is usable for low load jails or for storing read only 
portion of jail, but it will be the bottleneck for any high performance 
needs (databases, mailservers etc.)

Miroslav Lachman


More information about the freebsd-jail mailing list