On May 18, 2019, at 1:47 AM, Allan Jude <[email protected]> wrote: > > Writing a file of all zeros doesn't test the compression, since if compress > != off, we check for the 'all zeros' case and write a hole, rather than > actually allocating space.
That has not been my experience, on FreeBSD or ZoL: root@linux-vm:/tank# stat */bigfile File: DS1/bigfile Size: 1073741824 Blocks: 1 IO Block: 131072 regular file Device: 33h/51d Inode: 2 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2019-05-17 19:15:05.755556266 +0000 Modify: 2019-05-17 19:15:08.069527862 +0000 Change: 2019-05-17 19:15:08.069527862 +0000 Birth: - File: DS2/bigfile Size: 1073741824 Blocks: 2097365 IO Block: 131072 regular file Device: 34h/52d Inode: 2 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2019-05-18 18:00:37.259314881 +0000 Modify: 2019-05-18 18:00:46.794556728 +0000 Change: 2019-05-18 18:00:46.794556728 +0000 Birth: - (DS2 was "zfs create -o compression=off tank/DS2", and bigfile was created the same way on both datasets). > If you write something else compressible, you should be able to use zdb to > see if it ended up using lzjb or lz4. How? :) Sean. ------------------------------------------ openzfs: openzfs-developer Permalink: https://openzfs.topicbox.com/groups/developer/Tcfdc8da2da71e1c0-Ma5b8188f4ee72a078d0d0a86 Delivery options: https://openzfs.topicbox.com/groups/developer/subscription
