FreeBSD vs Linux performance? [closed]

Solution 1:

It is possible to configure Linux behave badly and it certainly is possible to configure FreeBSD behave badly. Both systems can also provide you a stellar performance.

But unless your server is really, really busy you won't see any real-world difference between the two. It is best to use the one you already know and concentrate on fine-tuning the daemons (such as Apache or MySQL) and the applications running on the top of them.

Compiling your own kernel or tinkering with the kernel internal settings starts to matter under a load which nears your hardware limits, whereas creating proper database indexes, caching your web page content, adjusting Apache and PHP settings (or even using lighttpd instead of Apache) and so on helps you right from the start. Even the most "correct" kernel settings won't optimize your page load time noticiably if every page load hits the database or PHP has to render a very complex page.

One area where I definitely would consider FreeBSD is a file-server. FreeBSD has native ZFS support and traditionally it has been a very stable environment for NFS/Samba use.

Also security-wise it's much more likely that someone breaks through your WordPress/Drupal/custom PHP application than by using a OS level security hole.

Solution 2:

From a technical side we did a lot of research and testing in performance, security and stability. The result was that you can misconfigure every OS to be slow and instable. But based on a standard installation with common tweaks FreeBSD was more stable, secure and performant than any other Linux we tried (RedHat, CentOS and Debian).

From the financial side we found out that the ROI and TCO are a little lower than for Linux systems. FreeBSD is continuously developed and tested very well. Maintenance and upgrades are very smooth and adaptation to own requirements can be easily made thanks to the fabulous ports tree.

For me I would always choose FreeBSD as it is much more fun to work with a consistent system where you know what to do if something goes wrong. For Linux there are too many differences between each distribution which makes research a lot more difficult.

Linux is something you can use for gameservers or embedded systems or as desktop OS. FreeBSD was always meant to be a highly stable server OS and there is almost no OS which can compete.

If you don't know FreeBSD and don't know Linux you should install a common distribution (Debian, Ubuntu or CentOS) and install FreeBSD. If you fall in love with the ports tree and the consistency of FreeBSD, stick with it. If you like the precompiled packages and endless repositories, stick with Linux.