Bench test with SLOG?

killmasta93

Renowned Member
Aug 13, 2017
973
58
68
31
Hi
I was wondering if someone could shed some light. Currently trying to test out the speed difference with slog and without, in my test environment i have computer with 32 gigs of ram and raid zfs1 with toshiba 1tb HDD 7200rpm

I ran a bench test (not sure if its the correct way to benchmark) with this script

These were the results without SLOG

cached 4k x 100,000​
0.42​
cached 1M x 1,000​
0.24​
non-cached 4k x 100,000​
0.4​
non-cached 1M x 1,000​
0.24​
sequential 4k x 1,000​
0​
sequential 1M x 1,000​
0.25​

Now i added one SSD BX500 1tb

Code:
zpool add -f rpool log /dev/sdc

Code:
root@pve:~# zpool status
  pool: rpool
 state: ONLINE
config:

    NAME                                        STATE     READ WRITE CKSUM
    rpool                                       ONLINE       0     0     0
      mirror-0                                  ONLINE       0     0     0
        ata-TOSHIBA_DT01ACA100_986SYT3NS-part3  ONLINE       0     0     0
        ata-TOSHIBA_DT01ACA100_986SYU7NS-part3  ONLINE       0     0     0
    logs   
      sdc                                       ONLINE       0     0     0

which gave me similar results not sure why



cached 4k x 100,000​
0.4​
cached 1M x 1,000​
0.24​
non-cached 4k x 100,000​
0.4​
non-cached 1M x 1,000​
0.22​
sequential 4k x 1,000​
0​
sequential 1M x 1,000​
.24​


Thank you
1633730970853.png

Code:
#!/bin/bash
echo "Performing cached write of 100,000 4k blocks..."
/usr/bin/time -f "%e" sh -c 'dd if=/dev/zero of=4k-test.img bs=4k count=100000 2> /dev/null'

rm 4k-test.img
echo ""
sleep 3


echo "Performing cached write of 1,000 1M blocks..."
/usr/bin/time -f "%e" sh -c 'dd if=/dev/zero of=1GB.img bs=1M count=1000 2> /dev/null'

rm 1GB.img
echo ""
sleep 3


echo "Performing non-cached write of 100,000 4k blocks..."
/usr/bin/time -f "%e" sh -c 'dd if=/dev/zero of=4k-test.img bs=4k count=100000 conv=fdatasync 2> /dev/null'

rm 4k-test.img
echo ""
sleep 3


echo "Performing non-cached write of 1,000 1M blocks..."
/usr/bin/time -f "%e" sh -c 'dd if=/dev/zero of=1GB.img bs=1M count=1000 conv=fdatasync 2> /dev/null'

rm 1GB.img
echo ""
sleep 3


echo "Performing sequential write of 1,000 4k blocks..."
/usr/bin/time -f "%e" sh -c 'dd if=/dev/zero of=4k-test.img bs=4k count=1000 oflag=dsync 2> /dev/null'

rm 4k-test.img
echo ""
sleep 3

echo "Performing sequential write of 1,000 1M blocks..."
/usr/bin/time -f "%e" sh -c 'dd if=/dev/zero of=1GB.img bs=1M count=1000 oflag=dsync 2> /dev/null'

rm 1GB.img
 
Zil is used only for synchronous write. If you want to see the difference, you should set sync=always (only for benchmark, not for production use!) or use corresponding flags for dd.
 
thanks for the reply, so if i have zfs set sync=disabled rpool its pointless having a slog?
 
Yes, with "sync=disabled" a SLOG will never be used.
Its by the way not recommended to use "sync=disabled" because it will weaken all the data integrity ZFS is great for. The software engineers that are programming the software your run will decide when to use unsecure async and secure sync writes. If they prefer sync writes they don't use that for fun, they use it because otherwise very important data might be lost and you could even loose your complete pool or VM. If you use "sync=disabled" you basically ignore what the software engineers want the hardware to do and force ZFS to lie to the software so that all sync wirtes are handled as unsecure but faster async writes. If you don't care about data integrity and only want the best performance possible sacrificing everything else you should use hardware raid or mdadm and not ZFS.
 
Last edited:
Thanks for the reply, correct i was reading back then that its dangerous running it, but so far haven't had any troubles yet as i have copies. I use ZFS because of the way it uses snapshots while having the VM on with no issue. I thought adding a slog or l2arc would speed up more the ZFS pool but i guess i was wrong when running "sync=disabled"
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!