7 ms·
What about freebsd makes it a better choice as compared to Linux based systems?
by UnlockedSecrets 6y ago
What about freebsd makes it a better choice as compared to Linux based systems?
- naikrovek 6y agoHonestly, I don't know how the landscape looks today. At the time, FreeBSD could run Linux binaries faster than Linux could on the same exact hardware, for one. At Yahoo, we used FreeBSD on all of our servers and Linux on zero of our servers, and that probably changed over time. I don't know. It was just very stable. You could reboot without worry that a kernel update would break anything or prevent boot-up. It was almost a realtime OS considering how light it was. I don't think it actually qualifies as an RTOS but we knew exactly what performance we could get out of a particular server configuration, and if the performance ever deviated, we knew there was a problem. It was very deterministic in that way. Linux may be as good or better than FreeBSD now. I don't know. But 20 years ago, Linux getting all the attention saddened me a lot. At the time, if you wanted an open operating system, without any cruft clogging things up, FreeBSD was it.
- bluepoint 6y agoI confirm the fact that linux binaries were noticeably faster at least in 2000, when I was using it exclusively. Also I had a laptop with a broken memory module. Linux would panic unless I put it in the fridge (don’t ask me how this came about, but it helped), but freebsd was stable, apart from some crashing applications. And the kernel configuration was easy to read and understand.
- toast0 6y agoWhen I started in 2004, Yahoo used FreeBSD everywhere except for acquisitions (including Inktomi which was a large part of the host count, running Linux); when I left in 2011, it was more of a mix; there wasn't yet a mandate to migrate to Linux, but I suspect it was coming. The mandate at that time was more of support both. I went to another company that was using FreeBSD. They were three major versions ahead of what I had at Yahoo, and I didn't need to relearn very much, almost everything I knew still worked, but performance was improved.
- ksec 6y ago>there wasn't yet a mandate to migrate to Linux, but I suspect it was coming. I think it was Marissa Mayer that mandated the switch to Linux. Facebook also forced WhatsApp to switch to Linux after their acquisition.
- bch 6y agoAlso if firewalling/packet filtering was a consideration, ipfw was (is?) leaps and bounds nicer to work with than ipchains/iptables. This (c. FreeBSD 4.x) is what introduced me to FreeBSD.
- kstrauser 6y agoOpenBSD’s pf (which got ported to FreeBSD) and it’s pf.conf still sets the benchmark for the most beautifully readable firewall rules.
- dbolgheroni 6y agoThe FreeBSD pf is an (very) old version of what is available on OpenBSD.
- nix23 6y agoNo it's not, it's a fork.
- Lammy 6y agoThe config file syntax matches that of the old pre-4.5 OpenBSD pf but the code under the hood has seen much evolution. FreeBSD's pf is SMP-capable, for one thing, unlike OpenBSD's that "will only use one processor": http://www.openbsd.org/faq/pf/perf.html http://www.openbsd.org/faq/pf/perf.html
- paulmd 6y agoThis is all still true. FreeBSD is amazing as an operating system, everything is integrated nicely, everything just works, sure the userland isn't the same as GNU in some respects but you get used to it (and some of the GNU utilities are available if you want - like gtar). Coming from the experience of trying to build from source on Linux a decade ago ports is just an amazingly streamlined experience, it all really just works. I only run it on my fileserver but it's a really nice experience there. I don't have the experience to run it in production at work but it's really a nice setup.
- ladyanita22 6y agoAFAIK FreeBSD loses to Linux on benchmarks, so IDK why you are saying it runs Linux binaries faster than Linux itself.
- benttoothpaste 6y agoWell it can still be true that FreeBSD runs Linux binaries better than its own native binaries, though I don’t think this is the case.
- ladyanita22 6y agoWhat was stated is that BSD runs Linux binaries better than Linux, not better than BSD binaries. Anyway, I seriously doubt this is the case. Almost every single high performance computer runs on Linux. Most servers run Linux. I'd say except from Netflix, FAANGS run Linux almost exclusively for their servers. I have a hard time believing FreeBSD is better than linux in any meaningful way, more so given the humungous resources The Linux Foundation has.
- naikrovek 6y agoIn the early 2000s, Linux binaries did run faster on FreeBSD than on Linux on the exact same hardware, when using a stock FreeBSD install and a stock (but light) Linux install. I recall reading at the time that it was because FreeBSD's kernel simply had less overhead overall and consumed fewer resources in its work, making that bit of CPU available to running processes instead of consuming it itself. After using FreeBSD, the Linux kernel appeared very bloated and slow, at the time. And it was, as distributed by distro makers. So the comparison was fair, stock FreeBSD vs. stock Linux. If you want to argue that you could do better than stock FreeBSD with a custom Linux kernel, you'd be right, and if you allowed a fair comparison with a custom FreeBSD kernel, I think Linux would have again struggled to remain in the lead. All of that being said, this landscape may have changed entirely. The Linux kernel has come a long way. The FreeBSD kernel has come a long way. So where things are now is unknown to me. I will say that superior performance is not always the reason to choose an OS for high performance computing tasks. It is a sane decision to use an OS that has lower performance if it provides other benefits that are important to you.
- macksd 6y agoI'm a big fan of BSD and it's philosophy, but I think it's relative lack of adoption is now a vicious cycle and it's falling behind. It is better in some specialties, IMO: if I was setting up a NAS server, some serious firewalls, or traditional web servers, I would give BSDs a serious look first. The documentation is great, and there's a lot to be said for it's simpler, cleaner implementation. However, I think Linux is winning still. I need CUDA for work, and frequently use software that supports Mac, Windows, or Linux. So for my daily driver or other day to day usage (like cloud instances), I wish I could use BSD but I just don't see it as being a viable choice anymore.
- Lammy 6y agoRE: CUDA, I wouldn't say running a VM is an especially enjoyable solution, but the built-in hypervisor does have VT-d support https://wiki.freebsd.org/bhyve/pci_passthru https://wiki.freebsd.org/bhyve/pci_passthru
- macksd 6y agoPCI pass thru, eh? That's pretty cool. I'll hand it to the BSD community (the community is another thing I love about BSD btw - attended MeetBSD a few years ago and it was such a fun crowd) - they create some killer compatibility layers. Like in this thread, that simultaneously illustrates this, and also why I'm afraid to put it on my primary work machine: https://forums.freebsd.org/threads/would-it-be-possible-to-port-zoom-meeting-client-to-freebsd.76839/ https://forums.freebsd.org/threads/would-it-be-possible-to-p...
- ayyy 6y agoIt's on linux too. https://www.kernel.org/doc/html/latest/driver-api/vfio.html https://www.kernel.org/doc/html/latest/driver-api/vfio.html
- Lammy 6y agoAnd on Oracle's VirtualBox, which is available on both OSes: https://www.freshports.org/emulators/virtualbox-ose https://www.freshports.org/emulators/virtualbox-ose
- Lammy 6y agoIt is developed in a single source tree and released as a complete operating system, so the base-system utilities are all very well integrated with the OS and consistent with each other. The third-party software ecosystem is very flexible (especially with Poudriere) and does a very good job keeping those packages from interfering with the base system without also making them feel separate. It had containers before they were cool. A lot of configuration can be done in a very concise and consistent way, and the documentation is overall very thorough, for example: https://www.freebsd.org/cgi/man.cgi?query=rc.conf&sektion=5 https://www.freebsd.org/cgi/man.cgi?query=rc.conf&sektion=5 https://www.freebsd.org/cgi/man.cgi?query=tuning&sektion=7 https://www.freebsd.org/cgi/man.cgi?query=tuning&sektion=7
- mbreese 6y agoA few years ago, my answer for servers would have been ZFS. However, given that the FreeBSD and ZoL source trees are now the same, I don't think that's necessarily the case. ZFS is still more of a first-class citizen on FreeBSD than Linux, but the distinction is minor at this point. I think the fact that the most recent version of TrueNAS (the people behind FreeNAS) is Debian based as opposed to FreeBSD based, says a lot. I also migrated a couple of large FreeBSD fileservers that were using ZFS over to Linux because the clients were also Linux-based (HPC cluster). Specifically, I switched over to Linux for the file servers so I could use Gluster to combine namespaces for large file shares. The Gluster version that is supported by FreeBSD is a few versions old. I was sad to make the switch. I still like how "clean" the base FreeBSD install feels though. It is minimal with very little cruft. Things work simply and are easy to customize.
- qalmakka 6y agoFreeBSD feels definitely more thoughtfully designed and assembled, while often Linux distros look like a mishmash of packages. The base system is separated from the stuff you install, and handled separately, so, you can have a stable, well tested base, on top of which you can run whatever new code you want. Just switch to `latest` in pkg.conf and you get new packages, similar to what you get in Archlinux and the likes, without also moving the core of the system to bleeding edge software. Accomplishing the same with GNU/Linux is very difficult*; distributions such as Debian and Red Hat ship outrageously out of date packages even for non-essential stuff (i.e. incredibly old CMake, old Git, ...), while Arch Linux has a very recent Glibc and kernels, which not everyone might feel confident enough to use as their daily driver (I do and it's fine for me, but I've heard enough people not feeling too comfortable about it). As a bonus, recompililing stuff from source on FreeBSD is super simple thanks to ports, so you have that added flexibility. No Linux distro has AFAIK such a flexible approach of both source or binaries being available and easy to install**. * I think that a GNU/Linux that adopted the same approach as FreeBSD (i.e. base system + ports + pkg in /usr/local) would definitely find a space, but I think it takes way too much effort to build a new distro nowadays for this to become a reality. ** The closest to this I know is Gentoo (but it has no default repositories for binaries), which is nevertheless much more complicated in nature than FreeBSD's ports, and Archlinux, which has ASP but lacks an automated system to handle updating from source and installing dependencies (there was `srcpac`, but it's been dead for a very long time).
- brian_cunnie 6y ago> What about freebsd makes it a better choice as compared to Linux based systems I wouldn't say "better" (I don't know want a flame war); I'd say "different". I like FreeBSD, and use it for my firewall (I find `ipf` more intuitive than `iptables`). I also use it for my fileserver (FreeNAS/ZFS). I think containers (Docker) works better on Linux. Containers (namespaces & cgroups) are a Linux-thing.
- naikrovek 6y agoFreeBSD jails were long before Linux namespaces and cgroups and offered (I think) all the convenience of containers very early on. Namespaces and cgroups are an evolution and improvement over jails, probably, because of other Linux things that existed in Linux. I don't know the whole history on this so I could be very wrong.