<div dir="ltr">I see.<div>So using bulk_stat ioctl in similar way to xfs_fsr and summing allocated size will result with more accurate number?</div><div><br></div><div>Thanks,</div><div>Danny</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 24, 2016 at 4:17 PM, Eric Sandeen <span dir="ltr"><<a href="mailto:sandeen@sandeen.net" target="_blank">sandeen@sandeen.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 6/24/16 5:34 AM, Danny Shavit wrote:<br>
>> How do you determine allocated_size, with du?<br>
> yes via du<br>
>> How different? Can you show an example?<br>
</span>> meta data file size= 5.6 GB (*6,089,374,208*)<br>
><br>
> *df:*<br>
<span class="">> Filesystem 1K-blocks Used Available Use% Mounted on<br>
> /dev/dm-39 <a href="tel:2725683200" value="+12725683200">2725683200</a> 955900860 1769782340 36% /export/v1 = 978,842,480,640 bytes<br>
><br>
</span>> *du:* du -s /export/v1/<br>
<span class="">> 952825644 /export/v1/ = 975,693,459,456 bytes<br>
> 978,842,480,640 -975,693,459,456 =<br>
><br>
</span>> Metadata size according to calculation=*3,149,021,184* bytes<br>
<br>
Oh, right. I should have thought of this; "du" counts some metadata as<br>
well, i.e. a directory full of zero-length files still consumes space<br>
which is reported by du.<br>
<br>
so your 975,693,459,456 bytes is file data as well as some metadata.<br>
<br>
-Eric<br>
<br>
><br>
> Thanks,<br>
> Danny<br>
<span class="">><br>
> On Thu, Jun 23, 2016 at 9:12 PM, Eric Sandeen <<a href="mailto:sandeen@sandeen.net">sandeen@sandeen.net</a> <mailto:<a href="mailto:sandeen@sandeen.net">sandeen@sandeen.net</a>>> wrote:<br>
><br>
> On 6/23/16 10:04 AM, Danny Shavit wrote:<br>
> > I see. We will try this direction.<br>
> > BTW: I thought that good estimate would be "volume_size -<br>
> > allocated_size - free_space". But it produced quite a difference<br>
> > compared to metadata dump size.<br>
> > Is there a specific reason?<br>
><br>
> How do you determine allocated_size, with du?<br>
><br>
> How different? Can you show an example?<br>
><br>
> -Eric<br>
><br>
> > Thanks,<br>
> > Danny<br>
> ><br>
</span><span class="">> > On Thu, Jun 23, 2016 at 1:51 AM, Dave Chinner <<a href="mailto:david@fromorbit.com">david@fromorbit.com</a> <mailto:<a href="mailto:david@fromorbit.com">david@fromorbit.com</a>> <mailto:<a href="mailto:david@fromorbit.com">david@fromorbit.com</a> <mailto:<a href="mailto:david@fromorbit.com">david@fromorbit.com</a>>>> wrote:<br>
> ><br>
> > On Wed, Jun 22, 2016 at 06:58:16PM +0300, Danny Shavit wrote:<br>
> > > Hi,<br>
> > ><br>
> > > We are looking for a method to estimate the size of metadata overhead for a<br>
> > > given file system.<br>
> > > We would like to use this value as indicator for the amount of cache memory<br>
> > > a system for faster operation.<br>
> > > Are there any counters that are maintained in the on-disk data<br>
> > > structures like free space for examples?<br>
> ><br>
> > No.<br>
> ><br>
> > Right now, you'll need to take a metadump of the filesystem to<br>
> > measure it. The size of the dump file will be a close indication of<br>
> > the amount of metadata in the filesystem as it only contains<br>
> > the filesystem metadata.<br>
> ><br>
> > In future, querying the rmap will enable us to calculate it on the<br>
> > fly, (i.e. not requiring the filesystem to be snapshotted/taken off<br>
> > line to do a metadump).<br>
> ><br>
> > Cheers,<br>
> ><br>
> > Dave.<br>
> > --<br>
> > Dave Chinner<br>
</span>> > <a href="mailto:david@fromorbit.com">david@fromorbit.com</a> <mailto:<a href="mailto:david@fromorbit.com">david@fromorbit.com</a>> <mailto:<a href="mailto:david@fromorbit.com">david@fromorbit.com</a> <mailto:<a href="mailto:david@fromorbit.com">david@fromorbit.com</a>>><br>
<span class="">> ><br>
> ><br>
> ><br>
> ><br>
> > --<br>
> > Regards,<br>
> > Danny<br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > xfs mailing list<br>
</span>> > <a href="mailto:xfs@oss.sgi.com">xfs@oss.sgi.com</a> <mailto:<a href="mailto:xfs@oss.sgi.com">xfs@oss.sgi.com</a>><br>
<span class="">> > <a href="http://oss.sgi.com/mailman/listinfo/xfs" rel="noreferrer" target="_blank">http://oss.sgi.com/mailman/listinfo/xfs</a><br>
> ><br>
><br>
> _______________________________________________<br>
> xfs mailing list<br>
</span>> <a href="mailto:xfs@oss.sgi.com">xfs@oss.sgi.com</a> <mailto:<a href="mailto:xfs@oss.sgi.com">xfs@oss.sgi.com</a>><br>
<div class="HOEnZb"><div class="h5">> <a href="http://oss.sgi.com/mailman/listinfo/xfs" rel="noreferrer" target="_blank">http://oss.sgi.com/mailman/listinfo/xfs</a><br>
><br>
><br>
><br>
><br>
> --<br>
> Regards,<br>
> Danny<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Regards,<br></div>Danny<br></div></div>
</div>