On 02/09/10 08:18, Kjetil Torgrim Homme wrote:
Richard Elling <richard.ell...@gmail.com> writes:
On Feb 8, 2010, at 9:10 PM, Damon Atkins wrote:
I would have thought that if I write 1k then ZFS txg times out in
30secs, then the 1k will be written to disk in a 1k record block, and
then if I write 4k then 30secs latter txg happen another 4k record
size block will be written, and then if I write 130k a 128k and 2k
record block will be written.
Making the file have record sizes of
1k+4k+128k+2k
Close. Once the max record size is achieved, it is not reduced. So
the allocation is: 1KB + 4KB + 128KB + 128KB
I think the above is easily misunderstood. I assume the OP means
append, not rewrites, and in that case (with recordsize=128k):
* after the first write, the file will consist of a single 1 KiB record.
* after the first append, the file will consist of a single 5 KiB
record.
Good so far.
* after the second append, one 128 KiB record and one 7 KiB record.
A long time ago we used to write short tail blocks, but not any more.
So after the 2nd append we actually have 2 128KB blocks.
in each of these operations, the *whole* file will be rewritten to a new
location, but after a third append, only the tail record will be
rewritten.
So after the third append we'd actually have 3 128KB blocks. The first doesn't
need to be re-written.
Neil.
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss