FreeBSD 8.0 is a major release of the free UNIX descendant. Support for ZFS, jails and USB have been improved, but the release also adds new features, such as NFSv4 and Xen DomU support and some new kernel-related tools. The release notes detail these and other changes that appear in the latest FreeBSD.
New kernel tools
The new textdump feature comes in handy when debugging kernel panics, as it extracts commonly needed information from the kernel memory dump. Textdump stores human-readable text files into a tar archive, and those files can then be analyzed without access to kernel source and symbols. The textdump files are also appropriate for filing a bug report. By default, kernel dumps are still generated in the machine-readable binary format, but by setting the debug.ddb.textdump.pending sysctl variable to 1 using sysctl, the next dump will be a textdump.
Another interesting utility is procstat, which displays detailed information about running processes, such as command line arguments, virtual memory mappings, thread information, file descriptor information, etcetera. FreeBSD 8 also supports Sun's DTrace (introduced in release 7.1), a dynamic tracing framework to assist in profiling the operating system and applications, e.g. to find performance bottlenecks.
FreeBSD 8's network stack has been optimized with a per-CPU flow cache, which increases network throughput on multi core systems, and improvements in the scalability of UDP and TCP. The wireless networking stack has been extended with the "Virtual Access Points (VAP)" functionality, which lets administrators define multiple wireless networks to be hosted from a single access point. This allows for example one wireless network with WPA2 encryption for access to the local network and one without encryption for basic network access for visitors. FreeBSD 8 also supports draft 802.11s mesh networks.
On the file system front, NFSv4 support has been added (both client and server side), although it is still experimental. Thanks to NFSv4, users can have better security access controls and performance improvements. NFSv4 ACL support is not yet complete: libc changes and some of the kernel changes are part of FreeBSD 8.0, but user space utilities and support for the access control lists in ZFS are expected in FreeBSD 8.1.
The ZFS file system has been upgraded from version 6 to version 13 and is deemed production ready. Also, because ZFS requires a large amount of kernel memory, the limit of kernel memory that could be allocated in FreeBSD has been increased from 2 GB to 512 GB. Two GB was a bit cramped for Sun's file system, which tends to use as much kernel memory as it can. ZFS is not recommended for 32-bit architectures: the ZFS Tuning Guide for FreeBSD reads "A 64-bit system is preferred due to its larger address space and better performance on 64bit variables, which are used extensively by ZFS. 32-bit systems are supported though, with sufficient tuning."
Since FreeBSD 7.2, it has been possible to assign multiple IPv4 or IPv6 addresses to a FreeBSD jail. Jails can now also be restricted to certain CPUs and they can be nested hierarchically. A child jail is always at least as restricted as its ancestors.
Another (experimental) virtualization improvement is VImage, a network virtualization system. This makes it possible to give jails their own independent packet filters and routing tables. All these features open new possibilities for FreeBSD hosting services, who use jails a lot. For example, a web server in a jail can now be assigned multiple addresses and offer virtual hosting, customers can create jails inside their own jail to secure their services, and they can use their own firewall.
The developers have also integrated experimental Xen DomU support into FreeBSD, allowing it to be used as a 32-bit guest operating system on a Xen 3.1 or higher Dom0 host. This will eventually make it possible to use FreeBSD on Amazon EC2 (which at the moment uses Xen 3.0.3). Moreover, the open source edition of VirtualBox has also been ported to FreeBSD (emulators/virtualbox in the ports collection).
FreeBSD focuses on the server, but it can also be used as a desktop
system, although its descendant PC-BSD (8.0 now in alpha
release) is better suited for this purpose. The GNOME desktop environment has been updated to version 2.26.3 (x11/gnome2), and KDE to 4.3.1 (x11/kde4). In previous versions, removing a USB storage device without unmounting its file system first resulted in a kernel panic, crashing the operating system. Release 8.0 adds USB storage hot plug functionality. For desktop users, this is a visible improvement of their user experience, giving FreeBSD the stability it needs on the desktop. Under the hood, the USB stack received a significant overhaul, fixing many long standing problems.
For users that compile their software from the FreeBSD ports collection (with around 20,000 packages that can be compiled from source), there is a simple but very effective new feature. If the hardware has a multi core processor, individual software will be built in parallel on all available cores by default. This is achieved by passing the -jX flag to make, with X the number of cores in the machine. The user can override this number with MAKE_JOBS_NUMBER in /etc/make.conf. Not all software supports this, but the most popular ports do, which speeds up compilation considerably.
One thing that hasn't changed a lot (again) is the installation utility, sysinstall. Its man page even reads "This product is currently at the end of its life cycle and will eventually be replaced". However, currently there are no signs of a replacement utility. One domain where sysinstall fails is that it doesn't support ZFS yet. As a consequence, installing a ZFS-only FreeBSD system requires a lot of manual steps.
Because the GCC compiler suite was relicensed to GPLv3 after the 4.2
release, commercial users of FreeBSD have been looking into compilers with
a more liberal license. One promising project is the Clang/LLVM combination, which is a
BSD-licensed C/C++ compiler suite. So the FreeBSD project is intending to
use Clang/LLVM as the default compiler for the base system. This is a work in progress, and Clang/LLVM will not likely replace GCC for all third party software, because many depend on GCC-specific constructs.
Last month, FreeBSD 8 also saw the addition of Grand Central Dispatch, Apple's solution for automatic thread pool management in Mac OS 10.6 ("Snow Leopard"). The FreeBSD wiki lists the status of the GCD port and some references to give it a try. Incidentally, both Clang/LLVM and Grand Central Dispatch are backed by Apple, making the Cupertino-based company an important contributor to the future of FreeBSD.
It is difficult to pinpoint one unique area were FreeBSD 8 shines. The release shows improvements in a lot of areas. From kernel programmers and file system lovers to developers, administrators and even end-users, everyone will find something new. From the standpoint of a Linux user, one could ask why someone might want to choose FreeBSD over Linux. This is largely a matter of taste, but your author likes the clean FreeBSD ports system which even allows you to select build options, the excellent hands-on documentation in the FreeBSD Handbook and the quality of the man pages.
to post comments)