FreeBSD or Linux in 6 Simple Questions

FreeBSD or Linux

FreeBSD or Linux (Ubuntu/RHEL)? This is a very old question. It’s like asking iPhone or Android. There is no short answer. It all depends on your situation. To make things easier, I am going to break it down into six simple questions to help you making decision.

My Background
I have been a FreeBSD user since 2003. My usage on FreeBSD mainly on service-oriented stuffs such as web farm, database clusters and file system etc. In short, I mainly use my FreeBSD system via command line. In 2009, I jumped into Linux world (Ubuntu/RHEL) because of my job. As an advanced user on both Operating Systems (FreeBSD and Ubuntu/RHEL Linux), here is my guide on these two systems.

There is only one FreeBSD, but there are many different variants of Linux. The Linux I mention below refers to two popular distributions: RHEL and Ubuntu.

FreeBSD vs Linux: Q.1 How do you describe yourself?

I am a very demanding person. I like to control everything I manage. –> FreeBSD
I don’t care about how a system is run. I am okay as long as it just works. –> Linux / Ubuntu / RHEL

Comment:
FreeBSD gives you freedom to control every single thing. One of its coolest feature is the port tree. You can build every application from source using port tree. In Linux world, you usually install applications from pre-built/pre-compiled package (yum, apt-get etc), which may not be exactly what you need.

Example:
In RHEL and Ubuntu, HTTP load balancer module does not come with Apache by default. You will need to compile Apache from source. What about in FreeBSD? All you need is to check a box (pretty much like shopping cart) and you are done.

FreeBSD vs Linux: Q.2 Do you prefer Ferrari or Hyundai?

Ferrari / BMW / SLR Camera –> FreeBSD
Toyota / Hyundai / Point and Shoot Camera / Phone Camera –> Linux / Ubuntu / RHEL

Comment:
The technology uses by FreeBSD such as kernel, file system, architecture etc are way better and more advanced than Linux. It’s like comparing Ferrari and Hyundai (And no, I am not kidding).

Example 1:
I need to run some extreme applications (e.g., DNA Sequence Alignment) which use all available threads and memory. The default settings of memory management in Linux is very poor. Every time I run my application, the system becomes not usable to other users. However, FreeBSD does not have this server problem. In fact, FreeBSD is smart enough not to cause the system to freeze. Of course you can tweak the memory management settings in Linux, or even run the command along with the nice command. However, these settings are just not available out of the box, and most of the time, you learn these tricks after your system has problem.

Example 2:
I installed FreeBSD 11 and RHEL 7 on two identical computers respectively. Both use default settings and enable similar services, such as enabling the SSH server and disable booting to X-Windows (RHEL). I used these two machines for exact the same purposes: SSH tunneling, with exact the same work load (evenly distributed). After using them for a month, I checked the memory usage. With FreeBSD, the available memory is about 800MB (out of 1GB), while there are only 200MB left (out of 1GB) on RHEL. Yes, Linux (at least with RHEL 7) consumes lots of memory.

Example 3:
FreeBSD comes with ZFS (The next generation file system) by default. Although it has been ported to Linux world, it is definitely unstable. We’ve tried to use it in a production environment. One thing that we’ve learned is that the ZFS may stop working after upgrading to a newer Linux kernel. I’ve received countless of email alert about missing the files (ZFS is not working, of course the files are gone) in the middle of the night. I ended up disable the auto update and disable the reboot after the update. Sounds familiar? That’s a feature in Windows, and for some odd reasons, this feature is available in Linux, a server.

Example 4:
LVM+RAID is an the most advanced storage method in Linux world. Unfortunately it does not do what it promises, i.e., you may lose your data if a hard drive is failure, even if you follow its directions to detach your failed hard drive correctly. Not to mention that the data will get corrupted if the power is down (which has been taken care of in ZFS, available in FreeBSD).

That’s why I prefer ZFS over LVM+RAID here: Building a Super Large and Reliable File Server with Mixed Size of Harddisks. It solves my problem (yes, even the power is failed during writing to the disk, my data is still safe!)

FreeBSD vs Linux: Q.3 Do you have lots of free time?

Yes: FreeBSD
No: Linux / Ubuntu / RHEL

Comment:
Making a production-ready system using FreeBSD can take you days to weeks if you are not an experienced FreeBSD user, while everything works out of the box in Linux. Sometimes, the new upgrade from the port tree can drive you nut, such as package conflicts etc. However, working with Linux is a leisure thing.

Example:
Installing Apache + MySQL + PHP from FreeBSD port (compiling the source) can take at least half day on a computer with a dual core CPU (AMD Athlon 64 X2 Dual Core Processor 4600+), while it takes less than 30 minutes on Linux. That’s because you need to compile the code from source in FreeBSD, while you simply download the packages and extract them in Linux. The time difference is huge.

FreeBSD vs Linux: Q.4 Do you prefer simplicity or complexity?

Adding sugar into water –> FreeBSD
Taking sugar away from soda–> Linux / Ubuntu / RHEL

Comment:
FreeBSD is a very very simple system. Think of it as a bare-bone system that comes with no junk. By default, it comes with no graphic user interface, no unnecessary application. It likes a pure distilled water.

In Ubuntu / RHEL, everything is configured and ready to use. It comes with very attractive, beautiful graphical user interface. Everything just works out of the box, no tuning or tweaking is required. However, it also comes with lots of junk such as Ubuntu One (For Ubuntu Cloud service), SELinux (A program developed by Red Hat where many people don’t use it), etc. It makes your system very bulky and increase the computation resource consumption.

FreeBSD vs Linux: Q.5 Are you going to use the computer as desktop?

Yes: Linux / Ubuntu / RHEL
No: FreeBSD

Comment:
Setting up a desktop-ready system on FreeBSD can take a long time. Main reason is the drivers availability. A lot of hardware such as graphic cards, audio cards or webcams are not supported in FreeBSD natively. If you want to get them working as good as on Windows / Ubuntu, you will need to get the driver first (if available), build it (which may gives error during compiling the codes), and recompile the kernel to make it supports the new driver, which can take few days if you are not experienced with FreeBSD and debugging driver.

On the other side, the Linux driver community is very strong and well developed. Usually they develop drivers for most popular hardware.

Example:

#1: My Logitech Orbit MP webcam (Pan / Tilt / Zoom) is not working on FreeBSD but works like a charm on Linux.

#2: Some vendors such as Highpoint may stop developing drivers for their products for newest version of FreeBSD.

FreeBSD vs Linux: Q.6 Do you need to blame someone when something goes wrong?

Yes: Linux / Ubuntu / RHEL
No: FreeBSD

Comment:

When something goes wrong, you can blame Linux and you can’t blame FreeBSD.

FreeBSD is a community driven operating system, while some Linux distributions such as Ubuntu and RHEL are backed by commercial vendors. In the world of FreeBSD, it is not uncommon that some unskilled developers introduce bugs, troubles to the rest of the world. Yes, we know it is free, so we can’t complaint about it. However, as an IT administrator, you will need to use your judgement to judge whether those new stuffs are safe to use or not. In short, that will increase your workload. It’s more like Windows update. How many people actually read the change log before hitting the update button?

In Linux (e.g., RHEL), that’s a whole different story. Every patches, new updates have been screened by the vendor before hitting to public. So you can trust them in some degree. And the key thing is, you can blame them when something goes wrong.

Conclusion

In short, use FreeBSD for your personal purpose while Linux for your work. Be the top 5%, not the bottom 95%.

Our sponsors:

9 Replies to “FreeBSD or Linux in 6 Simple Questions”

  1. Tim

    You are obviously not as advanced a Linux user as you claim.

    To point out just a few mistakes:

    “In Linux world, you usually install applications from pre-built/pre-compiled package (yum, apt-get etc), which may not match exactly what you need.”
    Just because it’s easy to install binary packages in Linux doesn’t mean you have to. yum/apt-get are similar to freebsd’s pkg_add but far more mature with far more packages included. If you don’t want to install binary packages, you have “ports”-like systems in linux as well (e.g. in archlinux you could use AUR or ABS see https://wiki.archlinux.org/index.php/Arch_Build_System)

    “Example 1:
    I need to run some extreme applications which uses all available threads and memory. The default settings of memory management in Fedora / Ubuntu are very poor. Every time I run my application, the system becomes not usable to other users. However, FreeBSD does not have this problem.”
    This is simply not true. I’ve been using Linux for around 10 years in a personal and professional capacity and never have I experienced what you are describing.

    “Example 2:
    ZFS (The next generation file system) comes with FreeBSD natively. Although it has been ported to Linux world (called ZFS-FUSE) as an application (For legal reason, Linux does not support running ZFS at kernel level), it is still unstable and I definitely won’t use it on a production environment.”
    First of all, ZFS comes from Sun’s Solaris (now Oracle) so it’s misleading to claim it’s a freebsd invention.
    While it’s unfortunate that ZFS isn’t available natively on Linux, there are a couple things to consider:
    1) There is an open source effort as well as a commercial effort to get ZFS to run natively on Linux. Most of the features are already working as well as they do on freebsd, some others are still being worked on (like data-deduplication).
    2) Oracle, Intel, HP, Red Hat, and a bunch of other companies are working very hard on BTRFS which when stabilized, will give you all of the good features of ZFS, minus the bad design ideas, plus other great features, natively on Linux. Expect to see it in enterprise releases RHEL/SLES in the next year or two, it’s already in Fedora/Ubuntu.

    “Example 3:
    LVM+RAID is an the most advanced file system in Linux world. Unfortunately it does not do what it promises, i.e., you may lose your data if a hard drive is failure, even if you follow its directions correctly.”
    No, no, no. There is so much wrong with this claim. LVM is not a filesystem, raid is not a filesystem. RAID provides redundancy and will absolutely protect your data from a hard drive failure, including multiple drive failures. LVM is Logical Volume Management which provides you with a pool of data (whether it’s redundant or not is completely up to you when you set it up) allowing for easier management of storage (shrinking, growing, moving, striping, mirroring, migrating etc.) ZFS has both RAID and Logical volume management capabilities built into it which doesn’t follow the UNIX principle of doing one thing and doing it well.

    “In Ubuntu / Fedora, everything is configured and ready to use. It comes with very attractive beautiful user interface. Everything just works out of the box, no tuning or tweaking is required. However, it also comes with lots of junk such as Ubuntu One (For Ubuntu Cloud service), SELinux (A firewall developed by Fedora where many people don’t use it) etc. It makes your system very bulky and increase the computation resource consumption.”
    First of all, SELinux is *not* a firewall. It’s a Mandatory Access Control (MAC) framework providing protection from users/processes on the system that might want to subvert security. Think of it as a rule book that defines what should be allowed to happen on the system, anything that falls outside of that rule book is denied by default. It is absolutely *not* junkware. It does not make the system bulky and has a completely negligible effect on performance and resource consumption.
    Also, while it’s true that Fedora/Ubuntu install a lot of packages by default, that’s not true of other Linux distros such as archlinux and gentoo. Furthermore, even though many distros will install full desktop environments and other packages by default, that can easily be changed during the install process. It’s a really nice feature that it can be so easy to get a working graphical system in so little time, much like PCBSD.

    FreeBSD is definitely a nice OS and so are several Linux distros. Both have their faults and strengths, but I just couldn’t stand by and let you preach falsehoods about Linux. Other than that, thanks for the comparison, it’ll be useful to newbies.

    Reply
    • Derrick Post author

      Hi Tim,

      Thanks for your comment. I know this article is going to catch the fire. And I agree with most of your comments, i.e.,”Hey, Linux is open source, you can do this and that as well. Anything available on FreeBSD, we have that on Linux.” Before I defense and support my arguments, I like to let you know that I don’t want to start another war between FreeBSD and Linux. Let’s focus on business, user-experience and common sense, and forget about the technology.

      1. As I mentioned at the beginning of my post, the Linux I referred in this post are the most popular Linux distributions, Fedora and Ubuntu. There are more than hundreds of other distribution available. It is impossible to compare them one by one.

      2. The design philosophy of every system are different. Every system has their own recommended way to do things. FreeBSD recommends user to install app using port, and Ubuntu and Fedora suggests to do it via apt-get/yum. Yes, you can do it in your own way (such as AUS/ABS you mentioned). Is it recommended, user-friendly, intuitive, quick, easy, reliable and no hassle? It’s like running an Android system on an iPhone via jail break. It is possible, but it is not recommend, and definitely not many people do it.

      Another example will be running Linux App on Windows via Cygwin. Why I have to go through so many steps to get things done (with uncertainty). Why not just run it on Linux (with guarantee result)?

      It’s all about user-friendlyness.

      3. Talking about the ZFS example, here is something you need to keep that in mind. Time is money. I don’t want to spend another couple years to wait for other enterprise companies to fix the legal issues. As a user, I want to use it right now. Why I should stick with Linux while everything is ready on FreeBSD?

      I think I’ve discussed enough common scenes. Let’s go back to the technical part.

      >I’ve been using Linux for around 10 years in a personal and professional capacity and never have I experienced what you are describing.
      Probably the program you used is not resource hunger enough (Apache, PHP, MySQL and other common service apps are really resource friendly). Try running some extreme apps such as DNA sequence alignment program (like Bowtie). That will definitely bring a Fedora Linux (i7 with 8GB memory) down without memory tweaking.

      >First of all, ZFS comes from Sun’s Solaris (now Oracle) so it’s misleading to claim it’s a freebsd invention.
      I never mentioned that ZFS was invented by FreeBSD in my post. I just said it is supported by FreeBSD by default.

      >First of all, SELinux is *not* a firewall. It’s a Mandatory Access Control (MAC) framework providing protection from users/processes on the system that might want to subvert security. Think of it as a rule book that defines what should be allowed to happen on the system, anything that falls outside of that rule book is denied by default. It is absolutely *not* junkware. It does not make the system bulky and has a completely negligible effect on performance and resource consumption.
      I know SELinux is a nice program. It tries to protect your system, like the security settings in Internet Explorer. But it makes the system not usable without tweaking. A lot of people simply disable SELinux to get things going instead of wasting time to trouble shooting the computer problems. Again, time is money.

      Again, thanks for your comment, and I tried my best not to bring another war between FreeBSD and Linux. That’s not my original idea. I just want to provide an user a way to find which system is a better fit.

      –Derrick

      Reply
  2. Gavin Howard

    Thanks for this article. I was originally a Windows user, but I got a job at a programming company, and my coworker convinced me to try Ubuntu. I was reluctant, but once it was up, I was hooked in minutes. It was so refreshing.
    Ever since then, I have been looking more an more into open source software. One of my favorites, Blender, works on FreeBSD, so I started researching the difference between it and Ubuntu. I didn’t have to look long. This article told me exactly what I needed to know.
    I liked your questions. They were a simple way of comparing certain aspects.
    I will probably double install Ubuntu and FreeBSD on my computer at a later date. Thanks again.

    Reply
  3. Derrick Post author

    Hi Gavin,

    Thanks for your comment. Depending on your preferences, you can either install FreeBSD from fresh (This way, you can learn a lot from building and customizing your FreeBSD), or you can download a ready-to-use copy, VirtualBSD, a pre-configured FreeBSD that works on VMWare.

    Have fun!

    –Derrick

    Reply
  4. matias

    Hi Derrick,

    I have been using FreeBSD and Linux, in different scenarios, for 10 years or so and I wholly share your point of view. Thanks for an easy to grasp piece that very nicely gives a feel of the general philosophy and user-experience of FreeBSD and Linux without trying to be exhaustive or being too technical. Not that I don’t love technical, but there is plenty of it available, while material that can be used to give neophytes an idea of the core differences in a clear and simple way is not that easy to come by.

    Most of your statements could be debated on details but I think you made quite clear they were just there to reveal general principles and as such I find them faultless.

    About Q3 I would argue that “Do you have lots of free time?
    Yes –> FreeBSD
    No –> Linux / Ubuntu / Fedora” is absolutely correct but I would disagree on the reason you offer. I find that installing binary packages in FreeBSD is just as simple as in Fedora/Ubuntu and that the result can be trusted more (stability of features being a more important value in FreeBSD, even with binary packages), so you can definitely get a working environment in a short time too.
    The thing is, though, that when your requirements deviate a little from the defaults, FreeBSD makes it very easy to get an exact fit and it is very hard to settle for anything less. This of course means that you inevitably start to understand better what you are doing, what you need and how things work under the hood and you keep going deeper and making it better. So in the end it takes a lot of time.

    It is not an endless process though and you get a working set-up from the get-go, it’s just that you end up refining and improving it a lot. And from the beginning, it’s already better than what you would get with a plain-vanilla package. So you do not even think about using packages any more. Who would, anyway, when portmaster (for example) makes building a port (and generating a reusable package with your exact fit) so easy?

    I would also like to expand your car metaphore to underline the fact that the BMW/Mercedes will not only get you through your journey faster and on less fuel than the flimsy Hyundai but also that it is much safer and stable. You can throw iced roads, storms and floods on its way, the passengers will hardly notice it. Of course driving a car like this BMW means you will prefer to use manual transmission rather than automatic because it gives you much more control, so your arm will end up doing a lot more work but you would not have it any other way.

    For a server I would never settle for less than pf (THE firewall, ported from openBSD), jails, ZFS and the ports tree.

    The same is be true for my own laptop, buth I usually install some flavour of Linux on the laptops of friends and relations who ask for help. Though even that will probably change in the next few months, given the maturity level of PCBSD.

    Reply
  5. matias

    lo! my comment is doing exactly the contrary of what it says yours did so well. Yours shows that different needs and expectations lead to different choices, each valid and correct in their own context, mine makes it look like there is only one good choice, the typical start of so many unnecessary flame wars. So let me correct myself: when I seem to imply that FreeBSD is the only right choice, I was actually expanding on the reasons why I think it is the right choice for someone who would tick answer a) for the 6 questions you were asking.

    Reply
  6. Derrick Post author

    Hi Matias,

    Thanks! In fact, I also lean toward to FreeBSD for my servers, given that its stability and performances. (I always prefer a rock solid beast than a fragile, non-stable beauty).

    Reply
  7. Ahmad

    Hi Derrick,
    Ubuntu was my first move from Windows to Linux before 7 years ago, and then moved to Fedora, now I’m using both systems.

    I was very hesitated before to use FreeBSD, but I believe now I must try it. I’ve read many many articles which compares Linux vs Linux and every article I read it I find another article disagrees with others point of view, it’s like a war. So I’ve decided to install & try by my self, but of-course these articles shares a lot of knowledge and is much appreciated.

    Thanks for your article you’ve done it in such a categorized, organized and simple way.

    Reply

Leave a Reply to Derrick Cancel reply

Your email address will not be published. Required fields are marked *