News for hackers. Stuff that matters.
Re:Initial Hammer2 filesystem implementation by jitl on Monday August 21, 2017 @07:51PM (#15068732)
Very exciting to see implementation progress on HAMMER2. Some basics about the design:

- This is DragonflyBSD's next-gen filesystem.

- copy-on-write, implying snapshots and such, like ZFS, but snapshots are writable.

- compression and de-duplication, like ZFS

- a clustering system

- extra care to reduce RAM needs, in contrast to ZFS

- extra care to allow pre-allocation of files by writing zeros, something that will make SQL databases easier to run performantly on HAMMER2 than on ZFS

And much more. The design doc is an interesting read, take a look:

https://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEA...

Re:Initial Hammer2 filesystem implementation by chongli on Monday August 21, 2017 @09:07PM (#15068983)
snapshots are writable

Isn't that an oxymoron? I thought the entire point of a snapshot was that it's an immutable record of the filesystem at a moment in time.

extra care to reduce RAM needs, in contrast to ZFS

ZFS utilizes a lot of RAM for caching. That's not the same thing as needing a lot of RAM. I've seen this same complaint about modern operating systems. People will buy a lot of RAM and then get annoyed when they see the OS making use of it. As long as the memory is available to be allocated to applications, why should we care whether or not the operating system makes use of it?

Re:Initial Hammer2 filesystem implementation by tedunangst on Monday August 21, 2017 @09:12PM (#15069006)
Is it better if we call a snapshot a branch point?

I believe the complaint about ZFS and RAM is that the caching cannot be considered optional. Performance is substantially worse than other filesystems with more modestly sized caches, so the memory isn't really available to applications.

Re:Initial Hammer2 filesystem implementation by binarycrusader on Tuesday August 22, 2017 @12:04AM (#15069611)
The caching can be considered optional and (in Oracle Solaris) there is a tunable user_reserve_hint_pct:

https://docs.oracle.com/cd/E53394_01/html/E54818/chapterzfs-...

Re:Initial Hammer2 filesystem implementation by chongli on Monday August 21, 2017 @09:15PM (#15069017)
Performance is substantially worse than other filesystems with more modestly sized caches, so the memory isn't really available to applications.

Is that in comparison to other filesystems that provide the same level of data integrity as ZFS? Otherwise you're comparing apples and oranges.

Re:Initial Hammer2 filesystem implementation by tedunangst on Monday August 21, 2017 @09:18PM (#15069031)
You didn't say the memory use was justified by providing better integrity. You said it was optional.
Re:Initial Hammer2 filesystem implementation by chongli on Monday August 21, 2017 @09:29PM (#15069072)
Yes, the memory use is optional. Pick two:

1) data integrity

2) low memory use

3) performance

Re:Initial Hammer2 filesystem implementation by dozzie on Monday August 21, 2017 @09:56PM (#15069176)
With ZFS I hear it's "pick one, and you cannot pick `low memory'".
Re:Initial Hammer2 filesystem implementation by aidenn0 on Monday August 21, 2017 @11:51PM (#15069559)
You can run ZFS with megabytes of ram, it's just slow, so it is pick 2. That being said, ZFS metadata is much bigger than it needs to be (most infamously dedupe has this issue).
Re:Initial Hammer2 filesystem implementation by chongli on Tuesday August 22, 2017 @03:44AM (#15070429)
Right, but to then compare the memory use of ZFS with dedupe turned on against another fs without that feature would be disingenuous since dedupe is optional in ZFS. That was the whole point of my original comment.
Re:Initial Hammer2 filesystem implementation by mrighele on Tuesday August 22, 2017 @04:17AM (#15070542)
deduplication doesn't have necessarily to be expensive; HAMMER (the first version, not HAMMER2) has offline deduplication that is usually scheduled to run at night. This allows regular use to be quite performant and with a low memory footprint. Of course there are tradeoffs, in particular heavy disk usage at certain hours (which can be an issue depending on the workload) and the fact that space is reclaimed only after some time that it has been wasted.
Re:Initial Hammer2 filesystem implementation by aidenn0 on Tuesday August 22, 2017 @12:41PM (#15074089)
I did say that ZFS metadata in general, and dedupe especially is much bigger than it needs to be. Even live dedupe can be done much more cheaply than how ZFS does it.
Re:Initial Hammer2 filesystem implementation by gigatexal on Tuesday August 22, 2017 @12:03AM (#15069606)
Lol this is FUD. ZFS is easily tunable to not blow up and use all your ram.
Re:Initial Hammer2 filesystem implementation by benchaney on Tuesday August 22, 2017 @02:09AM (#15070134)
Does "FUD" just mean "something I disagree with" now? How is this FUD?
Re:Initial Hammer2 filesystem implementation by gigatexal on Tuesday August 22, 2017 @03:29AM (#15070384)
Spreading misinformation is what I was taking issue with not just disagreeing and making a stink about it like a troll might.
Re:Initial Hammer2 filesystem implementation by JdeBP on Tuesday August 22, 2017 @04:06AM (#15070505)
You're not appreciating nor applying the fear, uncertainty, and doubt parts of "Fear, Uncertainty, and Doubt".
Re:Initial Hammer2 filesystem implementation by gkya on Tuesday August 22, 2017 @06:25AM (#15071051)
Talking about downsides of a thing is not FUD nor making stink about it.
Re:Initial Hammer2 filesystem implementation by snovv_crash on Tuesday August 22, 2017 @01:49AM (#15070043)
Depends if you want dedup.
Re:Initial Hammer2 filesystem implementation by cmurf on Monday August 21, 2017 @11:19PM (#15069452)
'btrfs subvolume snapshot <src> <dest>' is a writable snapshot; with -r flag it's read only. A Btrfs snapshot is a subvolume with stuff already in it, basically. In fact, all the inode numbers are initially identical in the original subvolume and the snapshot, and initially the snapshot is just a pointer. That's why they're cheap to create.
Re:Initial Hammer2 filesystem implementation by Dylan16807 on Tuesday August 22, 2017 @12:07AM (#15069617)
How does the deduplication work, in terms of user interface and performance?

For comparison:

ZFS has an online-only dedup, so it can save space as data is written, but it can't combine identical pieces of already-written data. It also scatters the segments of files to the winds, needing lots of ram and fast disks or it slows to a crawl.

BTRFS has mostly-offline dedup, so it doesn't save space as data is written, but you can combine identical pieces of data later. You can also make CoW copies of files instantly. It has minimal performance impact.

Re:Initial Hammer2 filesystem implementation by antongribok on Tuesday August 22, 2017 @12:47AM (#15069789)
I believe the correct terms are inline vs. post-processing deduplication.

There are pros and cons to each approach, and as usual with storage, a lot depends on implementation and workload.

Re:Initial Hammer2 filesystem implementation by Dylan16807 on Tuesday August 22, 2017 @01:01AM (#15069846)
> I believe the correct terms are inline vs. post-processing deduplication.

Thanks.

> There are pros and cons to each approach, and as usual with storage, a lot depends on implementation and workload.

I would probably argue that the biggest factors in different performance between ZFS and BTRFS deduplication are nearly independent of when the deduplication happens, and boil down to implementation decisions specific to those two filesystems.

Re:Initial Hammer2 filesystem implementation by CogitoCogito on Tuesday August 22, 2017 @04:15AM (#15070538)
If you happen to know, would the right comparison to elsewhere in computing be between something like reference count garbage collection (ala python ignoring its cycle detector) versus a sweeping garbage collector?
Re:Initial Hammer2 filesystem implementation by snovv_crash on Tuesday August 22, 2017 @01:51AM (#15070049)
The term online and offline are also correct, although they tend to be used in the machine learning field more.
Re:Initial Hammer2 filesystem implementation by antongribok on Tuesday August 22, 2017 @02:02AM (#15070102)
Offline is a completely different term when speaking about filesystems. Offline means that the filesystem needs to be unmounted before an operation can proceed.

For example some filesystems can be grown online, but can shrink only offline.

Re:Initial Hammer2 filesystem implementation by Dylan16807 on Tuesday August 22, 2017 @02:07AM (#15070122)
The specific term "offline deduplication" does not mean you unmount the filesystem. Perhaps it's a bad term, but it exists.
Re:Initial Hammer2 filesystem implementation by takeda on Monday August 21, 2017 @11:23PM (#15069466)
I'm glad Hammer FS exist, it is always great to have options, and new filesystems have more to build on.

But this one seems weird to me:

> copy-on-write, implying snapshots and such, like ZFS, but snapshots are writable.

snapshot by definition should be read-only, also ZFS allows to create a new filesystem from snapshot (through zfs clone) which is also O(1) operation.

Re:Initial Hammer2 filesystem implementation by antongribok on Tuesday August 22, 2017 @01:02AM (#15069847)
Read-only and read-write snapshots are possible with LVM, ZFS, Btrfs, and many commercial storage solutions.

One reason why you would want a writable snapshot is during backup validation. An application may need to do crash recovery before being able to read data, and having a writable filesystem makes things a lot easier.

I know that ZFS and LVM both send writes to a separate area, so the original snapshot is never modified (don't know about Btrfs implementation details).

Re:Initial Hammer2 filesystem implementation by takeda on Tuesday August 22, 2017 @05:07PM (#15076402)
Yes, what I said in ZFS you can instantly (and without using extra space) create a writable filesystem from snapshot using zfs clone (you can create multiple filesystems from one snapshot), but snapshots by itself are always read only.
Re:Initial Hammer2 filesystem implementation by Someone on Monday August 21, 2017 @11:34PM (#15069511)
That looks a bit like git versus svn. So, it _might_ be an insane idea that ends up being a good idea.

Especially if the default is to have a read only snapshot, I do not rule that out.

Re:Initial Hammer2 filesystem implementation by needusername on Tuesday August 22, 2017 @08:46AM (#15071799)
> extra care to allow pre-allocation of files by writing zeros, something that will make SQL databases easier to run performantly on HAMMER2 than on ZFS

I always though it care about performance of SQL databases you bypass the filesystem / kernel and go directly to the LUN with something like ASM.

Re:Initial Hammer2 filesystem implementation by Mayzie on Monday August 21, 2017 @08:25PM (#15068853)
I'm curious, how does it perform against ZFS and Btrfs (and probably a non-COW filesystem, like EXT4)? Are there any preliminary benchmarks available?

Does it support RAID and subvolumes like Btrfs? How is the stability?

Re:Initial Hammer2 filesystem implementation by digitalzombie on Tuesday August 22, 2017 @08:29AM (#15071680)
It's been years and it's one dude that's doing it iirc.

> Are there any preliminary benchmarks available?

He spent years just to write the doc and spec. And the post just said the preliminary code will be in September so that's probably a no.

Even with the september code being posted, preliminary isn't going to mean much because it most likely have very little features compare to ZFS and Btrfs. You probably have to wait longer for a fair comparison...

IIRC it's a one man team and the dude is a unicorn.

Re:Initial Hammer2 filesystem implementation by wahern on Monday August 21, 2017 @09:49PM (#15069153)
The original plan for HAMMER2 included multi-master synchronous replication. I don't know if that's still on the roadmap, or if something less ambitious is planned.

IIRC, years ago Dillon sold some proprietary synchronous multi-master replication product that provided ACID guarantees while also being relatively performant. (Because synchronous multi-master had historically been quite slow.) I always thought HAMMER2's replication model was going to be an evolution of that tech.

Re:Initial Hammer2 filesystem implementation by lobster_johnson on Monday August 21, 2017 @10:54PM (#15069380)
Dillon's database was called Backplane, and most of it was open source. I was always disappointed that he never (as far as I know) finished it, because it seemed very promising.
Re:Initial Hammer2 filesystem implementation by X86BSD on Monday August 21, 2017 @10:35PM (#15069307)
If I were the Linux camp, I would seriously look at the work required to port this to the kernel. Since they can't mainline zfs this may be their next best option. Not that they will look outside their echo chamber but they should.
Re:Initial Hammer2 filesystem implementation by jlgaddis on Sunday August 27, 2017 @01:58PM (#15111827)
The first release -- which will have very few of the planned features -- hasn't even happened yet. If I were "the Linux camp", I wouldn't even bother looking into H2 for at least another five years or so.