ZFS General ZFS newbie questions

I have some more questions after running through the ZFS quick start: (1) How can I discover how little or how much a file is compressed? (2) Does FreeBSD / ZFS have anything equivalent to /dev/shm (i.e. using RAM to back the file system) on Linux? (3) How quick is taking a snapshot? / Does it get slower the more data is involved? (4) Is there a programmatic interface for taking a snapshot, or must a program wanting to take a snapshot run the shell command? (5) How well does ZFS compression work on large files that are memory mapped into process address space? (6) Is there a way to hint to ZFS when to compress / write-to-backing-disk changes to a given memory mapped page? Thanks!
 
  1. Use the du(1) command with the -A option to compare compressed to real file size.
  2. No. I believe(someone correct me if I'm wrong) some people just soft link /dev/shm to /tmp for Linux based programs that need it.
  3. Pretty much instantaneous.
  4. Not that I'm aware of. Commands can be run from the command line or from a script.
  5. Sorry, I don't know.
  6. Sorry, I also don't know.
For more information on using ZFS under FreeBSD also consider taking a look at FreeBSD Mastery: ZFS
 
On Linux /dev/shm is just a mount point for tmpfs, which is available on FreeBSD as well (see tmpfs(5)).

EDIT: On Debian it's apparently symlinked to /run/shm now, but still backed by tmpfs.
 
Back
Top