Re: Consistency vs efficiency

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

 



On Thu, 21 Jul 2011, Jojy Varghese wrote:
> Hi
>   I just started looking at the ceph code in kernel and had a question
> about performance considerations for lookup operations. I noticed that
> for every operation (say copying a directory), the root dentry is
> "looked" up multiple times and since they all go to MDS for the actual
> lookup operation, it effects the performance. I am sure consistency is
> the winner here. Is there any plan to improve this, maybe by having
> MDS push the capability down to the clients when the dentry is
> updated. So say from CAP_EXCL to CAP_SHARED when the dentry is
> modified. This was the client node can cache the lookup operation and
> does not have to make a round trip to the MDS.

In general, the MDS has two ways of keeping a client's cached dentry 
consistent:

 - it can issue the FILE_SHARED capability bit on the parent directory, 
which means the entire directory is static and the client can cache 
dentry.
 - if it can't do that, it will issue a per-dentry lease

There is an additional 'complete' bit that is used to indicate on the 
client that it has the _entire_ directory in cache.  If set, it can do 
negative lookups and readdir without hitting the MDS.  That's currently 
broken, pending the addition of a d_prune dentry_operation (see 
linux-fsdevel email from July 8).

Anyway, long story short, if you're seeing repeated lookups on a dentry 
that isn't changing, something is broken.  Can you describe the workload 
in more detail?  Which versions of the client and mds are you running?

sage

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux