Egregoros

Signal feed

Timeline

Post

Remote status

Context

1

#FreeBSD #zfs anybody know how to tell what the *actual* checksum chosen by OpenZFS is, on FreeBSD?

When a zpool is created by bsdinstall, it defaults to checksum=on, and a micro benchmark is done to choose the appropriate checksum (from fletcher4, sha256, sha512, skein, blake3).

I would like to know what that chosen checksum is.

https://openzfs.github.io/openzfs-docs/Basic%20Concepts/Checksums.html provides instructions for ZoL but its not matched on FreeBSD.
Sysctl shows only:

$ sysctl -a |egrep -i 'blake3|fletcher|sha2|sha5'
vfs.zfs.fletcher_4_impl: [fastest] scalar superscalar superscalar4 sse2 ssse3 avx2 avx512f avx512bw
vfs.zfs.sha512_impl: cycle [fastest] generic x64 avx avx2
vfs.zfs.sha256_impl: cycle [fastest] generic x64 ssse3 avx avx2 shani
vfs.zfs.blake3_impl: cycle [fastest] generic sse2 sse41 avx2 avx512

Which is not very helpful!

Inspecting zdb shows that the überblock uses fletcher4, if so that's a bad choice for almost all the machines I have, vs one of the more modern CPU-accelerated ones.

Uberblock:
magic = 0000000000bab10c
version = 5000
txg = 29818863
guid_sum = 12865431551488305392
timestamp = 1770722160 UTC = Tue Feb 10 11:16:00 2026
bp = DVA[0]=<0:1ef37817000:1000> DVA[1]=<0:1f26e5c1000:1000> DVA[2]=<0:8c341bf000:1000> [L0 DMU objset] fletcher4 uncompressed unencrypted LE contiguous unique triple size=1000L/1000P birth=29818863L/29818863P fill=75881 cksum=00000003035e0207:00000baf31d8f848:0016adf241101a15:1d6126f678dd7a91

@dch "checksum=on" is fletcher4 for non-dedup datasets (there, it's sha256)

The microbenchmarks are determining the best implementation of the named checksum algorithm for your hardware. They don't influence the choice of checksum algorithm.

The checksum property only applies to new data blocks written to that dataset. Pool metadata is always fletcher4.

Replies

1