Take the 2-minute tour ×

I'll soon buy myself a nice server (something like the quad-cpu HP DL585) for personal use (home related stuff, data-mining projects, web server and some cron jobs), and I wonder how to separate all those tasks into dedicated environments.

I'm used to FreeBSD & Linux server administration and virtualization setups (Xen & VmWare), so virtualization came quite naturally. But as I plan to use FreeBSD, I can also use jails (I'm not interested in running any other OS than FreeBSD).

But I lack experience in FreeBSD jails, and never planned to use them before. So I'm looking for some experience return and perhaps for someone with experience in both domains who could advise me on which one would be best suited for my humble needs.

share|improve this question

5 Answers 5

up vote 3 down vote accepted

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.

share|improve this answer
Though it seems you can tune some of these restrictions though sysctl... . –  Vincent De Baere Jun 2 '09 at 9:49
Jails can have access to raw devices; by default they have none, but it's configurable. –  Chris S Jul 1 '10 at 21:35

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.

share|improve this answer

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]

share|improve this answer
I wouldn't trust that article too much. They are comparing FreeBSD Jails (Containers) vs. VMware Server. VMware Server is an application which runs on top of an operating system. It's old, slow and not heavily used anymore. They should have compared FreeBSD Jails vs. a hypervisor like VMware ESXi. –  Stefan Lasiewski Apr 13 '10 at 22:23

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".

share|improve this answer
You can enable raw sockets in jails by setting the security.jail.allow_raw_sockets sysctl to 1. –  hark Jun 8 '09 at 14:34
Jails take almost no performance hit, particularly for processor intensive applications. I wouldn't blindly recommend against them when most virtualization programs take a mild to medium performance hit. –  Chris S Jul 1 '10 at 21:38

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.

share|improve this answer

Your Answer


