FreeBSD jails vs virtualization performance

As long as you do not require a kernel different from the host system to be run in one of your guests, operating system virtualization will probably be the solution with the least amount of overhead.

Next to the kernel version restriction, you'll also find it impossible to access raw devices from within a jail, or to alter the network config from the inside. Since you have access to the host system, you can set that one up as you require, so this is not really an issue I guess.

From the description you give, I'd certainly recommend you to give jails a try.


FreeBSD jails are great for separating tasks on a single server. I had such an experience when I needed to run 2 virtual LAMP servers on one machine:

  1. Apache + mod_php4, MySQL 4.0
  2. Apache + mod_php5, MySQL 5.0

So I just set up 2 jails with different ip's, configured a name server in a "real" environment and all worked fine for almost a year (after that the first config was deprecated) without any performance drop.

Also take a look at new jail features in FreeBSD 7.2 - might be useful.


I believe this site has the info your looking for, with some nice comparisons of before and after: [http://www.playingwithwire.com/2009/06/virtual-failure-yippiemove-switches-from-vmware-to-freebsd-jails/][1]


I use freebsd jails for many admin machines. I haven't tested the performance extensively, but I can tell you that once you get the hang of it, it's great. The time to set up a brand new jail (essentially a new freebsd system) is reduced to a couple minutes or less, with 8 or 9 commands.. and there are scripts to reduce it to one.


Virtualization will get you more features such as raw sockets, being able to test a new FreeBSD kernel, being able to put the guests to sleep, reboot the host and resume the guests and configuring the kernel differently in the different hosts.

Not being able to ping from a bsd jail sucks. (maybe this can be turned on, I'm not a freebsd guru).

Performance-wise I don't know. But I really like the fact that I can start up a scratch OpenBSD (or whatever) and test some simple thing in no time at all, and not having to leave the couch. So I'd recommend virtualization even if you will only run freebsd-systems "live".