kern/159251: FEATURE REQUEST: add FLETCHER4 as DEDUP hash option

vermaden vermaden at
Thu Jul 28 08:40:07 UTC 2011

>Number:         159251
>Category:       kern
>Synopsis:       FEATURE REQUEST: add FLETCHER4 as DEDUP hash option
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 28 08:40:06 UTC 2011
>Originator:     vermaden
>Release:        8.2-STABLE

it would be nice to have fletcher4 as a faster alternative to sha256:

# zfs set dedup=fletcher4,verify tank
cannot set property for 'tank': 'dedup' must be one of 'on | off | verify | sha256[,verify]'

Given the ability to detect hash collisions as described above, it is possible to use much weaker (but faster) hash functions in combination with the 'verify' option to provide faster dedup. ZFS offers this option for the fletcher4 checksum, which is quite fast: 

# zfs set dedup=fletcher4,verify tank 

The tradeoff is that unlike SHA256, fletcher4 is not a pseudo-random hash function, and therefore cannot be trusted not to collide. It is therefore only suitable for dedup when combined with the 'verify' option, which detects and resolves hash collisions. On systems with a very high data ingest rate of largely duplicate data, this may provide better overall performance than a secure hash without collision verification.





More information about the freebsd-bugs mailing list