FreeBSD is an amazing operating system

Posted on 2020-01-20. Last updated on 2020-01-21.
This is a small article about some of my adventures with FreeBSD and why I believe it is an amazing operating system.

Update 2020-01-21: Since I wrote this article it got posted on Hacker News, Reddit and Lobster, and a few people have emailed me with comments. I have updated the article with comments where I have found it suitable. As a side note I want to point out that I am not a FreeBSD developer, there may be things going on in the FreeBSD world that I know absolutely nothing about. I am also not glued to the FreeBSD developer mailing lists. I am not a FreeBSD "fanboy". I have been using GNU/Linux a ton more for the past two decades than FreeBSD, mainly due to hardware incompatibility (lacking or buggy drivers), and I love both Debian GNU/Linux and Arch Linux just as much as FreeBSD. However, I am concerned about the current development in GNU/Linux land as of late. Also this article is not about me trying to make anyone switch from something else to FreeBSD. It's about why I like FreeBSD and that I recommend you try it out if you're into messing with operating systems.

I think the year was late 1999 or mid 2000 when I one day was browsing computer books at my favorite bookshop and I discovered the book The Complete FreeBSD third edition from 1999 by Greg Lehey. With the book came 4 CD Roms with FreeBSD 3.3.

I had already familiarized myself with GNU/Linux in 1998, and I was in the process of migrating every server and desktop operating system away from Microsoft Windows, both at home and at my company, to GNU/Linux, initially Red Hat Linux and then later Debian GNU/Linux, which eventually became my favorite GNU/Linux distribution for many years.

When I first saw The Complete FreeBSD book by Greg Lehey I remember noticing the text on the front page that said, "The Free Version of Berkeley Unix" and "Rock Solid Stability", and I was immediately intrigued! What was that all about? A free Unix operating system! And rock solid stability? That sounded amazing.

The Complete FreeBSD 1999 cover

I immediately bought the book and it became my favorite reading material for a long time (even when I wasn't doing anything Unix related).

I was surprised that I had never heard about FreeBSD before since it had existed since 1993, but at least another "Unix like" operating system wouldn't be completely foreign to me because of my experience with GNU/Linux, and it wasn't.

I did some test installs on different hardware and I loved FreeBSD right away. FreeBSD became my first FTP server run from home.

Later in 2000 I was employed by one of the biggest ISPs in my country and discovered to my surprise that the entire server and network structure was run on FreeBSD. The only computers that didn't run FreeBSD was the computers at the office where the sales people and secretaries worked, those ran Microsoft Windows. When I asked about the choice of operating system the system administrator said something like:

People who know what they are doing run FreeBSD! Everyone in the communication industry run FreeBSD!

I eventually got to experience the FreeBSD "Rock Solid Stability", mentioned in Greg Leheys book, first hand. FreeBSD was amazing. It was very performant and extremely stable. Every single customer that hosted at the ISP, and that was a lot of customers, was being served by FreeBSD, and it was running on everything from old 386 PCs to the latest Pentium 4 machines. The only time FreeBSD needed to be rebooted was when it had been upgraded in the base system. During the time I was there I never experienced a problem anywhere where FreeBSD was running.

Contrary to FreeBSD, GNU/Linux was viewed upon as a "toy" operating system. It was used only by some of the support staff for their private setups.

What I failed to realize back then was that FreeBSD was (and it still is) designed as a complete multi-purpose operating system meant to be setup and tuned according to specific use cases. When I occasionally installed FreeBSD it didn't always perform as well as a default Debian GNU/Linux installation for the same task. Even FreeBSD on my FTP server at home eventually got replaced by Debian GNU/Linux because FreeBSD had to be rebooted every third day or so otherwise the performance degraded a lot. Debian on the other hand performed without any "hick-ups".

Update 2020-01-21: People have been asking about what the specific problem with FreeBSD was, but I cannot remember the details exactly. I think it was something about the FreeBSD server running out of memory, but I'm not sure. Also I didn't try to solve the problem, I was too busy and just replaced FreeBSD with Debian. Also this was a very long time ago. Of course this was some kind of bug and I highly suspect that it was the FTP server software I was running and not even related to FreeBSD at all.

Update 2020-01-21: Someone commented on Hacker News with the following statement: "IMO, if it needs to be manually tuned, that's a bug, not a feature. (And I'm speaking as a FreeBSD developer on that.)" I disagree completely with that. There are many options which you cannot simply auto tune because the use cases are so different and you need to be able to set the specific options you need manually. There is a big difference between running a busy static fileserver with something like NGINX on top of FreeBSD, and then running a busy database server on FreeBSD, each setup may require specific tuning for your use case, whether this is in the filesystem or the kernel or something else.

Later in the years to come GNU/Linux also got better hardware support, and often when I wanted to install FreeBSD some stupid hardware didn't work. Hardware was very expensive back then and I didn't have the option to purchase hardware that I knew would work on FreeBSD. All of these issues eventually made me use GNU/Linux a lot more than FreeBSD. Today this is no longer as big a problem as FreeBSD has great support for most modern hardware, but GPU support is not as good as it is on Linux. The FreeBSD wiki provides some relevant information.

I still liked FreeBSD very much and I eventually ended up using FreeBSD as my main desktop computer for a very long time (while also still running several GNU/Linux distributions on other computers).

Some of the things I love about FreeBSD are:

As mentioned previously, because FreeBSD is a real multi-purpose operating system with many different use cases, FreeBSD is very flexible and tuneable. Whether you want to run FreeBSD on your desktop computer or on your server, it provides many tuneable options that enables you to make it very performant. The options set out-of-the box may not suit your needs exactly, but then FreeBSD provides lots of documentation on how to get it to work as you need, and it provides a very helpful community with many people who has experience in dealing with many different situations and problems.

I believe it is important to understand that FreeBSD is not like a GNU/Linux distribution. FreeBSD is an operating system made by developers who are also system administrators. (Update 2020-01-21: At least it used to be like that, perhaps today to a lesser degree). This means that FreeBSD is supposed to be run by system administrators who understands how the system works. You cannot simply jump from something like Ubuntu, Fedora or OpenSUSE and then expect that you get the same experience on FreeBSD (I and a lot of other people would be extremely sad if that were the case).

A Linux distribution is a collection of tools written by different groups of people, often with conflicting interests and priorities.

A Linux distribution needs the Linux kernel, the GNU tools and libraries, perhaps additional third party software, documentation, the X Window System, a window manager, and a desktop environment, and it then needs to combine these different components into the resulting distribution. Different distributions focus on different goals, some put focus on the desktop while others put their main focus on servers, and again others try to provide a multi-purpose operating system, like Ubuntu.

FreeBSD is not like that. FreeBSD is a complete operating system produced by a team of people who are passionate about the work they do, there are no conflicting interests in the project. The people who maintain the kernel are also the people who maintain the C library, the ls, stat and other commands, and the different tools. FreeBSD also provides full documentation to everything related to the operating system.

Update 2020-01-21: If FreeBSD is to be used as a desktop operating system it too needs third party software, the X Window System, a window manager, and a desktop environment. My point is that FreeBSD is not a collection of tools written by different groups of people, often with conflicting interests and priorities, like that of the Linux kernel, the GNU C Library, etc.

Update 2020-01-21: Someone has pointed out that there do exist conflicting interests in the FreeBSD project as well and an example that springs to my mind is perhaps the conflict between Matthew Dillon who eventually forked FreeBSD into DragonflyBSD because he disagreed with other FreeBSD developers about performance issues. But my original statement has perhaps been misunderstood. I don't think issues like that in BSD is the same as conflicts between completely different projects like the Linux kernel and the GNU C library. A serious conflict in Linux land could result in a non-functional operating system, this cannot happen with the BSD projects because of the structure of the projects. On FreeBSD disputes are settled by the core team and by voting, and on OpenBSD Theo de Raadt, who is the project leader, has the final say. If someone disagrees, he either eventually accepts the final decision, or he has the freedom to fork the project, like Matthew ended up doing, and like Theo de Raadt ended up doing with NetBSD. This is very different from what's going on in GNU/Linux, which is what I meant to express.

Whether you're a GNU/Linux user who has been distro hopping for some time, or you're a GNU/Linux user who already have found his or hers favorite GNU/Linux distribution, or perhaps you're even a Microsoft Windows user or a MacOS user, in any case I highly recommend you try out FreeBSD. But before you do so, spend some real quality time studying the FreeBSD documentation, you will get the most out of the system if you understand something about how it works. Reach out to people on the IRC channels or the FreeBSD mailing lists or the FreeBSD forums, you will find many helpful people.

I also highly recommend the book Absolute FreeBSD by Michael W. Lucas, who is a network/security engineer with lots of experience working with high-availability systems on FreeBSD. Michaels book gets into a lot of details about the FreeBSD operating system. It is well written and contains many relevant details.

Michael W. Lucas, together with Allan Jude, has also written the FreeBSD Mastery: ZFS and FreeBSD Mastery: Advanced ZFS books for those interested in the ZFS filesystem running on FreeBSD. The second book is a follow-up to the first book, with more advances use cases. Both books are invaluable.

FreeBSD is an amazing operating system!

Some relevant links