ZFS hash algorithms: skein vs sha512 (vs edonr)

Status
Not open for further replies.

scwst

Explorer
Joined
Sep 23, 2016
Messages
59
Upgrading my Ubuntu to 18.04.1 was a good excuse to finally read up on some of the newer features included in ZFS (see https://forums.freenas.org/index.php?resources/zfs-feature-flags-in-freenas.95/). I can see sha512 and skein are enabled on FreeNAS, and Ubuntu has edonr as well (which I assume is somehow related to those teddy bears on Star Wars). From what I've read in these forums and places like https://bsdmag.org/zfs-feature-flags/, they are all A Good Thing, and all better than the default, which seems to still be fletcher4.

However, at the risk of sounding obsessive over a minor detail, which should I use? A naive reading seems to say edonr is faster than skein which is faster than sha512. But are there any actual recommendations? This would not be for the boot pool, and I don't use deduplication. Thanks!
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
Some of the more complex hashing algorithms are better for ensuring data integrity and for avoiding hash collisions. Avoiding collisions becomes more important with deduplication as dedupe uses the hash to identify dedupable blocks. As you data footprint grows this becomes more and more relevant. It has been my understanding that fletcher is a fast low overhead hashing algorithm that is more than sufficient to identify data errors in pools that are not obscenely huge (PB in size).
they are all A Good Thing, and all better than the default
Keep in mind, better depends on your goals and use case.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
All the newer algorithms are slower than the default fletcher, which is "good enough" to detect bit rot and some accidental stuff, but not good enough for deduplication or encryption.

A few years ago, SHA256 was the standard cryptographically secure algorithm in FreeNAS. SHA512 was introduced as a faster (on 64-bit machines) and straightforward upgrade from SHA256. Skein was introduced at the same time because it should be a bit faster and it was one of the SHA3 finalists.
I don't know about edonr, but it's only available on Linux, as far as I know, so it's probably best not to use it.
 

scwst

Explorer
Joined
Sep 23, 2016
Messages
59
Ah, thanks. So I'll keep things as they are until encryption becomes a thing here.
 
Status
Not open for further replies.
Top