Linux vs FreeBSD


[Update 2014/04]:
Currently I prefer Linux Debian 7 with a custom-installed kernel and ext4.
Huge speed improvements were made in kernel 3.12 and disk I/O stalls were thoroughly solved in 3.14.
FreeBSD has badly regressed (10 relative to 8). 10's scheduler is wrong. It prioritizes long-running processes while forcing new processes to crawl.
Advantages of Linux:
- Linux has distributions which are easy to install and administer, even for newbies.
[Ubuntu was ruined by commercialization -- Debian is now recommended for newbies.]
- Excellent hardware support.
- Has reliable journaled filesystems.
- Linux is suited to embedded/system development.
The source code of the Linux kernel is well-organized, logically written, comprehensible, easy to compile.
Disadvantages of Linux:
- [Update: Linux 3.14 runs very smoothly.]
Linux just doesn't have the smoothness and speed of FreeBSD [Linux 2.6 ... 3.9]
Linux has never been able to run smoothly under heavy loads.
Linux suffers from frequent and lengthy I/O stalls which jams all other processes [CFQ doesn't fully solve this].
Eg, running more than one tar job on Linux will jam it.
Advantages of FreeBSD:
- [Update 2014/04: Recently the smoothness of Linux has improved greatly, but FreeBSD probably still can handle heavy loads better.]
FreeBSD is faster than Linux, multi-tasks very smoothly, handles memory over-commitment and heavy I/O without stalling.
- FreeBSD IS an operating-system, not just a kernel.
It is stable in more ways than one.
FreeBSD changes very little with new versions.
I learned FreeBSD years ago, and with only a few changes,
I am still using the same configuration files.
- FreeBSD ports provides tons of free software.
Disadvantages of FreeBSD:
- [2013/06 UFS now has the equivalent of a journal.]
Has an old clunky non-journaled filesystem.
rm -rf can be slow.
- FreeBSD port system can be frustrating when it fails.
Software packages on FreeBSD are known as 'ports'.
Ports are installed by compiling source code.
This has advantages but compiling anything can and does fail.
A port can cause dependent ports to be installed but it itself will fail to compile.
- The FreeBSD ports collection is perpetually in flux.
This is a complication for software developers because the versions of software packages
will vary depending on whatever day or hour the ports were compiled.
- A new version of a software port isn't necessarily better.
But downgrading a port is extremely difficult.
- BSD kernels aren't well-suited to embedded/system development IMO (NetBSD might be suitable?).
BSD kernels are a disorganized mess.
BSD kernels use sophisticated and optimized algorithms but the code is arcane.
Conclusion
Both are the best operating-systems I've ever used.
I prefer FreeBSD as a UNIX server and workstation (this website has ran on FreeBSD for years).
I prefer Linux for system programming and embedded development.
webpage created 2011, updated 2014