borgbackup/borg

borg2: benchmarking needed

已關閉

#10,160 建立於 2026年8月20日

 (2 則留言) (0 個反應) (0 位負責人)Python (732 個分叉)batch import
c: chunkerc: compressionhelp wanted

倉庫指標

星標
 (10,086 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

borg2 (master branch) zstd compression and chunkers got quite some tuning recently, but it depends a lot on the CPU of the host system.

I did not implement a mechanism to choose the fastest algorithm based on the platform (might be wrong, new cpus might be better/different than old ones) or even a realtime measurement (might be wrong also, due to other activity on the machine). It just uses env vars now.

You can help by doing some measurements on your machine(s) - x86-64, arm64 and also others (others will run the generic code that works on any platform). Try to have a relatively idle machine.

Currently, you will need a master branch build. After 2.0.0b23 is released, you can also use that.

These are some command lines that can be used for benchmarking, I put a comment into the line I consider fastest currently:

# Compression Multithreading - only zstd performance is interesting here.
# All CPU types (4 workers might make most sense for 2MiB chunks = 4*512kiB)
BORG_ZSTD_MT_WORKERS=1 borg benchmark cpu --compressing
BORG_ZSTD_MT_WORKERS=2 borg benchmark cpu --compressing
BORG_ZSTD_MT_WORKERS=4 borg benchmark cpu --compressing  # fastest!?
BORG_ZSTD_MT_WORKERS=6 borg benchmark cpu --compressing
BORG_ZSTD_MT_WORKERS=8 borg benchmark cpu --compressing

# Normal chunking - only fastcdc and buzhash64 performance is interesting here.
# X86-64 (AMD/Intel)
BORG_FASTCDC_KERNEL=scalar BORG_BUZHASH64_KERNEL=scalar borg benchmark cpu --chunking  # fastest!?
BORG_FASTCDC_KERNEL=blockwise BORG_BUZHASH64_KERNEL=blockwise borg benchmark cpu --chunking
BORG_FASTCDC_KERNEL=avx2 BORG_BUZHASH64_KERNEL=avx2 borg benchmark cpu --chunking
BORG_FASTCDC_KERNEL=avx512 BORG_BUZHASH64_KERNEL=avx512 borg benchmark cpu --chunking

# Cryptographic chunking - only the *-aes chunker performance is interesting here.
# X86-64 (AMD/Intel)
BORG_AES_CHUNKER_KERNEL=evp borg benchmark cpu --chunking
BORG_AES_CHUNKER_KERNEL=aes-ni borg benchmark cpu --chunking
BORG_AES_CHUNKER_KERNEL=vaes borg benchmark cpu --chunking  # fastest!?

# Normal chunking - only fastcdc and buzhash64 performance is interesting here.
# ARM64 CPUs (incl. Apple Silicon)
BORG_FASTCDC_KERNEL=scalar BORG_BUZHASH64_KERNEL=scalar borg benchmark cpu --chunking
BORG_FASTCDC_KERNEL=blockwise BORG_BUZHASH64_KERNEL=blockwise borg benchmark cpu --chunking
BORG_FASTCDC_KERNEL=neon BORG_BUZHASH64_KERNEL=neon borg benchmark cpu --chunking  # fastest!?

# Cryptographic chunking - only the *-aes chunker performance is interesting here.
# ARM64 CPUs (incl. Apple Silicon)
BORG_AES_CHUNKER_KERNEL=evp borg benchmark cpu --chunking
BORG_AES_CHUNKER_KERNEL=aes-arm64 borg benchmark cpu --chunking  # fastest!?

貢獻者指南