drwxrwsr-x 7 owner group 4096 Sep 7 12:39 ./ drwxrwsr-x 4 owner group 4096 Sep 7 10:14 ../ drwxrwsr-x 2 owner group 4096 Sep 7 10:54 dir1/ drwxrwsr-x 2 owner group 335544320 Sep 26 00:30 dir_getsome/ drwxrwsr-x 2 owner group 4096 Sep 7 12:43 dir3/ drwxrwsr-x 4 owner group 4096 Sep 7 10:25 dir4/ drwxrwsr-x 2 owner group 4096 Sep 23 18:12 dir5/
dir_getsome is larger than anything I've ever seen. I did a du on the directory and there is about 15GB of data with just over 3.8M files. I suspect this is a sub-optimal ratio but is it so bad that the metadata for the directory needs to be so large?
Jeff Kennedy Qualcomm, Incorporated QCT Engineering Compute 858-651-6592
drwxrwsr-x 7 owner group 4096 Sep 7 12:39 ./ drwxrwsr-x 4 owner group 4096 Sep 7 10:14 ../ drwxrwsr-x 2 owner group 4096 Sep 7 10:54 dir1/ drwxrwsr-x 2 owner group 335544320 Sep 26 00:30 dir_getsome/ drwxrwsr-x 2 owner group 4096 Sep 7 12:43 dir3/ drwxrwsr-x 4 owner group 4096 Sep 7 10:25 dir4/ drwxrwsr-x 2 owner group 4096 Sep 23 18:12 dir5/
dir_getsome is larger than anything I've ever seen. I did a du on the directory and there is about 15GB of data with just over 3.8M files. I suspect this is a sub-optimal ratio but is it so bad that the metadata for the directory needs to be so large?
A directory becomes large like this when it has a large number of directory entries. This happens when a large number of items are stored in a single "flat" directory (rather than in a tree). Each entry is a file name and inode number, so the size of the directory depends on the number of entries and the total length of all the file names. This is not strictly "meta data", which is stored in the inode table. This is file name data.
Large flat directories can be very slow to scan when searching for a file. But if you know the name of the file you want, you can access it very quickly.
Steve Losen scl@virginia.edu phone: 434-924-0640
University of Virginia ITC Unix Support