10 ms·
Deep Diving into the Strengths of FreeBSD
- hnlmorg 5y agoIf one is in doubt of FreeBSD then I don't think this is the most compelling article on the topic. However I do strongly recommend FreeBSD to anyone curious as to what an "alternative Linux" (for want a better description) might look like. By this I mean FreeBSD is one one of the most accessible UNIXes out there (ignoring Darwin for a moment) and it supports a fair amount of GNU-isms that long time Linux users would have become accustomed too. For me, native ZFS support is FreeBSD's killer feature. It's had containerisation (called "jails") long before Linux knew it was a thing and combining those jails with ZFS gave you several of convenience features that VMs and/or Docker offered but 10+ years ago before Docker was a thing. And yes, I know some Linux distributions support ZFS in an official capacity but having used them and FreeBSD, ZFS support on FreeBSD is easily light years ahead of Linux. It's hard to substantiate why other than saying all of those minor niggles you have with Linux+ZFS simply doesn't exist with FreeBSD+ZFS. On FreeBSD, using ZFS feels as native as using the ext4 on Linux. It's a great shame that the industry has monopolised on Linux because FreeBSD brought, and continues to bring, a lot to the table.
- enriquto 5y ago> native ZFS support is FreeBSD's killer feature Why? I never cared about my filesystem. Does it make a difference what filesystem am I using?
- nix23 5y agoSince you don't know ZFS...you should educate yourself on that one especially as a c system dev (bectl).
- enriquto 5y agoYes, I agree, and sorry for the ignorant question. Yet a lone "educate yourself" may be a bit harsh on a site where informal technical conversation happens. Care to share a couple of "killer" features of ZFS for somebody who has never cared about the FS their files are stored in?
- nix23 5y agoToo much to write and too many features, that's what i meant with educate yourself: https://en.wikipedia.org/wiki/ZFS https://en.wikipedia.org/wiki/ZFS
- srer 5y agoI can't speak for your computing experience, but for mine: There are significant differences in performance, admittedly SSDs temper these differences but there are plenty of systems with large HDDs. This isn't an abstract performance benchmark thing, I feel it when doing operations on large numbers of small files. There are significant differences in features that impact how you use the system. For instance, sometimes I like to backup a directory I'm working in (typically before some funky git operation), normally that can be done with cp or tar, but that's slow. Much faster is a manual filesystem(/volume manager) snapshot. But I have to remember to do that. Much more convenient would be if I didn't have to explicitly create a snapshot, which HAMMER would offer me. All non-temporary HAMMER filesystems in DragonFly by default automatically maintain 60 days worth of 1-day snapshots and 1-day worth of fine-grained (30-second) snapshots. - https://www.dragonflybsd.org/features/#index3h2 https://www.dragonflybsd.org/features/#index3h2
- bluGill 5y agoDepends. In a perfect world it doesn't matter. However in this imperfect world it is nice to know that there is an automatic backup of your files from a few days ago, and if a hard drive crashes you just replace it (requires paying for redundant hard drives!). The ability to add more space to an existing filesystem is nice just in case. There are a lot of other features that might or might not matter to you. If the above don't it is because you haven't been burned yet in life. (Or you use one of several other filesystems that support those features)
- sirn 5y agoI hosted my coding environment on a VPS running FreeBSD and happen to jump between VPS provider quite a bit due to location and pricing. My migration method was simply: $ zfs snapshot zroot/home@migrate $ zfs send -R zroot/home@migrate | ssh newhost zfs recv zroot/home ZFS automatic snapshots (via zfstools[1]) can also saved hours of headaches trying to recover an older version of a file. Since snapshot appears as a regular mount (ZFS even automatically expose them under /path/to/mount/.zfs/snapshot), all existing tooling just works (cp, cat, running diff against snapshot, etc.). My Linux machine these days also runs ZFS, but the level of integration with the system is still far from that of FreeBSD's. That can range from something as simple as ZFS ARC stats in top, to native support for ZFS Boot Environment allowing the system to boot directly from snapshots or do an offline upgrade of a clone of a live system[2]. (On Linux side of things there's zfsbootmenu[3] which provides something similar but the project is still quite new.) The filesystem may not matter that much, and I'm sure many these features can be replicated with LVM, but having a unified tooling and community around it really makes quite a difference in quality of life as an end-user. [1]: https://github.com/bdrewery/zfstools https://github.com/bdrewery/zfstools [2]: https://vermaden.wordpress.com/2021/02/23/upgrade-freebsd-with-zfs-boot-environments/ https://vermaden.wordpress.com/2021/02/23/upgrade-freebsd-wi... [3]: https://zfsbootmenu.org/ https://zfsbootmenu.org/
- danuker 5y agoDo you use Linux as a daily driver?
- sirn 5y agoI used Linux as a daily driver until the end of 2020 (Void Linux + ZFS + ZBM), but now running M1 Mac as a primary machine. I'm still using Linux regularly though (gaming via Proton, which is why I'm not running FreeBSD on a desktop yet).
- Rompect 5y agoHow do ZFS snapshots compare to LVM snapshots? Question not specifically for, but anyone who might know something about this.
- gigatexal 5y agoIt sure does. Compression and encryption and snapshotting and bit rot protection all native to the file system and the tools around it instead of having to cobble together lvm and mdraid and such. Snapshotting imo is one of the best things. Copy on write file systems really are awesome. And FreeBSD adopting ZFS so early was a huge win imo.
- bashinator 5y agoShort answer - automatically cache frequently-accessed files on expensive but small NVMe drives while using bigger cheaper slower drives for mass storage.
- nix23 5y agoI am absolutely with you, FreeBSD is great! >It's a great shame that the industry has monopolised on Linux because FreeBSD brought No sure about that, i think it better the way it is, Linux (the ecosystem) is such a bloatware because it implements every single feature the Industry needs, then having userlandtools like toolbox, busybox or Gnu, 3 different libC's, 5 different MAC-Framework, around 50 different local filesystems (but just 3-4 are stable enough for daily use)....and so on.
- e3bc54b2 5y agoIf FreeBSD were as popular as Linux, it would have same problem. We don't even need hypotheticals, how many proprietor Unices were there before Linux? Forget history, how many libre Unices are there now? Off the top of my head I can count Free/Net/Open/Dragonfly BSD and may be missing one or two. Only difference is Linux provides a-la-carte experience, while BSDs provide the bundled options. But zoomed out, none bloat doesn't appear to me as an issue in choice/decision making department.
- nix23 5y ago>If FreeBSD were as popular as Linux, it would have same problem. That's what i meant. >Forget history, how many libre Unices are there now? I fail to understand what you wanna say.
- zfsthroway1 5y agoThe FreeBSD project doesn't have the manpower to maintain ZFS. So FreeBSD is now relying on zfsonlinux.org, the Linux port of ZFS. In general, FreeBSD is increasingly having to rely on ports of Linux things, or emulating Linux things, because without enough volunteers or paid professionals to write native BSD solutions that is the only way to stay in the game. (Linus, too, complains of lack of maintainers for Linux.) EDIT: Adding reference: "FreeBSD moving to ZFS-on-Linux" https://forums.freebsd.org/threads/freebsd-moving-to-zfs-on-linux.68803/ https://forums.freebsd.org/threads/freebsd-moving-to-zfs-on-...
- nix23 5y agoThat's BS and you know it, it's OpenZFS and the code from zfsonlinux was brought in, why the hell should someone do work on a Filesystem but just for one OS?
- zfsthroway1 5y agoFreeBSD.org forums: "FreeBSD moving to ZFS-on-Linux" https://forums.freebsd.org/threads/freebsd-moving-to-zfs-on-linux.68803/ https://forums.freebsd.org/threads/freebsd-moving-to-zfs-on-...
- nix23 5y agoThey took the zfsonlinux-code into OpenZFS, so OpenZFS is based on the zfsonLinux features and NOT the illumos (solaris) one: https://openzfs.org/wiki/Main_Page https://openzfs.org/wiki/Main_Page >The OpenZFS project brings together developers from the Linux, FreeBSD, illumos, MacOS, and Windows platforms. OpenZFS is supported by a wide range of companies.
- mappu 5y agoFilesystem implementations are normally OS-specific because each kernel has different infrastructure for filesystems. e.g. Linux has the unified page cache, dentry cache etc, and ZFS just ignores all that and ships its own ARC and dnode caches, that then have to compete for shared system resources.
- zfsthroway1 5y agoBtrfs is used on millions of production servers (Facebook...) and can essentially solve the same storage problems that ZFS was designed to solve, using similar principles (CoW...). Btrfs deservedly got a bad wrap for many years because it had unacceptable bugs, but they seem to have finally quieted. SUSE ships and supports Btrfs for its enterprise Linux, and even Red Hat made it the default fs for Fedora. Also, Oracle can't sue you for using Btrfs, whereas Oracle has refused to have a lawyer send Linus a letter saying Oracle won't sue people for using ZFS on Linux, despite Linus' request to Oracle for such a letter saying its OK.
- minimaul 5y agobtrfs is used by orgs like facebook in a very limited way, and afaik not for big multi-disk storage pools with raid-style devices like ZFS is generally used. btrfs is still very rough for things like raid5/6 (where you want to prioritise available capacity), and unfortunately there are lots of reports of recent corruption (even on single disk FSes) every time we have a thread about it on HN. I'm one of those people with recent experience of corruption with btrfs + compression. ZFS isn't flawless, and the license situation means distribution is more awkward on Linux - except for Ubuntu, who have a different view to other distros on what is allowed with it legally. This means that root on ZFS is a real pain on many distros, and possibly not something you should really do, but ZFS has really solid multi-disk pool support & working + battletested support for things like RAIDZ. But this isn't linux, this is FreeBSD. The license issues with CDDL & GPL don't apply here, so FreeBSD has native ZFS support. It works well (especially in 13, where it's up to date with the main OSS OpenZFS work), and the installer will quite happily assist you with root on ZFS.
- arp242 5y agoI'm surprised to learn that btrfs still has corruption issues, even for simple cases. It's been in development for 12 years already; I wonder what the factors behind this are?
- minimaul 5y agoIt's disappointing :( I'd love to use btrfs on root on linux, and I try it on my home server and VMs reasonably often (and this is a xeon + ECC etc, and when I use ZFS/xfs/ext4 I don't get FS issues). I keep finding it's often still fragile unfortunately (and snapshotting is still painful compared to ZFS!).
- temptemptemp111 5y agoI disagree. ZFS is great on Linux. The killer feature of FBSD is its simplicity and lack of incoherence in focus, which all the Linux distros suffer from. People don't see to be able to differentiate between these issues: Linux distributions' diversity of features and options is not a problem - it is the lack of focus & coherency of their management. This makes it harder to help other people on the same distro, to collaborate about bugs on the same distro, etc... Then you read an OBSD/FBSD thread from developers who aren't really better than developers on Linux threads - and you see much more coherency; because of the coherency in the systems they're working on.
- jjt-yn_t 5y agoIf I was younger I'd educate myself on ZFS and add to the zfs acclaim top post. Howsoever, for the average user UFS2 paired with adequate backups seems to be a, if not the, holy grail of home-usage ease and reliability, per my experience, 16 plus years so far.
- eb0la 5y ago{Free/Net/Open}BSD DOCUMENTATION Rocks! Not just the online documentation, but there are really good offline (books) documenting the BSD stack. Back in 1998 I chosed BSD (openBSD) for my thesis just because there was _a lot_ of reliable information about internals, how to develop, etc. For Linux the documentation wasn't as good, and had to search too much online for internals, also and it was a moving target and I was afraid of working on top of something that might change while I was working on my project. Now you can get a lot of information about linux just googling; but if you're offline you can get great *BSD documentation.
- Dowwie 5y agoMarshall McKusick produced a 10-hour video course for LiveLessons in 2015: https://www.oreilly.com/library/view/introduction-to-the/9780134306049/ https://www.oreilly.com/library/view/introduction-to-the/978...
- eb0la 5y agoThanks for the link :-) My first Unix book was from McKusick ( https://openlibrary.org/books/OL7407817M/The_Design_and_Implementation_of_the_4.4_BSD_Operating_System_%28Unix_and_Open_Systems_Series.%29 https://openlibrary.org/books/OL7407817M/The_Design_and_Impl... ). I bouth it after some years playing with wirh DEC OSF1, SunOS, Linux, and Irix :-)
- DyslexicAtheist 5y agoimo Linux is suffering from its won success. the Linux community grew so big that it had no choice than allow certain actors to hi-jack and divide its members: E.g. Poettering (pid_eins) would have never been able to force their ideas onto the BSD community as he was able to do in Linux. While it's great to have friction in order to continuously question the status quo it has huge downsides when you need to focus on the long-term goals and ensure consistency across the stack. (echoes from mythical man month or too many chefs in the kitchen spoiling the broth etc). Linus has done a good job for as long as he could (and still does) but there are limits to what one can achieve as things grow. Theo de Raadt seems a very similar character (like Poettering and Linus strongly opinionated which isn't a flaw but job-requirement). Theo had an easier time ensuring continuity & consistency because there aren't 25 distributions of OpenBSD under 1 "OpenBSD Foundation" umbrella. The problem was that Poettering (who despite my dislike for how he treats anyone who questions his approach, I still think is a genius) didn't create his own OS from scratch (perhaps something based on his own distro, or genode or whatevs) but hi-jacked Linux for his purpose. Then there is the problem with Docker/isolation that, as others above have pointed out, is not new in the BSD world and is actually a poor product that constantly breaks things on every update. The BSD world would have laughed docker out of the door and down the street yet on Linux we pretend it's "genius" and we accept it comes not from the community but some outside vendor with terrible record in its own security posture. Pipe shit straight to | sudo bash was the docker way for a long time until they got called out for it and then pretended it never happened. But you can still see their incompetence also in other places such as dockerhub which remains the petri dish of choice for malware, or their latest stunt of forcing people to upgrade. Compared to BSD's, in Linux we practice a lot of "hype driven software engineering" and the result is abstraction hell, and insecurity. This is visible especially if you just compare apples with apples, e.g. a Linux vs BSD on a server (ignoring all aspects where BSD's are hardly present but Linux is). Poettering has also pushed for unifying isolation options within systemd to help orchestrate the mess, but it still feels like a lot of duct tape when comparing how all of this is done in BSD. there are many other topics like eBPF, and how much we're now able to move into the kernel for performance / observability etc ... but I'll stop. The Linux Standards Base (LSB) perhaps lacked teeth and never fulfilled the potential it could have, but a democracy (or federation of interests) is harder.
- stevekemp 5y agoI know it has become fashionable to have "Deep dive on xxx", but this was a very shallow piece that was not at all the expected deep dive.
- vermaden 5y agoMore in depth list of unique FreeBSD features: https://vermaden.wordpress.com/2020/09/07/quare-freebsd/ https://vermaden.wordpress.com/2020/09/07/quare-freebsd/
- soapdog 5y agoI appreciate what the authors attempted to do in that article, but in my own personal and deeply subjective opinion what they described are not FreeBSD primary strengths. Many features there are not only common to other BSDs but also to Linuxes. I think that a better approach would be talking about project cohesiveness — which is something that BSDs do better than Linuxes — and jails, which can still do a ton of clever stuff.
- bluedino 5y agoThis is just marketing spam.
- jart 5y agoOne of the things I like about FreeBSD is it has better rusage accounting than Linux. For example, FreeBSD and NetBSD actually fill in the following fields when you call wait4() on a process. int64_t ru_ixrss; /* shared memory size (integral kb CLK_TCK) */ int64_t ru_idrss; /* unshared data size (integral kb CLK_TCK) */ int64_t ru_isrss; /* unshared stack size (integral kb CLK_TCK) */ int64_t ru_inblock; /* block input operations */ int64_t ru_oublock; /* block output operations */ int64_t ru_nsignals; /* signals received */ int64_t ru_msgsnd; /* IPC messages sent */ int64_t ru_msgrcv; /* IPC messages received */ Linux doesn't give you that information. Since FreeBSD does, it's easier to do something like write a reliable network server that monitors worker behavior.
- cpach 5y agoDoes anyone know anything about Klara Systems? I’ve seen their advertising pop up here and there but I don’t really know what they do.
- thijsvandien 5y agoFor me, the major strength of (Free)BSD is that it's so well organized at every level. The project, the documentation, the OS. A coherent whole with the right amount of conservatism. No change for the sake of change, while actual progress is made in very a gradual fashion. Never do I worry whether an update will break by system, or render previously gained knowledge useless. In each and every way, it is exactly what I want from a server OS. Unfortunately, getting much less attention than Linux has implications for funding. We're almost half way through the year and haven't reached 10% of the not overly ambitious annual target: https://freebsdfoundation.org/donate/ https://freebsdfoundation.org/donate/.