ZFS - when does compression happen?

Hi,

when does compression happen on a ZFS volume? Is it “live” during the actual writing of data, or is it a scheduled task that goes through all the existing data on the volume and reprocesses what’s already there?

In other words, is newly written data on a ZFS volume already compressed from the start or will it take some time to reflect in the “storage used” statistics?

Compression happens immediately so all newly written data is compressed if possible. There is no scheduled task.

1 Like