Re: Why nodeid==1 need to be checked and dealt with specially in "fuse-bridge.c"?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for your kind reply. 


In fact, I am in the worst case: all 10000 files in the mount point without using sub-directories. About 436 times fuse_getattr(lookup) need to be called, and 3ms a time(md_cache always miss). That is why fuse_getattr(lookup) takes so high cost. 


Could you tell more about the reason for which the "nodeid==1" need to be checked?  You said "The check makes sure that there is a LOOKUP done on the root of the volume ("/" always has inode "1",GFID "00000000-0000-0000-0000-000000000001"). "

Now I disable the special check, meaning that lookup operation will  be replaced by stat operation? Both will return correct  result to fuse-kernel? What if without the check? 

It works normally now. Could you tell me some cases where it doesn't work?


Thank you!



Best regards,
Zhitao Li
 
Sent from Outlook

From: Niels de Vos <ndevos@xxxxxxxxxx>
Sent: Friday, March 17, 2017 6:12:35 PM
To: Zhitao Li
Cc: gluster-devel@xxxxxxxxxxx; Zhitao Li; 1318078301@xxxxxx
Subject: Re: Why nodeid==1 need to be checked and dealt with specially in "fuse-bridge.c"?
 
On Thu, Mar 16, 2017 at 10:26:25AM +0000, Zhitao Li wrote:
> Hello, everyone,
>
>
> I have been trying to optimize "ls" performance for Glusterfs
> recently. My volume is disperse(48 bricks  with redundancy 16), and I
> mount it with fuse. I create 10000 little files in mount point. Then I
> execute "ls" command. In my cluster, it takes about 3 seconds.
>
> I have a question about fuse_getattr function in "fuse-bridge.c" . Why
> need we check whether nodeid is equal to 1? , which means it is the
> mount point.  It is hard for me to get its meaning.
>
> (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. )
>
>
> [http://mail.163.com/js6/s?func=mbox:getMessageData&sid=iCMbFXtmOmngEsSJqWmmoeUvPJvoWUxS&mid=89:1tbiWQWbqlWBWYAhhQAAsE&part=3]
>
>
>
>
> 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".
>
>
> Could you tell me the meaning of the special check for "nodeid == 1"?

I'm not sure of check in fuse_getattr would account for the
huge performance loss/win in your test. The check makes sure that there
is a LOOKUP done onf the root of the volume ("/" always has inode "1",
GFID "00000000-0000-0000-0000-000000000001"). In the majority of the
cases this should be skipped, unless you run your tests withour using a
sub-directory.

You can use 'gluster volume profile' to get some additional performance
statistics. For simple (single brick, or distribution only) volumes, you
can also use Wireshark (and "tshark -o srt,...") to see what goes over
the (slow) network.

HTH,
Niels
_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
http://lists.gluster.org/mailman/listinfo/gluster-devel

[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux