Live data from Hacker News

Ask HN: Can we talk about FreeBSD vs. Linux?

news.ycombinator.com

111–120 of 221 posts

Re: Ask HN: Can we talk about FreeBSD vs. Linux?

#111
post #27

Like others have said, being unbiased is difficult, but I'll try. First, Linux v FreeBSD is really tough, so I will instead approach this from Debian v FreeBSD. I really like how easy Debian on the desktop is: install it, apt-get install xfce, and I have a nice desktop. It's very easy to add Adobe Flash, Steam, Skype, etc. The FreeBSD desktop isn't as nice. You can add things like Flash and Skype on FreeBSD, but you…

Do you think the choice to compare FreeBSD to a particular distro, Debian -- indicates that the difference between FreeBSD and Debian is about the same as between Debian and other distros? Is FreeBSD essentially just like another distr (even though it's actually a separate OS, it's similar enough?)

Re: Ask HN: Can we talk about FreeBSD vs. Linux?

#112
They are both free *nix, so they are very similar. BSD prefers the simpler versions of many of the common command line tools where the Linuxes prefer the GNU tools which tend to have more features. There will also be other small tech differences that will come into play in special cases, like ZFS being nice for fileservers.

Other than the basic tech there are 2 important differences. First is the that there is one FreeBSD but there are hundreds of distributions of Linux. And among them you'll find much larger differences than between FreeBSD and the popular Linux dists.

The other big difference is simply derived from the fact that Linux is more popular. It will tend to have better drivers, have more bugs worked out of the software, etc., just like any other free software out there. FreeBSDs conservative nature towards its core software more than mitigates this, but for all the peripheral software it will matter.

Re: Ask HN: Can we talk about FreeBSD vs. Linux?

#113
I arrived at this thread about 6 hours late and people have said most of what I would say; but I'll add that we would like to see more startups using FreeBSD (a preference which predates Koum's donation!) so if you've considered FreeBSD but found that it was lacking some functionality which your startup needed I'd love to hear from you.

Re: Ask HN: Can we talk about FreeBSD vs. Linux?

#114
post #27

Like others have said, being unbiased is difficult, but I'll try. First, Linux v FreeBSD is really tough, so I will instead approach this from Debian v FreeBSD. I really like how easy Debian on the desktop is: install it, apt-get install xfce, and I have a nice desktop. It's very easy to add Adobe Flash, Steam, Skype, etc. The FreeBSD desktop isn't as nice. You can add things like Flash and Skype on FreeBSD, but you…

This is OT, but since you seem to know a fair bit about filesystem types and their trades and have an opinion on sane patching behavior, I have a question you might be able to answer: Why aren't modern filesystems based on a content-addressable-store where the content is 100% separated from the organization of the filesystem itself? It seems to me like it would make more sense to have only one copy of a file ever sav…

I'm not an FS expert and others have answered your question much better, but I don't want you think I am ignoring you, so I'll talk about this part instead:

> the filesystem could offer an abstraction over a patch and pointer to the original file

I've implemented a delta-based patching system before: the idea is that, given two binary buffers (ostensibly files), encode the differences between them. I have no idea how Xdelta (VCDIFF-based) and bsdiff manage to do this at reasonable speeds (their code is too much for me to understand), but the best I could manage for this was O(n^2). It's a very complicated and difficult thing to do efficiently. But indeed it can result in massive file space savings. You could cheat a bit by intercepting fwrite commands, but that won't catch insertions or deletions. Nor programs that overwrite files instead of updating them in-place (eg most of them.) As you can guess, to really make something like this efficient would require program authors to rethink how they write to files, which is unlikely to ever gain traction.

What I'd really like to see, but know that we'll never get thanks to xkcd.com/927, is a metadata system for files that is portable. Instead of relying on file extensions or unreliable magic byte header detection, you'd have the MIME type included in this metadata. Along with the displayed file name that can have any characters in them (sans maybe the path separator), the file attributes (read/write/exec/user/group/owner/hidden), creation+modification+access times, etc. And then when you'd send a file through your e-mail client or FTP it up to some web server, it'd copy over the metadata along with it. So when you moved your file from extfs over to NTFS, and then copied that over to ZFS, you wouldn't lose all of that metadata.

But good luck getting all file system authors and browser vendors to agree to a common format to transparently wrap files with.

Re: Ask HN: Can we talk about FreeBSD vs. Linux?

#115
post #97

Earlier quoted context omitted.

This is OT, but since you seem to know a fair bit about filesystem types and their trades and have an opinion on sane patching behavior, I have a question you might be able to answer: Why aren't modern filesystems based on a content-addressable-store where the content is 100% separated from the organization of the filesystem itself? It seems to me like it would make more sense to have only one copy of a file ever sav…

That's called copy-on-write (CoW) and is supported by a few modern filesystems (including ZFS). In fact ZFS does do some very basic deduping in the way you suggest (ie you copy a file instead of move it, and ZFS will just issue a pointer). However full deduplication could never be free simply because of the overhead of keeping a table of all the duplicated data and scanning new content for duplications.

And ZFS deduplication consumes an absolutely frightening amount of RAM: 5GB of RAM per 1TB of storage is recommended.

Re: Ask HN: Can we talk about FreeBSD vs. Linux?

#116
post #27

Like others have said, being unbiased is difficult, but I'll try. First, Linux v FreeBSD is really tough, so I will instead approach this from Debian v FreeBSD. I really like how easy Debian on the desktop is: install it, apt-get install xfce, and I have a nice desktop. It's very easy to add Adobe Flash, Steam, Skype, etc. The FreeBSD desktop isn't as nice. You can add things like Flash and Skype on FreeBSD, but you…

Do you think the choice to compare FreeBSD to a particular distro, Debian -- indicates that the difference between FreeBSD and Debian is about the same as between Debian and other distros? Is FreeBSD essentially just like another distr (even though it's actually a separate OS, it's similar enough?)

FreeBSD is a concrete project in the same way Debian is.

Comparing a full system like FreeBSD to a kernel like Linux doesn't really get us anywhere. You can't really talk about the desktop experience comparisons when Linux can't even boot without a userland. If you tried to do it in an abstract sense, you'd be guaranteed to get responses of, "yes but Mouse Rat Linux supports ZFS and is also run by an elected core team!"; since there's pretty much a Linux distro for everything imaginable.

Re: Ask HN: Can we talk about FreeBSD vs. Linux?

#117
This is a brief (probably incomplete) summary of my understanding (many points also supported by the essays in your included link):

---

Philosophy:

FreeBSD has the concept of a base system: a set of tools intended to work together harmoniously, maintained by a core group of people. You can easily find evidence of this by looking at the source code; the userspace tools sit right next to the kernel[0]. This is in contrast to _GNU_/Linux, where everything (including coreutils) is pulled in from various sources. Many Linux distributions emulate a base system by including utilities that transform the kernel into a complete standard system (e.g. Debian[1]).

[0]: https://github.com/freebsd/freebsd/tree/master/usr.bin

[1]: https://www.debian.org/doc/debian-policy/ch-binary.html#s3.7

---

Leadership:

Linux has a benevolent dictator who decides project direction[0], while FreeBSD has a core group of contributers who decide the future of the project. However, I'm not sure that the Cathedral vs. Bazaar is a fair comparison to impose on these projects[1]. In any case, both projects seem to have been getting things done, and unfortunately (or maybe fortunately), I'm not too savvy on internal managerial disputes or issues.

[0]: http://www.softpanorama.org/People/Torvalds/index.shtml

[1]: https://www.freebsd.org/advocacy/myths.html#closed-model

---

Package Management:

The closest Linux distribution to FreeBSD is most likely Gentoo Linux, as its Portage system is very heavily inspired by the FreeBSD Ports system, in which all "packages" are simply recipes to build from source. You can even run the Gentoo project on a BSD kernel[0], although this sickens most FreeBSD users for some reason. Most other Linux distributions default to installing binary packages, which is also possible, but not traditional in FreeBSD[1].

[0]: http://en.wikipedia.org/wiki/Gentoo/Alt#Gentoo.2FFreeBSD

[1]: https://www.freebsd.org/doc/handbook/pkgng-intro.html

---

Process Management:

Linux has recently added LXC, while FreeBSD has had Jails for a while now[0]. LXC is much better marketed than BSD Jails through Docker, but Absolute FreeBSD has an excellent section that describes how to do isolated deployments via Jails[1]. FreeBSD also has the Linuxulator[2] that emulates 32-bit Linux system calls via FreeBSD system calls, allowing users to seamlessly run Linux binaries on FreeBSD. The FreeBSD startup system, however, has stayed more or less the same for the past few decades, revolving around an rc.conf file and init scripts. Linux has seen many more efforts in this area, including systemd and initramfs.

[0]: https://www.freebsd.org/doc/handbook/jails.html

[1]: http://www.amazon.com/Absolute-FreeBSD-Complete-Guide-Editio...

[2]: https://www.freebsd.org/doc/handbook/linuxemu.html

---

Licensing:

BSD projects use a BSD license, which many businesses prefer over the GNU license used by Linux. However, this is a discussion that deserves more than a small summary.

---

Misc:

Linux is most likely to support recent hardware because of extensive userbase and industry support. For example, NVidia's latest CUDA SDKs always have Linux bindings, but not BSD ones.

The BSDs have great reputations for killer implementations of TCP/IP.

The BSDs have been using the GEOM[0] disk management system for a long time, which is one of my personal favorites in terms of features. It allows you to treat character and block devices as pipes, so for example, adding encryption is simply "piping" a bare disk through an encryption layer, resulting in a new device. You can even "pipe" things across the network. Linux is somewhat caught up via device-mapper, so this is not a huge deal if you're trying to choose which one to use. Both are great operating systems. Just use whatever works.

[0] https://www.freebsd.org/doc/handbook/geom.html

It's likely that you know things that I don't, so please feel free to correct me if I'm wrong.

Re: Ask HN: Can we talk about FreeBSD vs. Linux?

#118
post #27

Like others have said, being unbiased is difficult, but I'll try. First, Linux v FreeBSD is really tough, so I will instead approach this from Debian v FreeBSD. I really like how easy Debian on the desktop is: install it, apt-get install xfce, and I have a nice desktop. It's very easy to add Adobe Flash, Steam, Skype, etc. The FreeBSD desktop isn't as nice. You can add things like Flash and Skype on FreeBSD, but you…

This is OT, but since you seem to know a fair bit about filesystem types and their trades and have an opinion on sane patching behavior, I have a question you might be able to answer: Why aren't modern filesystems based on a content-addressable-store where the content is 100% separated from the organization of the filesystem itself? It seems to me like it would make more sense to have only one copy of a file ever sav…

Thanks for everyone's answers. I now have a bunch of reading/learning for the weekend.

Re: Ask HN: Can we talk about FreeBSD vs. Linux?

#119
post #115
post #97

Earlier quoted context omitted.

That's called copy-on-write (CoW) and is supported by a few modern filesystems (including ZFS). In fact ZFS does do some very basic deduping in the way you suggest (ie you copy a file instead of move it, and ZFS will just issue a pointer). However full deduplication could never be free simply because of the overhead of keeping a table of all the duplicated data and scanning new content for duplications.

And ZFS deduplication consumes an absolutely frightening amount of RAM: 5GB of RAM per 1TB of storage is recommended.

Oh totally. ZFS gets a lot right but even ZFS can't make deduplication practical for all bar a few fringe cases.

Re: Ask HN: Can we talk about FreeBSD vs. Linux?

#120

For those of us that are more interested in FreeBSD due to the whole Systemd 'controversy', look at the other HN link about the 'FreeBSD: the next 10 years' presentation. They clearly state that FreeBSD is in the same position and it seems that they are not hostile towards the concept of Systemd. Personally I hope that FreeBSD will choose a solution that does not involve QR codes (not mandatory).

There isn't anything wrong with the systemd concept. However, what many of the people I've discussed this have an issue with are: * Becoming the default init in stable even though it's fairly new (and untested) * Strong break from how common tasks are done (e.g. logging) * Applications are very tied together and cannot easily be replaced or left out. * NIH syndrome (e.g. their DNS resolver that just had a major cachi…

There is plenty wrong with the systemd concept.

Apart from your own list of things wrong with it, it is also monolithic, which goes directly against the Unix Philosophy,[1] which when concisely expressed is:

  Write programs that do one thing and do it well.
  Write programs to work together.
  Write programs to handle text streams,
  because that is a universal interface.
Systemd is an application that more properly belongs on Microsoft Windows and MacOS, because of their own tendency towards centralization and control. But I'm not surprised that many popular Linux distros have chosen to adopt systemd, as they suffer from a bad case of Windows and Apple envy.

[1] - https://en.wikipedia.org/wiki/Unix_philosophy

Post reply on HN