Edward Ned Harvey (opensolarisisdeadlongliveopensolaris)
2012-Sep-26 17:28 UTC
[zfs-discuss] zvol refreservation size
When I create a 50G zvol, it gets "volsize" 50G, and it gets "used" and "refreservation" 51.6G I have some filesystems already in use, hosting VM''s, and I''d like to mimic the refreservation setting on the filesystem, as if I were smart enough from the beginning to have used the zvol. So my question is ... What''s the extra 1.6G for? And If I have a filesystem holding a single VM with a single 2T disk, how large should the refreservation be? If it''s a linear scale, it should be 2.064T refreservation. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20120926/2ed944eb/attachment-0001.html>
On Wed, Sep 26, 2012 at 10:28 AM, Edward Ned Harvey (opensolarisisdeadlongliveopensolaris) < opensolarisisdeadlongliveopensolaris at nedharvey.com> wrote:> When I create a 50G zvol, it gets "volsize" 50G, and it gets "used" and " > refreservation" 51.6G**** > > ** ** > > I have some filesystems already in use, hosting VM''s, and I''d like to > mimic the refreservation setting on the filesystem, as if I were smart > enough from the beginning to have used the zvol. So my question is ...*** > * > > ** ** > > What''s the extra 1.6G for? >It is for metadata -- the indirect blocks required to reference the 50G of data.> **** > > And**** > > If I have a filesystem holding a single VM with a single 2T disk, how > large should the refreservation be?**** > > ** ** > > If it''s a linear scale, it should be 2.064T refreservation. >For a filesystem, we can''t exactly predict how much metadata will be needed because it depends on how it is used (many small files vs few large files). For zvols, we can predict it exactly because we know it''s just one big object. See zvol_volsize_to_reservation() for details. Your case of a single large file can be treated like a zvol. If your filesystem has the same recordsize[*] (default is 128k) as the zvol''s volblocksize (default is 8k), then you can linearly scale that 3% with the file size. If you are using a different recordsize, you can linearly scale the amount of metadata (larger recordsize -> less metadata). --matt [*] Note that the big file''s recordsize is set when it is created, so what matters is what the recordsize was when the file was created. Changing the recordsize property after it''s created won''t change the metadata layout of the file. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20120926/35f0783a/attachment.html>