[Gluster-users] Could we not always call lookup for root_dir in fuse_getattr to improve performance?

2017-03-24 Thread Zhitao Li
Hello, everyone!


I am now optimizing the performance of "ls". When there are many little files 
directly in mount point(root dir of glusterfs), I find that fuse_getattr takes 
near half time of total "ls". Strictly, the nodeid==1 check in fuse_getattr 
will call look operation instead of stat, and lookup will always miss the 
md-cache, so it will do real lookup and cost about 3ms a time in my case.


I doubt whether the special check of nodeid==1 is necessary. I disable the 
check,  it works normal for ls. However, in the "tests" of gluster, it 
fails(quorum.t). In that case, lookup in root_dir is essential.


Up to now, we know that lookup bring high cost in fuse_getattr and it is 
essential in some case. Could anyone give some advice to improve 
fuse_getattr(lookup in root_dir) without bringing bugs?


I have been trying to deal  with this for many days. Your help is greatly in 
need.



Best regards,
Zhitao Li
___
Gluster-users mailing list
Gluster-users@gluster.org
http://lists.gluster.org/mailman/listinfo/gluster-users

Re: [Gluster-users] Could we not always call lookup for root_dir in fuse_getattr to improve performance?

2017-03-24 Thread Zhitao Li
Hello, Amar,


It still fails in quorum test.

The root inode resolution succeeds, and stat is called. It fails because of 
quorum check in afr translator.



Sincerely,
Zhitao

From: Amar Tumballi 
Sent: Friday, March 24, 2017 10:24:53 PM
To: Zhitao Li
Cc: Niels de Vos; Poornima Gurusiddaiah; Gluster Devel; 
gluster-users@gluster.org; Zhitao Li; Zhitao Li
Subject: Re: Could we not always call lookup for root_dir in fuse_getattr to 
improve performance?

Test this patch https://review.gluster.org/#/c/16945/

On Fri, Mar 24, 2017 at 9:42 AM, Zhitao Li 
mailto:zhitaoli1...@outlook.com>> wrote:

Dear Amar,


Thanks very much for your kind help!



I have seen the patch you submit.


I disable the check and do regression test locally. It indeed brings a bug in 
"tests/basic/afr/quorum.t"(for tests/ec/, there exists failure but it is hard 
to reappear the failure).


For quorum test, it fails  in line_no 36. The case is that for a volume with 
replica 2, a brick is killed and quorum-reads is on, quorum-type is fixed. Stat 
on the root_dir will fail because of quorum check(afr/afr-read-txn.c). However, 
lookup will succeed without quorum check. This is what I have got.

So the solution maybe more complex than removing the nodeid==1 check directly.


Thank you!


Best regards,
Zhitao Li

From: Amar Tumballi mailto:atumb...@redhat.com>>
Sent: Friday, March 24, 2017 9:13:35 PM
To: Zhitao Li
Cc: Niels de Vos; Poornima Gurusiddaiah; Gluster Devel; 
gluster-users@gluster.org; Zhitao Li; Zhitao 
Li
Subject: Re: Could we not always call lookup for root_dir in fuse_getattr to 
improve performance?

Went through the code base again. Yes, as you said, we can get rid of 
fuse_getattr() not checking nodeid==1 path.

Patch here:  https://review.gluster.org/16944

-Amar



On Fri, Mar 24, 2017 at 2:57 AM, Zhitao Li 
mailto:zhitaoli1...@outlook.com>> wrote:

Hello, everyone!


I am now optimizing the performance of "ls". When there are many little files 
directly in mount point(root dir of glusterfs), I find that fuse_getattr takes 
near half time of total "ls". Strictly, the nodeid==1 check in fuse_getattr 
will call look operation instead of stat, and lookup will always miss the 
md-cache, so it will do real lookup and cost about 3ms a time in my case.


I doubt whether the special check of nodeid==1 is necessary. I disable the 
check,  it works normal for ls. However, in the "tests" of gluster, it 
fails(quorum.t). In that case, lookup in root_dir is essential.


Up to now, we know that lookup bring high cost in fuse_getattr and it is 
essential in some case. Could anyone give some advice to improve 
fuse_getattr(lookup in root_dir) without bringing bugs?


I have been trying to deal  with this for many days. Your help is greatly in 
need.



Best regards,
Zhitao Li



--
Amar Tumballi (amarts)



--
Amar Tumballi (amarts)
___
Gluster-users mailing list
Gluster-users@gluster.org
http://lists.gluster.org/mailman/listinfo/gluster-users

Re: [Gluster-users] Could we not always call lookup for root_dir in fuse_getattr to improve performance?

2017-03-24 Thread Zhitao Li
Dear Amar,


Thanks very much for your kind help!



I have seen the patch you submit.


I disable the check and do regression test locally. It indeed brings a bug in 
"tests/basic/afr/quorum.t"(for tests/ec/, there exists failure but it is hard 
to reappear the failure).


For quorum test, it fails  in line_no 36. The case is that for a volume with 
replica 2, a brick is killed and quorum-reads is on, quorum-type is fixed. Stat 
on the root_dir will fail because of quorum check(afr/afr-read-txn.c). However, 
lookup will succeed without quorum check. This is what I have got.

So the solution maybe more complex than removing the nodeid==1 check directly.


Thank you!


Best regards,
Zhitao Li

From: Amar Tumballi 
Sent: Friday, March 24, 2017 9:13:35 PM
To: Zhitao Li
Cc: Niels de Vos; Poornima Gurusiddaiah; Gluster Devel; 
gluster-users@gluster.org; Zhitao Li; Zhitao Li
Subject: Re: Could we not always call lookup for root_dir in fuse_getattr to 
improve performance?

Went through the code base again. Yes, as you said, we can get rid of 
fuse_getattr() not checking nodeid==1 path.

Patch here:  https://review.gluster.org/16944

-Amar



On Fri, Mar 24, 2017 at 2:57 AM, Zhitao Li 
mailto:zhitaoli1...@outlook.com>> wrote:

Hello, everyone!


I am now optimizing the performance of "ls". When there are many little files 
directly in mount point(root dir of glusterfs), I find that fuse_getattr takes 
near half time of total "ls". Strictly, the nodeid==1 check in fuse_getattr 
will call look operation instead of stat, and lookup will always miss the 
md-cache, so it will do real lookup and cost about 3ms a time in my case.


I doubt whether the special check of nodeid==1 is necessary. I disable the 
check,  it works normal for ls. However, in the "tests" of gluster, it 
fails(quorum.t). In that case, lookup in root_dir is essential.


Up to now, we know that lookup bring high cost in fuse_getattr and it is 
essential in some case. Could anyone give some advice to improve 
fuse_getattr(lookup in root_dir) without bringing bugs?


I have been trying to deal  with this for many days. Your help is greatly in 
need.



Best regards,
Zhitao Li



--
Amar Tumballi (amarts)
___
Gluster-users mailing list
Gluster-users@gluster.org
http://lists.gluster.org/mailman/listinfo/gluster-users

Re: [Gluster-users] Could we not always call lookup for root_dir in fuse_getattr to improve performance?

2017-03-24 Thread Amar Tumballi
Test this patch https://review.gluster.org/#/c/16945/

On Fri, Mar 24, 2017 at 9:42 AM, Zhitao Li  wrote:

> Dear Amar,
>
>
> Thanks very much for your kind help!
>
>
>
> I have seen the patch you submit.
>
>
> I disable the check and do regression test locally. It indeed *brings a
> bug in "tests/basic/afr/quorum.t"*(for tests/ec/, there exists failure
> but it is hard to reappear the failure).
>
>
> For quorum test, it fails  in line_no 36. The case is that for a volume
> with replica 2, a brick is killed and quorum-reads is on, quorum-type is
> fixed. Stat on the root_dir will fail because of quorum
> check(afr/afr-read-txn.c). However, lookup will succeed without
> quorum check. This is what I have got.
>
> So the solution maybe more complex than removing the nodeid==1 check
> directly.
>
>
> Thank you!
>
> Best regards,
> Zhitao Li
> --
> *From:* Amar Tumballi 
> *Sent:* Friday, March 24, 2017 9:13:35 PM
> *To:* Zhitao Li
> *Cc:* Niels de Vos; Poornima Gurusiddaiah; Gluster Devel;
> gluster-users@gluster.org; Zhitao Li; Zhitao Li
> *Subject:* Re: Could we not always call lookup for root_dir in
> fuse_getattr to improve performance?
>
> Went through the code base again. Yes, as you said, we can get rid of
> fuse_getattr() not checking nodeid==1 path.
>
> Patch here:  https://review.gluster.org/16944
>
> -Amar
>
>
>
> On Fri, Mar 24, 2017 at 2:57 AM, Zhitao Li 
> wrote:
>
>> Hello, everyone!
>>
>>
>> I am now optimizing the performance of "ls". When there are many little
>> files directly in mount point(root dir of glusterfs), I find that
>> fuse_getattr takes near half time of total "ls". Strictly, the nodeid==1
>> check in fuse_getattr will call look operation instead of stat, and lookup
>> will always miss the md-cache, so it will do real lookup and cost about 3ms
>> a time in my case.
>>
>>
>> I doubt whether the special check of nodeid==1 is necessary. I disable
>> the check,  it works normal for ls. However, in the "tests" of gluster, it
>> fails(quorum.t). In that case, lookup in root_dir is essential.
>>
>>
>> Up to now, we know that lookup bring high cost in fuse_getattr and it is
>> essential in some case. Could anyone give some advice to improve
>> fuse_getattr(lookup in root_dir) without bringing bugs?
>>
>>
>> I have been trying to deal  with this for many days. Your help is greatly
>> in need.
>>
>>
>>
>> Best regards,
>> Zhitao Li
>>
>
>
>
> --
> Amar Tumballi (amarts)
>



-- 
Amar Tumballi (amarts)
___
Gluster-users mailing list
Gluster-users@gluster.org
http://lists.gluster.org/mailman/listinfo/gluster-users

[Gluster-users] Gluster Limitation with ACL on Kernel NFS

2017-03-24 Thread ABHISHEK PALIWAL
Hi Team,

I am using gluster with kernel nfs and  found one limitation with Gluster
volume don't know whether it is Bug or expected.

Below is the scenario:

I am mounting gluster volume as well as NFS volume with '-o acl' options

I have tested gluster volume with ACLs and found that if we set the ACLs
either before or after export on gluster mount point it will get reflect on
exported NFS volume only if we mount it after ACL are applied on gluster
volume.

Also, if NFS volume is already mounted  then only first rule will get
reflect on NFS exported volume.


Could anyone tell me the possibility what is the problem here.
-- 

Regards
Abhishek Paliwal
___
Gluster-users mailing list
Gluster-users@gluster.org
http://lists.gluster.org/mailman/listinfo/gluster-users

Re: [Gluster-users] When gfid set?

2017-03-24 Thread Amar Tumballi
On Fri, Mar 24, 2017 at 5:55 AM, Tahereh Fattahi 
wrote:

> Hi
> I want to know when I create a file, when gfid for that file is set? In
> which translator?
>
>
Any 'entry' translator, like fuse,nfs,libgfapi etc.

Regards,
Amar



> ___
> Gluster-users mailing list
> Gluster-users@gluster.org
> http://lists.gluster.org/mailman/listinfo/gluster-users
>



-- 
Amar Tumballi (amarts)
___
Gluster-users mailing list
Gluster-users@gluster.org
http://lists.gluster.org/mailman/listinfo/gluster-users

Re: [Gluster-users] Could we not always call lookup for root_dir in fuse_getattr to improve performance?

2017-03-24 Thread Amar Tumballi
Went through the code base again. Yes, as you said, we can get rid of
fuse_getattr() not checking nodeid==1 path.

Patch here:  https://review.gluster.org/16944

-Amar



On Fri, Mar 24, 2017 at 2:57 AM, Zhitao Li  wrote:

> Hello, everyone!
>
>
> I am now optimizing the performance of "ls". When there are many little
> files directly in mount point(root dir of glusterfs), I find that
> fuse_getattr takes near half time of total "ls". Strictly, the nodeid==1
> check in fuse_getattr will call look operation instead of stat, and lookup
> will always miss the md-cache, so it will do real lookup and cost about 3ms
> a time in my case.
>
>
> I doubt whether the special check of nodeid==1 is necessary. I disable the
> check,  it works normal for ls. However, in the "tests" of gluster, it
> fails(quorum.t). In that case, lookup in root_dir is essential.
>
>
> Up to now, we know that lookup bring high cost in fuse_getattr and it is
> essential in some case. Could anyone give some advice to improve
> fuse_getattr(lookup in root_dir) without bringing bugs?
>
>
> I have been trying to deal  with this for many days. Your help is greatly
> in need.
>
>
>
> Best regards,
> Zhitao Li
>



-- 
Amar Tumballi (amarts)
___
Gluster-users mailing list
Gluster-users@gluster.org
http://lists.gluster.org/mailman/listinfo/gluster-users

[Gluster-users] When gfid set?

2017-03-24 Thread Tahereh Fattahi
Hi
I want to know when I create a file, when gfid for that file is set? In
which translator?
___
Gluster-users mailing list
Gluster-users@gluster.org
http://lists.gluster.org/mailman/listinfo/gluster-users