<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p></p>
<p style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;"><span style="font-size: 12pt;">Hello, everyone,</span><br>
</p>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<p><br>
</p>
<p>I have been trying to optimize <b>"ls" performance</b> for Glusterfs recently. <span style="font-size: 12pt;">My volume is disperse(48 bricks with redundancy 16), and I mount it with fuse. </span><span style="font-size: 12pt;">I create 10000 little files
in mount point. Then I execute "ls" command. In my cluster, it takes about 3 seconds.</span></p>
<p>I have a question about <b>fuse_getattr </b>function in "fuse-bridge.c" .<b> Why need we check whether nodeid is equal to 1?</b> , which means it is the mount point. It is hard for me to get its meaning.</p>
<p>(In my case, I find the operation of fuse_getattr takes neer half time for "ls", that is why I want to know what the check means. )</p>
<p><br>
</p>
<p><img naturalheight="490" naturalwidth="697" size="71684" id="img561324" tabindex="0" aria-expanded="false" src="http://mail.163.com/js6/s?func=mbox:getMessageData&sid=iCMbFXtmOmngEsSJqWmmoeUvPJvoWUxS&mid=89:1tbiWQWbqlWBWYAhhQAAsE&part=3" style="border: 0px; max-width: 99.9%; user-select: none;"><br>
</p>
<p><br>
</p>
<div id="Signature">
<div style="font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif;">
<p style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
I try to disable the special check, and then test "ls". It works normally and have a speedup 2x(about 1.3s without check). The reason is that in my case, "lookup" cost is much higher than "stat". Without the special check, getattr goes into "stat" instead of
"lookup".</p>
<p style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<br>
</p>
<p style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
Could you tell me the meaning of the special check for "nodeid == 1"?</p>
<p style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
I would appreciate it if anyone could give some tips . Thank you!</p>
</div>
</div>
</div>
</div>
<br>
<p></p>
<p><br>
</p>
<div id="Signature">
<div style="font-size:12pt; color:#000000; background-color:#ffffff; font-family:Calibri,Arial,Helvetica,sans-serif">
</div>
<div style="font-size:12pt; color:#000000; background-color:#ffffff; font-family:Calibri,Arial,Helvetica,sans-serif">
Best regards,</div>
<div style="font-size:12pt; color:#000000; background-color:#ffffff; font-family:Calibri,Arial,Helvetica,sans-serif">
Zhitao Li</div>
<div style="font-size:12pt; color:#000000; background-color:#ffffff; font-family:Calibri,Arial,Helvetica,sans-serif">
</div>
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#ffffff; font-family:Calibri,Arial,Helvetica,sans-serif">
Sent from <a href="http://aka.ms/weboutlook" id="LPNoLP">Outlook</a></div>
</div>
</div>
</body>
</html>