Performance and advice questions.

Josh Endries jendries at planetpyramid.com
Tue Oct 7 14:14:32 UTC 2008


Hello,

> 1.- There is any benefit to run jails in images or virtual disk ? (
> http://www.the-labs.com/FreeBSD/JailTools/README.virtual_disks

Sure there are benefits. You can easily move an image around, encrypt
it, copy it for a backup, etc.. There are trade-offs, though. I don't
have any tests but it seems to me that this would be more prone to
corruption/loss since it's all based on one huge file. A system crash
and you could be in for more trouble than usual. Also, and I did test
this (it's easy), performance is significantly slower when using an
image file than a real filesystem. I would suggest that you mount
separate filesystems/disks for your jails instead of using an image
file, if possible (hooray for ZFS).

If you have a ton of RAM, I suppose you could make a memory-backed
filesystem though, and take snapshots. :) It may be worth looking into
using a read-only memory-backed fs as your root image (e.g. in ezjail,
unionfs) and mount /usr/local or whatever from a real filesystem for r/w
access.

Josh


More information about the freebsd-jail mailing list