<div class="socmaildefaultfont" dir="ltr" style="font-family:Arial, Helvetica, sans-serif;font-size:10pt" ><div dir="ltr" >NFSv3 doesn't have open/close requests, so nfs-ganesha opens a file for read/write when there is an NFSv3 read/write request. It does cache file descriptors, so its open count can be very large. If you have 'Cache_FDs = true" in your config, ganesha aggressively caches file descriptors. </div>
<div dir="ltr" > </div>
<div dir="ltr" >Taking traces with COMPONENT_CACHE_INODE_LRU level set to full debug should give us better insight on what is happening when the the open file descriptors count is very high.</div>
<div dir="ltr" > </div>
<div dir="ltr" >When the I/O failure happens or when the open fd count is high, you could do the following:</div>
<div dir="ltr" > </div>
<div dir="ltr" >1. ganesha_mgr set_log COMPONENT_CACHE_INODE_LRU FULL_DEBUG</div>
<div dir="ltr" >2. wait for 90 seconds, then run</div>
<div dir="ltr" >3. ganesha_mgr set_log COMPONENT_CACHE_INODE_LRU EVENT<br>  </div>
<div dir="ltr" >Regards, Malahal.</div>
<div dir="ltr" > </div>
<blockquote data-history-content-modified="1" data-history-expanded="1" dir="ltr" style="border-left:solid #aaaaaa 2px; margin-left:5px; padding-left:5px; direction:ltr; margin-right:0px" >----- Original message -----<br>From: "Billich Heinrich Rainer (ID SD)" <heinrich.billich@id.ethz.ch><br>Sent by: gpfsug-discuss-bounces@spectrumscale.org<br>To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org><br>Cc:<br>Subject: [EXTERNAL] [gpfsug-discuss] Ganesha daemon has 400'000 open files - is this unusual?<br>Date: Thu, Sep 19, 2019 7:51 PM<br> <br><!--Notes ACF
<meta http-equiv="Content-Type" content="text/html; charset=utf8" >-->
<div><p style="margin: 0px;" ><span style="font-size:11.0pt" ><o:p> </o:p></span></p>
<p style="margin: 0px;" ><span style="font-size:11.0pt" >Hello,</span><o:p></o:p></p>
<p style="margin: 0px;" ><span style="font-size:11.0pt" > </span><o:p></o:p></p>
<p style="margin: 0px;" ><span style="font-size:11.0pt" >Is it usual to see 200’000-400’000 open files for a single ganesha process? Or does this indicate that something ist wrong?</span><o:p></o:p></p>
<p style="margin: 0px;" ><span style="font-size:11.0pt" > </span><o:p></o:p></p>
<p style="margin: 0px;" ><span style="font-size:11.0pt" >We have some issues with ganesha (on spectrum scale protocol nodes)  reporting NFS3ERR_IO in the log. I noticed that the affected nodes have a large number of open files, 200’000-400’000 open files per daemon (and 500 threads and about 250 client connections). Other nodes have 1’000 – 10’000 open files by ganesha only and don’t show the issue.</span><o:p></o:p></p>
<p style="margin: 0px;" ><span style="font-size:11.0pt" > </span><o:p></o:p></p>
<p style="margin: 0px;" ><span style="font-size:11.0pt" >If someone could explain how ganesha decides which files to keep open and which to close that would help, too. As NFSv3 is stateless the client doesn’t open/close a file, it’s the server to decide when to close it? We do have a few NFSv4 clients, too.</span><o:p></o:p></p>
<p style="margin: 0px;" ><span style="font-size:11.0pt" > </span><o:p></o:p></p>
<p style="margin: 0px;" ><span style="font-size:11.0pt" >Are there certain access patterns that can trigger such a large number of open file? Maybe traversing and reading a large number of small files? </span><o:p></o:p></p>
<p style="margin: 0px;" ><span style="font-size:11.0pt" > </span><o:p></o:p></p>
<p style="margin: 0px;" ><span style="font-size:11.0pt" >Thank you,</span><o:p></o:p></p>
<p style="margin: 0px;" ><span style="font-size:11.0pt" >Heiner</span><o:p></o:p></p>
<p style="margin: 0px;" ><span style="font-size:11.0pt" > </span><o:p></o:p></p>
<p style="margin: 0px;" ><span style="font-size:11.0pt" >I did count the open files  by counting the entries in /proc/<pid of ganesha>/fd/ . With several 100k entries I failed to do a ‘ls -ls’ to list all the symbolic links, hence I can’t relate the open files to different exports easily.<o:p></o:p></span></p>
<p style="margin: 0px;" ><span style="font-size:11.0pt" ><o:p> </o:p></span></p>
<p style="margin: 0px;" ><span style="font-size:11.0pt" >I did post this to the ganesha mailing list, too.<o:p></o:p></span></p>
<p style="margin: 0px;" ><span style="font-size:11.0pt;mso-fareast-language:EN-GB" >-- </span><o:p></o:p></p>
<p style="margin: 0px;" ><span lang="DE" style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#18376A;mso-fareast-language:EN-GB" >=======================</span><o:p></o:p></p>
<p style="margin: 0px;" ><span lang="DE" style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#18376A;mso-fareast-language:EN-GB" >Heinrich Billich</span><o:p></o:p></p>
<p style="margin: 0px;" ><span lang="DE" style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#18376A;mso-fareast-language:EN-GB" >ETH Zürich</span><o:p></o:p></p>
<p style="margin: 0px;" ><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#18376A;mso-fareast-language:EN-GB" >Informatikdienste</span><o:p></o:p></p>
<p style="margin: 0px;" ><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#18376A;mso-fareast-language:EN-GB" >Tel.: +41 44 632 72 56</span><o:p></o:p></p>
<p style="margin: 0px;" ><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#18376A;mso-fareast-language:EN-GB" >heinrich.billich@id.ethz.ch</span><o:p></o:p></p>
<p style="margin: 0px;" ><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#18376A;mso-fareast-language:EN-GB" >========================</span><o:p></o:p></p>
<p style="margin: 0px;" ><span style="font-size:11.0pt;mso-fareast-language:EN-GB" > </span><o:p></o:p></p>
<p style="margin: 0px;" > <o:p></o:p></p></div>
<div><font face="Default Monospace,Courier New,Courier,monospace" size="2" >_______________________________________________<br>gpfsug-discuss mailing list<br>gpfsug-discuss at spectrumscale.org<br><a href="http://gpfsug.org/mailman/listinfo/gpfsug-discuss" target="_blank">http://gpfsug.org/mailman/listinfo/gpfsug-discuss</a> </font></div></blockquote>
<div dir="ltr" > </div></div><BR>