Hello list, I have known that zfs has an excellent feature--adjusting its block size according to the size of files automatically. Some materials say that this is implemented by a function of the size of the file. However, I can not find any further description of this key function. Do I have to read the codes for the details? Or where can I find it? Thanks! This message posted from opensolaris.org
For files smaller than the default (128K) or the user-defined value, the recordsize will be the smallest power of two between 512 bytes and the appropriate upper limit. For anything above the value, it''s the defined recordsize for every block in the file. Variable recordsize is only for single block files. There''s no tail packing using variable recordsize in ZFS (yet?). Regards, -mg Robert wrote:> Hello list, > I have known that zfs has an excellent feature--adjusting its block size according to the size of files automatically. Some materials say that this is implemented by a function of the size of the file. However, I can not find any further description of this key function. Do I have to read the codes for the details? Or where can I find it? > Thanks! > > > This message posted from opensolaris.org > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >
Thanks for your response, from which I have known more details. However, there is one thing I am still not clear--maybe at first the size of a file is smaller than 128KB(or user-defined value), zfs can adopt some block size as you described, but when the size becomes more than 128KB by reason of appending, then should it adopt the "bigger" strategy? If so, what would happen to the blocks? I guess that the size of those blocks which are allocated when the size of the file is smaller than 128KB remains unchanged, while those new blocks allocated when the file size has exceeded 128KB would adopt new strategy. Is that right? Thanks! This message posted from opensolaris.org
Files are stored as either a single record (ajusted to the size of the file) multiple number of fixed size records. -r Le 25 ao?t 08 ? 09:21, Robert a ?crit :> Thanks for your response, from which I have known more details. > However, there is one thing I am still not clear--maybe at first the > size of a file is smaller than 128KB(or user-defined value), zfs can > adopt some block size as you described, but when the size becomes > more than 128KB by reason of appending, then should it adopt the > "bigger" strategy? If so, what would happen to the blocks? I guess > that the size of those blocks which are allocated when the size of > the file is smaller than 128KB remains unchanged, while those new > blocks allocated when the file size has exceeded 128KB would adopt > new strategy. > Is that right? > Thanks! > > > This message posted from opensolaris.org > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss