Measuring File System Write Amplification

We are trying to ascertain the WAF incurred by the file system when running rocksDB. This is different from RocksDB WAF because we ignore the amount of key/value pairs and take the ratio between what comes out of Positioned{Append} and the bytes that arrive to the device (Calculate that with smart log). Since we are interested in write amplification we use the fillrandom and overwrite benchmarks, we make sure we use_direct_io. We precondition the Filesystem by filling it up to 90% capacity and then run db_bench up to 97% capacity.

Has anyone every measured this for XFS?
I’m getting a 1.005 WAF which seems a bit low. With the FS being pushed to the limit I was expecting something close to 1.7.

Received the following answer (but didn’t answer it)
What do you use to track the write accesses to your disk?
I previously used blktrace and could get fair amount of details to get exactly what you’re looking for.
I noticed because of frequent sync operations I was getting 70x WAF because for every database write XFS was updating the journal (4k write) and also doing a full 4k write for the data itself.