From a322eb96aedc4e66c97e5101b1ea7cbd4d2e53c7 Mon Sep 17 00:00:00 2001 From: Edwin Eefting Date: Fri, 21 Oct 2022 18:14:46 +0200 Subject: [PATCH] crude encryption speed test --- scripts/enctest | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 scripts/enctest diff --git a/scripts/enctest b/scripts/enctest new file mode 100755 index 0000000..88fe85c --- /dev/null +++ b/scripts/enctest @@ -0,0 +1,30 @@ +#!/bin/bash + +#NOTE: usually the speed is the same, but the cpu usage is much higher for ccm + +set -e + +D=/enctest123 +DS=rpool$D + +echo sdflsakjfklsjfsda > key.txt + +dd if=/dev/urandom of=dump.bin bs=1M count=10000 + +zfs destroy $DS || true + +zfs create $DS + +echo Unencrypted: +sync +time ( cp dump.bin $D/dump.bin; sync ) + + +for E in aes-128-ccm aes-192-ccm aes-256-ccm aes-128-gcm aes-192-gcm aes-256-gcm; do + zfs destroy $DS + zfs create -o encryption=$E -o keylocation=file://`pwd`/key.txt -o keyformat=passphrase $DS + echo $E + sync + time ( cp dump.bin $D/dump.bin; sync ) +done +