[lustre-discuss] When is getattr() called

PGabriele paciucci at gmail.com
Tue Jan 26 11:23:12 PST 2016


Hi
it is depend on the application. The extreme example is dd.
A command like: dd if=/dev/zero of=test3 bs=1M count=10
is generating only 1 open and 1 close

[root at st30-mds2 lustre]# cat ./mdt/Lustre01-MDT0000/md_stats

snapshot_time             1453835751.924029 secs.usecs

open                      1 samples [reqs]

close                     1 samples [reqs]


but if you have set a layout in advance using las setstripe you get:

# lfs setstripe -c -1 test4

# dd if=/dev/zero of=test4 bs=1M count=10

[root at st30-mds2 lustre]# cat ./mdt/Lustre01-MDT0000/md_stats

snapshot_time             1453835949.562825 secs.usecs

open                      3 samples [reqs]

close                     3 samples [reqs]

setattr                   1 samples [reqs]

getxattr                  1 samples [reqs]

2 opens and 2 close and 1 getxattr for the las command
1 open and 1 close for the dd
1 setattr for the special layout

.... so let's strace your app and see why there are so many getattr....
modern version of lustre can get advantage of local matter cache... take a
look at:
lctl get_param llite.*.xattr_cache




On 21 January 2016 at 05:05, <Prakrati.Agrawal at shell.com> wrote:

> Hi,
>
>
>
> The thing I want an understanding of is, if my file is say striped across
> OSTs, number of getattr() calls will be equivalent to the number of OSTs if
> I am opening a single file.
>
> I observed that there is 1 open and close op in the ganglia monitoring
> page on MDT but getattr calls are 10 for the same time. I am unable to
> understand the reason for this.
>
>
>
> Thanks and Regards,
>
> Prakrati
>
>
>
> *From:* Patrick Farrell [mailto:paf at cray.com]
> *Sent:* Wednesday, January 20, 2016 9:26 AM
> *To:* Agrawal, Prakrati PTIN-PTT/ICOE; lustre-discuss at lists.lustre.org
> *Subject:* RE: When is getattr() called
>
>
>
> Getattr is returning file attributes, so it's going to be called as part
> of any browsing (ls, depending on options) or scanning (find, du, or
> perhaps RobinHood) of the file system.  Also, many libraries will do
> getattr calls before doing an open, as part of sanity checking a file.
>
>
>
> - Patrick
> ------------------------------
>
> *From:* lustre-discuss [lustre-discuss-bounces at lists.lustre.org] on
> behalf of Prakrati.Agrawal at shell.com [Prakrati.Agrawal at shell.com]
> *Sent:* Tuesday, January 19, 2016 9:49 PM
> *To:* lustre-discuss at lists.lustre.org
> *Subject:* [lustre-discuss] When is getattr() called
>
> Hi,
>
>
>
> I was looking at the MDT parameters on Ganglia and there is a graph which
> shows getattr calls and that is very high as compared to open and close
> calls. Under what scenarios, is getattr called.
>
>
>
> Thanks and Regards,
>
> Prakrati
>
> _______________________________________________
> lustre-discuss mailing list
> lustre-discuss at lists.lustre.org
> http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org
>
>


-- 
www: http://paciucci.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lustre.org/pipermail/lustre-discuss-lustre.org/attachments/20160126/b8ffa9ae/attachment-0001.htm>


More information about the lustre-discuss mailing list