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@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@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, <[email protected]> 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:[email protected]]
> *Sent:* Wednesday, January 20, 2016 9:26 AM
> *To:* Agrawal, Prakrati PTIN-PTT/ICOE; [email protected]
> *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 [[email protected]] on
> behalf of [email protected] [[email protected]]
> *Sent:* Tuesday, January 19, 2016 9:49 PM
> *To:* [email protected]
> *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
> [email protected]
> http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org
>
>


-- 
www: http://paciucci.blogspot.com
_______________________________________________
lustre-discuss mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org

Reply via email to