Re: CephFS and calculation of directory size

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

 



On Mon, Sep 12, 2016 at 11:00 AM, Ilya Moldovan <il.moldovan@xxxxxxxxx> wrote:
> Thanks, John
>
> But why listing files in a directory with about a million files takes
> about 30 minutes?

Unless you've enabled experimental features, you're trying to read in
a single 1-million-inode directory object — and it sounds like the MDS
is succeeding. But by default the MDS cache size is only 100k
dentries, so it immediately trims most of the directory out of cache;
then the client submits a request for the next chunk and it does it
again, etc etc.

So, assuming you have the RAM, try setting "mds cache size = 2000000"
or something, then see how it behaves. And consider not trying to
create directories that large if you don't need to — we have plans for
handling it much more gracefully in the future (in fact the code is
one of the experimental features) but it's not enabled in Jewel.
-Greg

>
> Ilya Moldovan
>
> 2016-09-08 20:59 GMT+03:00, Ilya Moldovan <il.moldovan@xxxxxxxxx>:
>> Hello!
>>
>> How CephFS calculates the directory size? As I know there is two
>> implementations:
>>
>> 1. Recursive directory traversal like in EXT4 and NTFS
>> 2. Calculation of the directory size by the file system driver and save it
>> as an attribute. In this case, the driver catches adding, deleting and
>> editing files on the fly and changes the size of the directory. In this
>> case there is no need recursive directory traversal.
>>
>> The directory which we are requesting a size can potentially contain
>> thousands of files at different levels of nesting.
>>
>> Our components will call the the directory size using the POSIX API. The
>> number of calls of this attribute is will be high and recursive directory
>> traversal is not suitable for us.
>>
>> Thanks for the answers!
>>
> _______________________________________________
> ceph-users mailing list
> ceph-users@xxxxxxxxxxxxxx
> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com




[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux