ZFS ZFS on an md(4) device?


I've been experimenting with formatting md(4) memory disks with ZFS, the main idea being that I could use compression for more space over the usual UFS md.

I'm just wondering if there are any caveats with this, is it a bad idea?

So for example with:
mdconfig -s 4g -u md1
zpool create -o cachefile=none -m /ztmp -O compression=lz4 ztmp md1

With WRKDIRPREFIX=/ztmp in make.conf doing a make extract on lang/ghc uses 171MB.

If CPU is more important than space, zle compression gives 383MB usage.

UFS uses 529MB with the default blocksize.

I notice tmpfs uses almost the same as UFS but more available (I guess it's not reserving 8%).
geom md list seems to indicate that -o compress does not operate on swap backed devices (but can on malloc backed devices).