<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" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<p>Hello, everyone,</p>
<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" style="max-width: 99.9%; user-select: none;" aria-expanded="false" src="cid:7b3a479d-5cd6-4c3a-bc94-8c0e18d0f0c7"><br>
</p>
<p><br>
</p>
<div id="Signature">
<div style="font-size:12pt; color:#000000; background-color:#ffffff; 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; font-size: 16px;">
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; font-size: 16px;">
<br>
</p>
<p style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">
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; font-size: 16px;">
I would appreciate it if anyone could give some tips . Thank you!</p>
<div><br>
</div>
</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: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
Sent from <a href="http://aka.ms/weboutlook" id="LPNoLP">Outlook</a></div>
</div>
</div>
</body>
</html>