Help understanding iSCSI sync

Fred974

Contributor
Joined
Jul 2, 2016
Messages
190
Hi all,

I have setup an iSCSI zvol inside a dataset to keep things organised as follow:

image
image1567×216 17.7 KB


The ‘iscsi_storage’ dataset sync is set to ‘inherit (standard)’

image

I then did some performance testing with FIO with the iSCSI zvol sync = standard, always and disable. Here are the results:
Random write test for IOP/s
sync;fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=4G --readwrite=randwrite --ramp_time=4 --numjobs=4 iSCSI sync standard: WRITE: bw=23.0MiB/s (25.2MB/s), 6136KiB/s-6165KiB/s (6283kB/s-6313kB/s), io=15.8GiB (16.9GB), run=671033-672801msec iSCSI sync always: WRITE: bw=2615KiB/s (2677kB/s), 654KiB/s-655KiB/s (669kB/s-670kB/s), io=15.0GiB (17.2GB), run=6404989-6414651msec iSCSI disable: WRITE: bw=26.1MiB/s (27.4MB/s), 6681KiB/s-6688KiB/s (6841kB/s-6849kB/s), io=15.5GiB (16.6GB), run=607835-607922msec
Random Read test for IOP/s
sync;fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=4G --readwrite=randread --ramp_time=4 --numjobs=4 iSCSI sync standard: READ: bw=199MiB/s (208MB/s), 49.6MiB/s-49.7MiB/s (52.0MB/s-52.1MB/s), io=15.2GiB (16.4GB), run=78551-78628msec iSCSI sync always: READ: bw=202MiB/s (212MB/s), 50.4MiB/s-50.7MiB/s (52.9MB/s-53.1MB/s), io=15.2GiB (16.3GB), run=76867-77188msec iSCSI disable: READ: bw=198MiB/s (207MB/s), 49.4MiB/s-49.5MiB/s (51.8MB/s-51.9MB/s), io=15.3GiB (16.4GB), run=78893-79008msec
Sequential write test for throughput
sync;fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4M --iodepth=64 --size=4G --readwrite=write --ramp_time=4 --numjobs=4 iSCSI sync standard: WRITE: bw=372MiB/s (390MB/s), 92.9MiB/s-93.0MiB/s (97.4MB/s-97.5MB/s), io=15.4GiB (16.5GB), run=42357-42451msec iSCSI sync always: WRITE: bw=20.9MiB/s (21.0MB/s), 5361KiB/s-5454KiB/s (5490kB/s-5585kB/s), io=15.0GiB (17.2GB), run=768288-781599msec iSCSI disable: WRITE: bw=449MiB/s (470MB/s), 112MiB/s-113MiB/s (117MB/s-118MB/s), io=15.3GiB (16.4GB), run=34739-34879msec
Sequential Read test for throughput
sync;fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4M --iodepth=64 --size=4G --readwrite=read --ramp_time=4 --numjobs=4 iSCSI sync standard: READ: bw=873MiB/s (916MB/s), 218MiB/s-220MiB/s (229MB/s-231MB/s), io=13.8GiB (14.8GB), run=16034-16135msec iSCSI sync always: READ: bw=865MiB/s (907MB/s), 216MiB/s-217MiB/s (227MB/s-227MB/s), io=14.2GiB (15.2GB), run=16718-16762msec iSCSI disable: READ: bw=889MiB/s (933MB/s), 222MiB/s-223MiB/s (233MB/s-233MB/s), io=13.9GiB (14.9GB), run=15960-15984msec
When sync=always, I get very bad random write so it make me thing that the always setting is like have sync off in NFS. In my scenario, when I have my iSCSI sync = standard, does it mean that sync is off? Can I loose data when I set sync=standard?

Thank you all in advance
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
As far as I am aware - and I am sure that someone will corrcet me if I am wrong.
NFS is always sync
iSCSI from vmware = sync, others may vary
MAC traffic = sync apparently

You can of course override the defaults by setting specific sync settings on the NAS
If you want to keep sync but faster then use a suitable SLOG
 
Top