[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fedora-devel-list
Subject:    Re: btrfs hash algorithm (should xxhash be the default?)
From:       Chris Murphy <lists () colorremedies ! com>
Date:       2021-02-01 21:01:20
Message-ID: CAJCQCtSJgiLcFhgsmUTnb408iRnRxGY4fOZin2orBrkTywQWww () mail ! gmail ! com
[Download RAW message or body]

On Sun, Jan 31, 2021 at 11:57 AM Matthew Miller
<mattdm@fedoraproject.org> wrote:
>
> On my Intel i7 laptop, xxhash is a small but clear performance win over
> crc32c:
>
>     $ ./hash-speedtest  10000000
>     Block size:     4096
>     Iterations:     10000000
>     Implementation: builtin
>
>         NULL-NOP: cycles:   1372543560, c/i      137
>      NULL-MEMCPY: cycles:   2844174884, c/i      284
>           CRC32C: cycles:   9673117404, c/i      967
>           XXHASH: cycles:   7129819594, c/i      712
>           SHA256: cycles: 649914613520, c/i    64991
>          BLAKE2b: cycles: 153513008046, c/i    15351
>
>
> And I'm given to understand that this is even more the case on newer CPUs.
>
> Plus, it's 64 bit instead of 32 bit. The 256-bit algorithms are obviously
> much, much slower and probably not right for a default, but should we
> consider making xxhash the default for Fedora Linux systems with btrfs?

I'm seeing:

[    1.179693] Btrfs loaded, crc32c=crc32c-generic, zoned=yes

Someone adventurous might want to figure out how to get it to use
crc32c_intel instead. I think it might need to be compiled into the
kernel.

CONFIG_CRYPTO_CRC32C=y
CONFIG_CRYPTO_CRC32C_INTEL=m

And then retest.

But also, the difference in performance between xxhash and crc32c is
pretty tiny. I'm using all four hashes on various file systems, and up
until there's a heavy IO workload, there's no performance difference
among them.


-- 
Chris Murphy
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-leave@lists.fedoraproject.org
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic