ZFS - sync=disable - fragmentation without SLOG

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

Stril

Member
Sep 26, 2017
191
12
18
41
Hi!

I need a new ZFS-backup-server with many snapshots.

The plan was/is to use it with "sync=disable" with 32x 10TB SAS-disks in mirror-config.

I read some posts, that fragmenation of the pool can be MUCH higher, if there is no SLOG-device. So my question:

Do you think, its a good idea to add an NVMe-SSD and to go for "sync=always" instead of "sync=disable" without SLOG?



The ZPOOL should archive backups for about one year, daily backups, about 4 million files.

Thank you for your thoughts
Stril
 

asche

New Member
Oct 6, 2017
18
4
3
46
I would expect:

No sync = no ZIL writes to the storage pool. Hence no (added) fragmentation. An SLOG should not make a difference to you in this scenario.

Sync = ZIL writes to either the storage pool (= additional fragmentation and very much slower than no sync) or to the SLOG (= no additional fragmentation on pool; slower than no sync).

You could spend some thoughts on the backup solution: Backing up 4 Million files individually (file copy = random writes) will be much slower than piping them into one big archive (sequential writes).
 
  • Like
Reactions: dswartz

gea

Well-Known Member
Dec 31, 2010
3,156
1,195
113
DE
A ZFS filer usually does not use sync so no additional fragmentation as you do not use a ZIL.
Fragmentation depend more on pool fillrate then.

So do not fill up the pool to say more than 70% and use enough RAM to avoid small random writes.
The rambased write cache will transform the small random writes automatically into larger sequential writes.

Only if you want the extra security of forced sync write (no loss of committed data in ram-writecache on a crash)
think of an Slog (Optane 800P, 90xP, 4800) that is used instead the onpool ZIL.