Live data from Hacker News

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

news.ycombinator.com

201–210 of 221 posts

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

#201
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.

Copy-on-write is not the same thing as content-addressable. ZFS has deduplication as an optional feature, which is implemented as a content-addressable store of filesystem blocks. In contrast to e.g. git the content-addressable aspect is an implementation detail that is not exposed to users. http://blogs.sun.com/bonwick/entry/zfs_dedup

> Copy-on-write is not the same thing as content-addressable.

I know that. But CoW does cover a few points raised by the previous poster.

> ZFS has deduplication as an optional feature, which is implemented as a content-addressable store of filesystem blocks. In contrast to e.g. git the content-addressable aspect is an implementation detail that is not exposed to users.

I know what dedup is and how ZFS utilises it (I've been running ZFS for about 8 years now - I'm quite familiar with it).

If you read my post again, you'll see I was discussing two separate points: 1) that CoW file systems do provide the pointer-like methods the former commenter raised. And 2) deduping isn't free.

What you're arguing with me is semantics and if you read the former post again, you'll understand why I chose the language I chose.

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

#202
post #124
post #93

Earlier quoted context omitted.

Zfs, to take one example, does do approximately what you want - the file system (or rather, the underlying block storage) has a tree structure, and changes to files are propagated via copy-on-write rewrites up the tree, so that earlier snapshots still get to see the original file. This does make rolling things back trivial. It doesn't give you dedupe for free, though. Think about what would have to happen: every modi…

I haven't used freebsd for 5-6 years, so I've never tried to use it with root on ZFS. Wondering if it suffers the same problems as btrfs when used as root: last time I tried that on Ubuntu, the fsync() performance made a lot of stuff just horribly slow (e.g: dpkg operations two orders of magnitude slower).

I run FreeBSD with ZFS as root and it doesn't suffer from those issues. But then ZFS is quite significantly more mature than Btrfs anyway.

It's also worth noting that ZFS has been available as a root file system long before FreeBSD added ZFS to RELEASE. I remember running OpenSolaris (and some of it's forks, eg Nexenta) with ZFS root about 6 years ago. Possibly longer actually.

The issue with ZFS as root was more of a problem with the boot menu than the OS. OpenSolaris used GRUB where as FreeBSD obviously doesn't, so FreeBSD needs to either port their ZFS drivers to their bootloader, or employ a hacky method of having a UFS boot volume that then points to a ZFS root partition (which, sadly, is how FreeBSD currently works).

Interestingly, since GRUB is GPL, it meant that technically there were GPL ZFS drivers even before Btrfs started life (never mind the various Linux ports of CDDL-licenced ZFS drivers that have appeared since). Albeit those GPL ZFS drivers were read only

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

#203
post #177

Earlier quoted context omitted.

Just don't change root's shell to something like bash. BAD THINGS WILL HAPPEN.

Care to elaborate? Does FreeBSD make assumptions about the root user's shell that Linux doesn't?

Say there's a failure that forces you to bail into an emergency session where you can't mount /usr/local (which is where bash is typically installed on FreeBSD). All of a sudden, you don't have a shell.

This is a really bad place to be.

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

#204
post #126

Earlier quoted context omitted.

One of the few feature btrs has which ZFS hasn't.

At this point, I don't think it's fair to imply that btrfs is lagging behind ZFS. Yes, there are quite a few things that ZFS does better than btrfs, but btrfs isn't following in ZFS's footsteps and has some killer features that ZFS will never have, like on-the-fly changing between RAID modes and resizing arrays in either direction.

Btrfs has a broken by design on disk format. Btrfs went with self describing checksums inside blocks instead of a Merkle-DAG with a round robin root. In doing so they ignored existing research at the start of the btrfs project and the only fix is to change the on disk format to add the children's checkums to the parent nodes.

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

#205
post #204

Earlier quoted context omitted.

At this point, I don't think it's fair to imply that btrfs is lagging behind ZFS. Yes, there are quite a few things that ZFS does better than btrfs, but btrfs isn't following in ZFS's footsteps and has some killer features that ZFS will never have, like on-the-fly changing between RAID modes and resizing arrays in either direction.

Btrfs has a broken by design on disk format. Btrfs went with self describing checksums inside blocks instead of a Merkle-DAG with a round robin root. In doing so they ignored existing research at the start of the btrfs project and the only fix is to change the on disk format to add the children's checkums to the parent nodes.

That doesn't sound "broken by design" to me, just less thoroughly safeguarded than ZFS but still more than almost any other filesystem. It's completely consistent with my claim that btrfs isn't trying to follow exactly in the footsteps of ZFS. (And it's not like Merkle trees don't have any tradeoffs.)

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

#206
https://www.freebsd.org/doc/en_US.ISO8859-1/articles/linux-c...

http://www.onlamp.com/pub/a/bsd/2004/11/11/FreeBSD_Basics.ht...

http://www.onlamp.com/pub/a/bsd/2005/01/13/FreeBSD_Basics.ht...

http://www.pl.freebsd.org/doc/en/articles/explaining-bsd/art...

https://www.youtube.com/watch?v=y1puNK0xuhw

http://www.freebsdnews.net/

http://www.bsdnow.tv/

https://www.pfsense.org/getting-started/#overview

http://bsdtalk.blogspot.in/

http://www.openbsd.org/security.html

https://www.linkedin.com/pulse/article/20141028100615-571779...

http://www.embeddedarm.com/software/arm-netbsd-toaster.php

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

#208
https://www.freebsd.org/doc/en_US.ISO8859-1/articles/linux-c...

http://www.onlamp.com/pub/a/bsd/2004/11/11/FreeBSD_Basics.ht...

http://www.onlamp.com/pub/a/bsd/2005/01/13/FreeBSD_Basics.ht...

http://www.pl.freebsd.org/doc/en/articles/explaining-bsd/art...

https://www.youtube.com/watch?v=y1puNK0xuhw

http://www.freebsdnews.net/

http://www.bsdnow.tv/

https://www.pfsense.org/getting-started/#overview

http://bsdtalk.blogspot.in/

http://www.openbsd.org/security.html

https://www.linkedin.com/pulse/article/20141028100615-571779...

http://www.embeddedarm.com/software/arm-netbsd-toaster.php

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

#209
post #124

Earlier quoted context omitted.

I haven't used freebsd for 5-6 years, so I've never tried to use it with root on ZFS. Wondering if it suffers the same problems as btrfs when used as root: last time I tried that on Ubuntu, the fsync() performance made a lot of stuff just horribly slow (e.g: dpkg operations two orders of magnitude slower).

I run FreeBSD with ZFS as root and it doesn't suffer from those issues. But then ZFS is quite significantly more mature than Btrfs anyway. It's also worth noting that ZFS has been available as a root file system long before FreeBSD added ZFS to RELEASE. I remember running OpenSolaris (and some of it's forks, eg Nexenta) with ZFS root about 6 years ago. Possibly longer actually. The issue with ZFS as root was more of…

> FreeBSD needs to either port their ZFS drivers to their bootloader, or employ a hacky method of having a UFS boot volume that then points to a ZFS root partition (which, sadly, is how FreeBSD currently works).

A ZFS-aware loader hit CURRENT in late 2008, and a dedicated zfsloader for use from (gpt)zfsboot hit the stable branches in late 2009.

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

#210
post #209

Earlier quoted context omitted.

I run FreeBSD with ZFS as root and it doesn't suffer from those issues. But then ZFS is quite significantly more mature than Btrfs anyway. It's also worth noting that ZFS has been available as a root file system long before FreeBSD added ZFS to RELEASE. I remember running OpenSolaris (and some of it's forks, eg Nexenta) with ZFS root about 6 years ago. Possibly longer actually. The issue with ZFS as root was more of…

> FreeBSD needs to either port their ZFS drivers to their bootloader, or employ a hacky method of having a UFS boot volume that then points to a ZFS root partition (which, sadly, is how FreeBSD currently works). A ZFS-aware loader hit CURRENT in late 2008, and a dedicated zfsloader for use from (gpt)zfsboot hit the stable branches in late 2009.

AFAIK it's not in RELEASE yet though.
Post reply on HN