On Mon, Mar 16, 2009 at 09:54:57PM +0100, Carsten Aulbert wrote:
> o what happens when a user opens the file and does a lot of seeking
> inside the file? For example our scientists use a data format where
> quite compressible data is contained in stretches and the file header
> contains a dictionary where each stretch of data starts. If these files
> are compressed on disk, what will happen with ZFS? Will it just make
> educated guesses, or does it have to read all of the typically 30-150 MB
> of the file and then does the seeking from buffer caches?

Individual ZFS blocks are compressed.  So seeking isn't expensive.  It
doesn't have to decompress earlier blocks to find the correct offset.

> o Another problem I see (but probably isn't): A user is accessing a file
> via a NFS-exported ZFS, appending a line of text, closing the file (and
> hopefully also flushing everything correctly. However, then the user
> opens it again appends another line of text, ... Imagine this happening
> a few times per second. How will ZFS react to this pattern? Will it only
> opens the final record of the file, uncompress it, adds data,
> recompresses it, flushes it to disk and reports that back to the user's
> processes? Is there a potential problem here?

If it's truly an append, then no.  Only the last block has to be
rewritten. 

-- 
Darren
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to