<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Developers,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have system with configuration as <o:p></o:p></p>
<p class="MsoNormal">RAM : 4G<o:p></o:p></p>
<p class="MsoNormal">SWAP: 2G<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">On  this system I had created an XFS file system of size 250 GB, I am using xfs_db utility to  get file mapping( file name and inode number ) information using the daddr & corresponding  File system block number.  <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">/dev/sdd1 : 250G filesystem, 13% (29 G) full, aprox 3.5 million files<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Steps executed in getting this information is as below :<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">test#  xfs_db -i -c "convert daddr 6612146 fsb" /dev/sdd1<o:p></o:p></p>
<p class="MsoNormal">0xc9c96 (826518)<o:p></o:p></p>
<p class="MsoNormal">test:~ #  xfs_db -i -c "blockget -n -b 826518" /dev/sdd1<o:p></o:p></p>
<p class="MsoNormal">xfs_db: out of memory<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Utility (xfs_db ) is giving OOM in extracting  block information using “blockget” and in some cases it gives OOM when subcommand “ncheck”of xfs_db.  It is mentioned in the manuals itself that ncheck is memory consuming command. When we
 analysed the command memory map of ncheck using “pmap”  most of the memory is consumed in heap. It’s not utilized by cache memory.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Whether xfs_db stores  information of all the blocks  upto the requested block or it maintains its internal structure. When checking the xfs_db codethen found function call like (push_cur()  etc ) whether it is maintaining its own command
 execution stack. <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Instead of accessing the device itself can we read the metadump file to get the required information of file mapping with file system block number. Its binary file but is there any utility which reads the metadump file itself instead of
 file system image. As it is easier to read the metadump file instead of go towards  disk access itself. There is file obfuscation in the file name for 4 characters
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Whether reading metadump file for getting file mapping with file system block number still consumes same amount of memory or this will not works.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Please provide some reference to either eliminate the OOM (in blockget and ncheck) or any other way either related to accessing metadump file in getting the mapping (fsbno to file name or inode number ). As currently finding out the cause
 of this memory consumption from the source itself whether optimization in finding this mapping information  is possible or not  <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">On finding out solution over the OOM I found reference of xfs_db 64  but there is no 64 bit version of utility available in xfs website either there will be some configuration option or it becomes obsolete.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks & Best Regards <o:p></o:p></p>
<p class="MsoNormal">Anshul Kundra <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<span style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: gray; FONT-SIZE: 7.5pt; mso-fareast-font-family: 'Times New Roman'">
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><br><br><font style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: gray; FONT-SIZE: 9px">::DISCLAIMER::<br>----------------------------------------------------------------------------------------------------------------------------------------------------</font></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><font style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: gray; FONT-SIZE: 11px">The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.<br>E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, <br>lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents <br>(with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. <br>Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the <br>views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, <br>distribution and / or publication of this message without the prior written consent of authorized representative of <br>HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. <br>Before opening any email and/or attachments, please check them for viruses and other defects.</font></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><font style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: gray; FONT-SIZE: 11px">----------------------------------------------------------------------------------------------------------------------------------------------------</font></span></P></body>
</html>