• P
    Use kXXH3 as default checksum (CPU efficiency) (#10778) · 27c9705a
    Peter Dillinger 提交于
    Summary:
    Since this has been supported for about a year, I think it's time to make it the default. This should improve CPU efficiency slightly on most hardware.
    
    A current DB performance comparison using buck+clang build:
    ```
    TEST_TMPDIR=/dev/shm ./db_bench -checksum_type={1,4} -benchmarks=fillseq[-X1000] -num=3000000 -disable_wal
    ```
    kXXH3 (+0.2% DB write throughput):
    `fillseq [AVG    1000 runs] : 822149 (± 1004) ops/sec;   91.0 (± 0.1) MB/sec`
    kCRC32c:
    `fillseq [AVG    1000 runs] : 820484 (± 1203) ops/sec;   90.8 (± 0.1) MB/sec`
    
    Micro benchmark comparison:
    ```
    ./db_bench --benchmarks=xxh3[-X20],crc32c[-X20]
    ```
    Machine 1, buck+clang build:
    `xxh3 [AVG    20 runs] : 3358616 (± 19091) ops/sec; 13119.6 (± 74.6) MB/sec`
    `crc32c [AVG    20 runs] : 2578725 (± 7742) ops/sec; 10073.1 (± 30.2) MB/sec`
    
    Machine 2, make+gcc build, DEBUG_LEVEL=0 PORTABLE=0:
    `xxh3 [AVG    20 runs] : 6182084 (± 137223) ops/sec; 24148.8 (± 536.0) MB/sec`
    `crc32c [AVG    20 runs] : 5032465 (± 42454) ops/sec; 19658.1 (± 165.8) MB/sec`
    
    Pull Request resolved: https://github.com/facebook/rocksdb/pull/10778
    
    Test Plan: make check, unit tests updated
    
    Reviewed By: ajkr
    
    Differential Revision: D40112510
    
    Pulled By: pdillinger
    
    fbshipit-source-id: e59a8d50a60346137732f8668ba7cfac93be2b37
    27c9705a
check_format_compatible.sh 13.9 KB