CephFS: What is the maximum number of files per directory
Hi, What is the maximum number of files per directory? I could find the answer in the docs. Best, Martin
So here is the answer from the docs https://docs.ceph.com/docs/master/cephfs/app-best-practices/ There isnt a physical limit but you may well hit operational issues with some tools. Best practice would be to create some sort of directory tree and not just dump all the files you have into a single directory. Darren Sent from my iPhone On 24 Jun 2020, at 07:57, Martin Palma <martin@palma.bz> wrote: Hi, What is the maximum number of files per directory? I could find the answer in the docs. Best, Martin _______________________________________________ ceph-users mailing list -- ceph-users@ceph.io To unsubscribe send an email to ceph-users-leave@ceph.io
Just an anecdotal answer from me... You want as few files as possible. I wouldn't go beyond a few hundred files in a dir. Seeing ~1s for each 1,000 files when I "ls". But this is in a pretty idle directory. When there were files actively being written to those dirs and being read, just doing "ls" on the directories was very very slow (in the order of minutes) I have a single MDS setup with cephfs metadata on SSDs. MDS cache at 20GB, 6 million inodes, approaching 10k reqs/s. $ for i in `ls --color=none | head -50 | tail -10`; do echo; echo -n "file count in dir: "; time ls $i | wc -l; done file count in dir: 4354 real 0m4.129s user 0m0.029s sys 0m0.179s file count in dir: 3064 real 0m2.847s user 0m0.027s sys 0m0.127s file count in dir: 1770 real 0m1.658s user 0m0.026s sys 0m0.075s
Hi Martin, Default setting is 100000 files. Its not a simple variable change. "By default, this is set to 10 times the split size, giving a dirfrag size limit of 100000." https://docs.ceph.com/docs/master/cephfs/dirfrags/ Configuring Directory fragmentation — Ceph Documentation<https://docs.ceph.com/docs/master/cephfs/dirfrags/> Configuring Directory fragmentation¶. In CephFS, directories are fragmented when they become very large or very busy. This splits up the metadata so that it can be shared between multiple MDS daemons, and between multiple objects in the metadata pool. docs.ceph.com Regards, Nasos ________________________________ From: Martin Palma <martin@palma.bz> Sent: Wednesday, June 24, 2020 9:56 AM To: ceph-users <ceph-users@ceph.io> Subject: [ceph-users] CephFS: What is the maximum number of files per directory Hi, What is the maximum number of files per directory? I could find the answer in the docs. Best, Martin _______________________________________________ ceph-users mailing list -- ceph-users@ceph.io To unsubscribe send an email to ceph-users-leave@ceph.io
participants (4)
-
Athanasios Panterlis
-
Darren Soothill
-
Martin Palma
-
pchoi@nuro.ai