Howto minimize fragmentation

I have a fresh zpool consisting of a 9 HDD RAIDZ2 vdev on Linux. I am not currently using a ZLOG special device. Now I have a dataset with recordsize=1M on it that I want to rsync/scp a few dozen TB of large files to. Once this dataset is filled up it will not be written to much any more. The zpool will not reach near full state.

I want the files to be as contiguous as possible. I am concerned about fragmentation because I am not using a ZLOG special device.

  1. Would it help reduce fragementation if I make the transactions longer (e.g. 30 seconds) while filling it up?
options zfs zfs_dirty_data_max=50000000000
options zfs zfs_dirty_data_max_max=50000000000
options zfs zfs_txg_timeout=30
  1. Would it help reduce fragementation if I set sync=disabled on the dataset while filling it up?
    I am not concerned about consistency, if anything goes wrong during transfer I can just start over.

  2. The setting of logbias should be irrelevant if sync=disabled anyway, right?

  3. I am not 100% sure but I am assuming rsync does sequential writes and doesn’t do parallel writes. I am not sure how big the write buffer of rsync is or how often it flushes/syncs. Is there an rsync/SSH/network socket option that can reduce fragmentation?

Or is fragmentation from ZIL / interleaved metadata writes never an issue with writes from rsync?

I am probably overanalyzing this but please bear with me.

  1. if you’re literally using just rsync–not some wrapper for it–a single rsync command is a single process which only writes one file at a time, once it begins actually transferring data.

  2. there are no sync writes in this workload, so faffing about with a LOG device, with sync=disabled, etc will not accomplish anything.

  3. there’s only a single process writing, so messing about with TXG timeouts and such isn’t going to have any effect either. as long as there is only a single process writing to the pool, one file at a time, the data is going to go in the same place and in the same order regardless of what you do in terms of tuning.