rfjakob / gocryptfs

Encrypted overlay filesystem written in Go
https://nuetzlich.net/gocryptfs/
MIT License
3.51k stars 249 forks source link

QEMU's x86-64-v3 virtual CPU benchmark for the collection #822

Closed xelra closed 4 months ago

xelra commented 8 months ago

I'm running gocryptfs in a Proxmox virtual machine with QEMU's x86-64-v3 virtual CPU type. The host CPU is an Intel Core i3-N305. I thought you might want this result for the benchmark collection.

# gocryptfs --speed
gocryptfs v2.4.0; go-fuse [vendored]; 2023-06-15 go1.20.5 linux/amd64
cpu: QEMU Virtual CPU version 2.5+; with AES acceleration
AES-GCM-256-OpenSSL              474.69 MB/s
AES-GCM-256-Go                   197.24 MB/s    (selected in auto mode)
AES-SIV-512-Go                   361.91 MB/s
XChaCha20-Poly1305-OpenSSL       798.38 MB/s
XChaCha20-Poly1305-Go           1294.73 MB/s    (selected in auto mode)
rfjakob commented 8 months ago

Interesting, gocryptfs chooses the wrong (slower) implementation on this CPU.

Do you get similar results when you run it on the host?

xelra commented 8 months ago

It took me a while, because I was running a workload on the system, but I finally had the chance to boot an Arch Live ISO and run the test on the host.

Here are the results. I hope it helps.

# gocryptfs --speed
gocryptfs v2.4.0; go-fuse [vendored]; 2023-06-15 go1.20.5 linux/amd64
cpu: Intel(R) Core(TM) i3-N305; with AES acceleration
AES-GCM-256-OpenSSL              2420.47 MB/s
AES-GCM-256-Go                   4933.34 MB/s    (selected in auto mode)
AES-SIV-512-Go                    376.42 MB/s
XChaCha20-Poly1305-OpenSSL        791.90 MB/s
XChaCha20-Poly1305-Go            1399.53 MB/s    (selected in auto mode)
rfjakob commented 6 months ago

Looks like AES acceleration does not work inside the VM. Huh.

rfjakob commented 4 months ago

Hi, could you check gocryptfs -speed again inside the VM with the lastest change https://github.com/rfjakob/gocryptfs/commit/f06f27e7bc098e334024c365004f9303e79997d9 ?

rfjakob commented 4 months ago

(In the meantime, I added the results from January to https://github.com/rfjakob/gocryptfs/wiki/CPU-Benchmarks#alder-lake-n-launch-q123)