The compelling argument for FreeBSD has always been: zfs, pf and dtrace.
There’s also kqueues which are a much better interface to high throughput I/O than epoll.
The problem is that every time this kind of question is asked the ecosystem in Linux is different. Right now Linux has bpftrace, ZFS (kinda) and IO_Uring; so the gap has closed considerably.
You forgot to mention the "completeness" of the base system. Where Linux distributions is a "mix and match" of various tools/versions, that may or may not be the same across each of them.
FreeBSD provides a solid base that "just works". There's just one version (per release).
Jails is also another great feature. Linux has cgroups and namespaces, with various tools built on top of it like Docker, LXC and LXD, but (IMO) Jails still beat them in a heartbeat by security and ease of use.
Docker has had more severe vulnerabilities in a single year (2018 IIRC) than Jails has had in it's entire lifetime.
Shipping containers are not secure.
Similarly with software containers, you don't want data flowing into nearby containers (unless you do want that, in which case you have setup the necessary networking and that should be the only way for the containers in question to share data).
I'm mostly interested in docker et al for the isolation aspect. The "ships the app with all its dependencies" is an interesting byproduct, although all too often it translates it means there's a mess in the amount of dependencies required. And that it's going to be an equal mess come update time -- unless of course the image is never updated in which case there's a chance the image becomes vulnerable (for example, outdated libssl).
And that's why i use Jails instead (or LXC if you're on Linux). None of the layers. Any vulnerability is in the "base" image, and easily spotted, and can be hotfixed using normal package tools.
Docker is a mess. Most containers consist of minimum 4 "base images", each of which can contain vulnerabilities. All done to save the "overhead" of installing Python on top of a base Debian image, or whatever your flavor of poison is.
Instead i use Ansible for reproducibility, and scripts for updating/upgrading.
Another advantage to jails is that they're just plain directories in a hosts filesystem, allowing existing vulnerability scanners to scan the entire stack from a single host, instead of using containers that needs to be scanned individually.
ZFS: these days it's developed on and for linux first and foremost, as far as I can tell (FreeBSD moved to ZFS on linux, correct?).
Dtrace: linux finally caught up and basically went one better with perf/ebpf.
kqueues: as you said, io_uring looks like it will take care of that (and probably put linux ahead).
pf: I can see how pf is compelling if what you want is first and foremost some firewall box, and you take whatever OS comes with the firewall (I haven't used pf, but most people seem to agree its significantly nicer than iptables et al).
I begrudge the notion though, that desiring something like pf is because you primarily want a firewall box; the syntax is much cleaner and ultimately the performance is better (without bolt-ons like conntrack).
For example these are basic firewalls with rate limiting
pf: https://git.drk.sc/darkscience/ds-salt/-/blob/master/states/...
iptables: https://git.drk.sc/darkscience/ds-salt/-/blob/master/states/...
here's what we have for nft: https://git.drk.sc/darkscience/playbooks/-/blob/a09507e2a9b6...
For as much as I like both FreeBSD and Solaris, Brendan Gregg (mentioned elsewhere in the comments) has a very convincing argument as to why the scales have tipped in favor of Linux in the last few years:
http://www.brendangregg.com/blog/2017-09-05/solaris-to-linux...
The one saving grace of Solaris was that it gave you amazing debugging capabilities but the practical outcome of that was just giving you the ability to gain deep insight to see see exactly how bad Solaris was as an operating system. In all my years of using it (10+) I never experienced it as being more performant than Linux and in most cases it was way slower if you did not tune it significantly.
There were some very good ideas that went into Solaris but they were almost invariably poorly implemented.
As a matter of fact, you can't point to a single source that proves your point.
"That which is purported without evidence can be disregarded without evidence."
Ehh... if you want proof for a specific claim then ask for it. I am asking you for proof of the specific positive claim you made, which is:
> Solaris regularly beats Linux in performance on the same hardware, and the subsystems which are "slower" aren't really: they just don't lie and trade safety for performance, like Linux does. Linux is fake performance at the cost of correctness of operation.
The claims I did make is that in my experience Solaris had to be tuned to be reasonably performant. One example where tuning was needed by default was malloc. The default malloc from Solaris had horrible multi threaded performance . IIRC ZFS also had quite horrible performance by default if not tuned and I recall there were multiple tuning we had to do on new installations specifically relating to mmap to somewhat mitigate the poor integration of ZFS ARC cache and page cache which are documented here: https://github.com/openzfs/zfs/issues/225 and https://lists.freebsd.org/pipermail/freebsd-hackers/2016-Jul... there was also a whole wiki on ZFS tuning for various applications including MySQL.
The second link is an opinion from some researcher at Pasteur institute in France.
Both are bogus, but thank you for playing.
Can you clarify why you say this?
One area where kqueue will be more performance is in that it supports multiple updates on interest set in one operation, while epoll does not, which means that doing multiple updates to an interest set will likely be less performant with epoll, however high throughput I/O does not translate to high frequency of updates to an interest set.
epoll is an interface designed by someone who didn't know what they were doing at the time, that's the only way it can be described.. if you look at alternative implementations (such as IO-Completion ports on Windows) then you can see there's a lot to be desired, one of the things epoll doesn't do, for instance is tell you how many bytes are waiting on a buffer; so you have to read the whole buffer and determine if you're beginning a new unrelated message or not.
There's also the fact that epoll will evict things from the buffer on read; so you can't do a partial read and come back. It's just.. bad. io_uring solves a lot of these issues.
Jonathan Looney, Engineering Manager at Netflix, claiming their primary reason for choosing FreeBSD was GPL avoidance and that subsequent performance testing (which was not the basis for their choice) is not exactly fair because they did not do the same amount of engineering work for Linux as they did for FreeBSD.
But I don’t think it’s the case as they’ve put a lot of work into hiring some of the brightest minds in OS development, including Brendan Gregg
Or alternatively they just did not put the time in. No defaults cover all use cases, almost all software I have ever used in high load applications needed some tuning, this includes Solaris, MySQL and MongoDB among others.
> But I don’t think it’s the case as they’ve put a lot of work into hiring some of the brightest minds in OS development, including Brendan Gregg
AFAIK Netflix has used FreeBSD since 2012[1] and Brendan Gregg only started working at FreeBSD in 2014[2]. So not sure this really shows they knew what they were doing when they made the choice to go with FreeBSD. It could be they did but I still would like to something more than just Netflix's choice to back the claim up. Many more companies choose Linux.
[1]: https://lists.freebsd.org/pipermail/freebsd-stable/2012-June...
https://people.freebsd.org/~scottl/Netflix-BSDCan-20130515.p...
Seems GPL already ruled Linux out.
As a long time BSD fan (since 1998) who has had to accept the fact that Linux won out in the end, I can vouch that by far the biggest pain point on Linux is its networking stack. Whenever I have to do anything other than set an IP address I throw up in my mouth a little bit. Linux has/had its benefits (packaging, install base), but IPTables or its routing configuration isn't one of them. High performance is certainly achievable, but it has a lot of quirks.
BSD's networking stack has always been more robust. Anybody who's worked heavily with both will tell you that. It did not surprise me one bit that the primary reason they chose FreeBSD over Linux for their CDN was networking. Juniper came to the same conclusion, on top of licensing reasons.
And I would still like to see some evidence.
> Whenever I have to do anything other than set an IP address I throw up in my mouth a little bit.
Very compelling case you make there.
There are plenty of talks, papers, etc from both Juniper, Netflix, etc on why they made their choices, but your response is merely "could also be they did not understand how to configure Linux" without any evidence. We're not going to do your googling for you.
> Very compelling case you make there.
Here are the only sources I could find that gave some reasons for Netflix's choice:
- https://people.freebsd.org/~scottl/Netflix-BSDCan-20130515.p...
- https://youtu.be/KP_bKvXkoC4?t=732
Neither of them suggest FreeBSD was faster than Linux in their tests.
From both of those sources I would say avoiding GPL was the primary consideration.
If there is something to back your claim up, link to it. If you cannot link to it then how the heck do you expect me to find it. I'm not the person claiming it exists.
Also, I never said it's "faster". Most modern OS's on modern hardware can saturate most networking links. I said robust. There's a difference in how much CPU will be uses as well has how stable and consistent it can be.
I'm also not claiming FreeBSD is a magical solution to everything. I've long switched to Linux for various practical reasons, but there are some areas it still shines.
At the timestamp I shared up to the next slide no comparison is made between Linux and FreeBSD.
And the thread we were in is about someone claiming the reasons why Netflix chose FreeBSD was performance and not licensing. In fact, here is a direct debunk of that claim:
https://youtu.be/vcyQBup-Gto?t=2739
Jonathan Looney, Engineering Manager at Netflix, claiming their primary reason for choosing FreeBSD was GPL avoidance and that subsequent performance testing (which was not the basis for their choice) is not exactly fair because they did not do the same amount of engineering work for Linux as they did for FreeBSD.
> I said robust.
And I said "And I would still like to see some evidence."
... that is more robust than your anecdotal reports of nausea, which I'm not sure really I can translate meaningfully to a measure of robustness.
To which you suggested I should do your work for you like I'm your slave or something. If you can't back claims you make, don't make them, simple.
They hired Brendan Gregg [0] so I think they know what's going on.
[1]: https://lists.freebsd.org/pipermail/freebsd-stable/2012-June... [2]: https://www.linkedin.com/in/brendangregg/
- https://people.freebsd.org/~scottl/Netflix-BSDCan-20130515.p...
- https://youtu.be/KP_bKvXkoC4?t=732
Seems GPL was a problem for them.
EDIT: another source suggesting GPL avoidance was the primary reason for choosing FreeBSD over Linux: https://youtu.be/vcyQBup-Gto?t=2731 - and the presenter also says that the performance comparisons they have done between Linux and FreeBSD is not exactly fair because they did not do all the engineering work on Linux that they did on FreeBSD.
Is FreeBSD compelling and useful at this point beyond as an inferior but more liberally licensed Linux substitute? This is basically what Sony (after their PS2 woes), Nintendo and Netflix (as far as I'm aware; maybe there are technical reasons too) have been using it for. The last clearly competent company I can remember picking FreeBSD for some technical benefits was WhatsApp many many years ago, and as far as I am aware that decision would not make sense today anymore.