<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=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@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:0cm;
        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;}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:868252903;
        mso-list-template-ids:360191880;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:72.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:"Courier New";
        mso-bidi-font-family:"Times New Roman";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:108.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:144.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:180.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:216.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:252.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:288.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:324.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></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-CH" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Hello Venkat,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Thank you very much, upgrading to 5.0.4.1 did indeed fix the issue. AFM now compiles the list of pending changes in a few hours. Before we estimated >20days.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">We had to increase disk space in /var/mmfs/afm/ and /var/mmfs/tmp/  to allow AFM to store all intermediate file lists. The manual did  recommend to provide much disk space in /var/mmfs/afm/
 only, but some processes doing a resync placed lists in /var/mmfs/tmp/, too.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Heiner<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black"><gpfsug-discuss-bounces@spectrumscale.org> on behalf of Venkateswara R Puvvada <vpuvvada@in.ibm.com><br>
<b>Reply to: </b>gpfsug main discussion list <gpfsug-discuss@spectrumscale.org><br>
<b>Date: </b>Tuesday, 14 January 2020 at 17:51<br>
<b>To: </b>gpfsug main discussion list <gpfsug-discuss@spectrumscale.org><br>
<b>Subject: </b>Re: [gpfsug-discuss] AFM Recovery of SW cache does a full scan of home - is this to be expected?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt">Hi,</span><br>
<br>
<span style="font-size:10.0pt">>The dirtyDirs file holds 130’000 lines, which don’t seem to be so many. But dirtyDirDirents holds about 80M entries.  Can we estimate how long it will take to finish processing?</span><br>
<br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif">Yes, this is the major problem fixed as mentioned in the APAR below. The
</span><span style="font-size:10.0pt">dirtyDirs </span><span style="font-size:10.0pt;font-family:"Arial",sans-serif">file is opened for the each entry in the
</span><span style="font-size:10.0pt">dirtyDirDirents </span><span style="font-size:10.0pt;font-family:"Arial",sans-serif">file, and this causes the performance overhead.</span><br>
<br>
<span style="font-size:10.0pt">>At the moment all we can do is to wait? We run version 5.0.2.3. Would version 5.0.3 or 5.0.4 show a different behavior? Is this fixed/improved in a later release?
</span><br>
<span style="font-size:10.0pt">>There probably is no way to flush the pending queue entries while recovery is ongoing?</span><br>
<br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif">Later versions have the fix mentioned in that APAR, and I believe it should fix the your current performance issue. Flushing the pending queue entries is not avaible as of today (5.0.4), we are currently
 working on this feature.</span><br>
<br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif">~Venkat (vpuvvada@in.ibm.com)</span><br>
<br>
<br>
<br>
<span style="font-size:7.5pt;font-family:"Arial",sans-serif;color:#5F5F5F">From:        </span><span style="font-size:7.5pt;font-family:"Arial",sans-serif">"Billich  Heinrich Rainer (ID SD)" <heinrich.billich@id.ethz.ch></span><br>
<span style="font-size:7.5pt;font-family:"Arial",sans-serif;color:#5F5F5F">To:        </span><span style="font-size:7.5pt;font-family:"Arial",sans-serif">gpfsug main discussion list <gpfsug-discuss@spectrumscale.org></span><br>
<span style="font-size:7.5pt;font-family:"Arial",sans-serif;color:#5F5F5F">Date:        </span><span style="font-size:7.5pt;font-family:"Arial",sans-serif">01/13/2020 05:29 PM</span><br>
<span style="font-size:7.5pt;font-family:"Arial",sans-serif;color:#5F5F5F">Subject:        </span><span style="font-size:7.5pt;font-family:"Arial",sans-serif">[EXTERNAL] Re: [gpfsug-discuss] AFM Recovery of SW cache does a full scan of home - is this to be
 expected?</span><br>
<span style="font-size:7.5pt;font-family:"Arial",sans-serif;color:#5F5F5F">Sent by:        </span><span style="font-size:7.5pt;font-family:"Arial",sans-serif">gpfsug-discuss-bounces@spectrumscale.org</span><o:p></o:p></p>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="0" width="100%" noshade="" style="color:#A0A0A0" align="center">
</div>
<p class="MsoNormal"><br>
<br>
<br>
<span style="font-size:10.0pt">Hello Venkat,</span><br>
<span style="font-size:10.0pt"> </span><br>
<span style="font-size:10.0pt">thank you, this  seems to match our issue.  did trace tspcachescan and do see a long series of open()/read()/close() to the dirtyDirs file. The dirtyDirs file holds 130’000 lines, which don’t seem to be so many. But dirtyDirDirents
 holds about 80M entries.  Can we estimate how long it will take to finish processing?</span><br>
<span style="font-size:10.0pt"> </span><br>
<span style="font-size:10.0pt">tspcachescan does the following again and again for different directories</span><br>
<span style="font-size:10.0pt"> </span><br>
<span style="font-size:10.0pt">11:11:36.837032 stat("/fs3101/XXXXX/.snapshots/XXXXX.afm.75872/yyyyy/yyyy", {st_mode=S_IFDIR|0770, st_size=4096, ...}) = 0</span><br>
<span style="font-size:10.0pt">11:11:36.837092 open("/var/mmfs/afm/fs3101-43/recovery/policylist.data.list.dirtyDirs", O_RDONLY) = 8</span><br>
<span style="font-size:10.0pt">11:11:36.837127 fstat(8, {st_mode=S_IFREG|0600, st_size=32564140, ...}) = 0</span><br>
<span style="font-size:10.0pt">11:11:36.837160 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x3fff96930000</span><br>
<span style="font-size:10.0pt">11:11:36.837192 read(8, "539492355 65537 2795  553648131 "..., 8192) = 8192</span><br>
<span style="font-size:10.0pt">11:11:36.837317 read(8, "Caches/com.apple.helpd/Generated"..., 8192) = 8192</span><br>
<span style="font-size:10.0pt">11:11:36.837439 read(8, "ish\n539848852 1509237202 2795  5"..., 8192) = 8192</span><br>
<span style="font-size:10.0pt">Many more reads</span><br>
<span style="font-size:10.0pt">11:11:36.864104 close(8)                = 0</span><br>
<span style="font-size:10.0pt">11:11:36.864135 munmap(0x3fff96930000, 8192) = 0</span><br>
<span style="font-size:10.0pt"> </span><br>
<span style="font-size:10.0pt">A single iteration takes about 27ms. Doing this 130’000 times would be o.k., but if tspcachescan does it 80M times we wait 600hours. Is there a way to estimate how many iteration tspcachescan will do? The cache fileset holds 140M
 inodes.</span><br>
<span style="font-size:10.0pt"> </span><br>
<span style="font-size:10.0pt">At the moment all we can do is to wait? We run version 5.0.2.3. Would version 5.0.3 or 5.0.4 show a different behavior? Is this fixed/improved in a later release?
</span><br>
<span style="font-size:10.0pt"> </span><br>
<span style="font-size:10.0pt">There probably is no way to flush the pending queue entries while recovery is ongoing?</span><br>
<span style="font-size:10.0pt"> </span><br>
<span style="font-size:10.0pt">I did open a case with IBM TS003219893 and will continue there.</span><br>
<span style="font-size:10.0pt"> </span><br>
<span style="font-size:10.0pt">Kind regards,</span><br>
<span style="font-size:10.0pt"> </span><br>
<span style="font-size:10.0pt">Heiner</span><br>
<span style="font-size:10.0pt"> </span><br>
<span style="font-size:10.0pt"> </span><br>
<span style="font-size:10.0pt"> </span><br>
<span style="font-size:10.0pt"> </span><br>
<span style="font-size:10.0pt"> </span><br>
<b><span style="font-size:12.0pt">From: </span></b><span style="font-size:12.0pt"><gpfsug-discuss-bounces@spectrumscale.org> on behalf of Venkateswara R Puvvada <vpuvvada@in.ibm.com><b><br>
Reply to: </b>gpfsug main discussion list <gpfsug-discuss@spectrumscale.org><b><br>
Date: </b>Monday, 13 January 2020 at 08:40<b><br>
To: </b>gpfsug main discussion list <gpfsug-discuss@spectrumscale.org><b><br>
Subject: </b>Re: [gpfsug-discuss] AFM Recovery of SW cache does a full scan of home - is this to be expected?</span><br>
<span style="font-size:10.0pt"> </span><br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif">AFM maintains in-memory queue at the gateway node to keep track of changes happening on the fileset. If the in-memory queue is lost (memory pressure, daemon shutdown etc..), AFM runs recovery process
 which involves creating the snapshot, running the policy scan and finally queueing the recovered operations.  Due to message (operations) dependency, any changes to the AFM fileset during the recovery won't get replicated until the recovery the completion.
 AFM does the home directory scan for only dirty directories  to get the names of the deleted and renamed files because old name for renamed file and deleted file name are not available at the cache on disk. Directories are made dirty when there is a rename
 or unlink operation is performed inside it.  In your case it may be that all the directories became dirty due to the rename/unlink operations. AFM recovery process is single threaded.</span><span style="font-size:10.0pt"><br>
<br>
>Is this to be expected and normal behavior?  What to do about it?<br>
>Will every reboot of a gateway node trigger a recovery of all afm filesets and a full scan of home? This would make normal rolling updates  very unpractical, or is there some better way?<br>
<br>
Only  for the dirty directories, see above.<br>
<br>
>Home is a gpfs cluster, hence we easily could produce the needed filelist on home with a policyscan in a few minutes.<br>
</span><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><br>
There is some work going on to preserve  the  file names of the unlinked/renamed files  in the cache until they get replicated to home so that home directory scan can be avoided.</span><span style="font-size:10.0pt"><br>
</span><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><br>
These are some issues fixed in this regard. What is the scale version ?</span><span style="font-size:10.0pt"><br>
<u><span style="color:blue"><br>
</span></u></span><a href="https://www-01.ibm.com/support/docview.wss?uid=isg1IJ15436"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">https://www-01.ibm.com/support/docview.wss?uid=isg1IJ15436</span></a><span style="font-size:10.0pt"><br>
</span><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><br>
~Venkat (vpuvvada@in.ibm.com)</span><span style="font-size:10.0pt"><br>
<br>
<br>
</span><span style="font-size:7.5pt;font-family:"Arial",sans-serif;color:#5F5F5F"><br>
From:        </span><span style="font-size:7.5pt;font-family:"Arial",sans-serif">"Billich  Heinrich Rainer (ID SD)" <heinrich.billich@id.ethz.ch><span style="color:#5F5F5F"><br>
To:        </span>gpfsug main discussion list <gpfsug-discuss@spectrumscale.org><span style="color:#5F5F5F"><br>
Date:        </span>01/08/2020 10:32 PM<span style="color:#5F5F5F"><br>
Subject:        </span>[EXTERNAL] [gpfsug-discuss] AFM Recovery of SW cache does a full scan of home - is this to be expected?<span style="color:#5F5F5F"><br>
Sent by:        </span>gpfsug-discuss-bounces@spectrumscale.org</span> <o:p></o:p></p>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="0" width="100%" noshade="" style="color:#A0A0A0" align="center">
</div>
<p class="MsoNormal"><br>
<span style="font-size:10.0pt"><br>
<br>
<br>
Hello,<br>
<br>
<br>
still new to AFM, so some basic question on how Recovery works for a SW cache:<br>
<br>
we have an AFM SW cache in recovery mode – recovery first did run policies on the cache cluster, but now I see a ‘tcpcachescan’ process on cache slowly scanning home via nfs. Single host, single process, no parallelism as far as I can see, but I may be wrong.
 This scan of home on a cache afmgateway takes very long while further updates on cache queue up. Home has about 100M files. After 8hours I see about 70M entries in the file /var/mmfs/afm/…/recovery/homelist, i.e. we get about 2500 lines/s.  (We may have very
 many changes on cache due to some recursive ACL operations, but I’m not sure.)<br>
<br>
So I expect that 12hours pass to buildup filelists before recovery starts to update home. I see some risk: In this time new changes pile up on cache. Memory may become an issue? Cache may fill up and we can’t evict?<br>
<br>
I wonder </span><o:p></o:p></p>
<ul type="disc">
<li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1">
<span style="font-size:10.0pt">Is this to be expected and normal behavior?  What to do about it?</span><o:p></o:p></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1">
<span style="font-size:10.0pt">Will every reboot of a gateway node trigger a recovery of all afm filesets and a full scan of home? This would make normal rolling updates  very unpractical, or is there some better way?</span><o:p></o:p></li></ul>
<p class="MsoNormal"><span style="font-size:10.0pt"> <br>
Home is a gpfs cluster, hence we easily could produce the needed filelist on home with a policyscan in a few minutes.<br>
<br>
Thank you, I will welcome and clarification, advice or comments.<br>
<br>
Kind regards,<br>
<br>
Heiner<br>
.<br>
<br>
-- </span><span style="font-size:7.5pt;font-family:"Arial",sans-serif;color:#104160"><br>
=======================<br>
Heinrich Billich<br>
ETH Zürich<br>
Informatikdienste<br>
Tel.: +41 44 632 72 56<br>
heinrich.billich@id.ethz.ch<br>
========================</span><span style="font-size:10.0pt"><br>
<br>
<br>
</span><span style="font-size:10.0pt;font-family:"Courier New"">_______________________________________________<br>
gpfsug-discuss mailing list<br>
gpfsug-discuss at spectrumscale.org</span><u><span style="font-size:10.0pt;color:blue"><br>
</span></u><a href="http://gpfsug.org/mailman/listinfo/gpfsug-discuss"><span style="font-size:10.0pt;font-family:"Courier New"">http://gpfsug.org/mailman/listinfo/gpfsug-discuss</span></a><span style="font-size:10.0pt"><br>
<br>
<br>
<br>
</span><tt><span style="font-size:10.0pt">_______________________________________________</span></tt><span style="font-size:10.0pt;font-family:"Courier New""><br>
<tt>gpfsug-discuss mailing list</tt><br>
<tt>gpfsug-discuss at spectrumscale.org</tt><br>
</span><a href="http://gpfsug.org/mailman/listinfo/gpfsug-discuss"><tt><span style="font-size:10.0pt">http://gpfsug.org/mailman/listinfo/gpfsug-discuss</span></tt></a><span style="font-size:10.0pt;font-family:"Courier New""><br>
</span><br>
<br>
<br>
<br>
<o:p></o:p></p>
</div>
</body>
</html>