I ran iotop today for a few hours on my storage server which has a few ZFS datasets that are mounted elsewhere as NFS volumes. After a few hours, the accumulated read/write statistics showed that txg_sync
is doing the majority of read activity on the server but ZERO write activity.
I was surprised by this because I thought txg_sync
is responsible for flushing async WRITES from RAM to the pool every 5 seconds. I would have therefore expected it to do a lot of WRITE activity... but somehow it only does READS and quite a lot of those (6.8 TB over ~4 hours). The command with the highest WRITE activity is nfsd
with ~350GB after 4 hours.
Only thing I can imagine that could be causing these reads is the snapshotting that is going on every 15 minutes by sanoid (which often does a zfs list -t snapshot
, which takes ~10 minutes each time to complete on this server). Could that cause those massive reads? Would that even be done by txg_sync
??