On Sun, 7 Mar 2010, Damon Atkins wrote:
The example below shows 28 x 128k writes to the same file before anything is written to disk and the disk are idle the entire time. There is no cost to writing to disk if the disk is not doing anything or is under capacity. (Not a perfect example)
Zfs can be tuned to write out transaction groups much more quickly if you like.
It is not true that there is "no cost" though. Since ZFS uses COW, this approach requires that new blocks be allocated and written at a much higher rate. There is also an "opportunity cost" in that if a read comes in while these continuous writes are occuring, the read will be delayed.
There are many applications which continually write/overwrite file content, or which update a file at a slow pace. For example, log files are typically updated at a slow rate. Updating a block requires reading it first (if it is not already cached in the ARC), which can be quite expensive. By waiting a bit longer, there is a much better chance that the whole block is overwritten, so zfs can discard the existing block on disk without bothering to re-read it.
Bob -- Bob Friesenhahn bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss