* Strange (varying) limit on number files in directory ?
@ 2011-05-13 11:36 Mateusz Korniak
2011-05-13 14:29 ` Andreas Dilger
0 siblings, 1 reply; 2+ messages in thread
From: Mateusz Korniak @ 2011-05-13 11:36 UTC (permalink / raw)
To: linux-ext4
Hi !
I am hitting strange number of files inside directory limitation.
I am able to create only around 120k files.
Number varies [1] as seems I am able to add files with some filenames but with
other creation fails [2].
Files have structure <small_ind><sha/md5sum> [3].
All on linux box [4],[5], having plenty of frees space [6].
Filesystem fscked - everything ok.
Any hints ?
Thanks in advance.
[1]:
ls | wc --words
129737
Some deletions and adding again:
ls | wc --words
122227
[2]:
Mar 16 04:55:26 s10 kernel: [772429.729185] EXT4-fs warning (device md7):
ext4_dx_add_entry:1546: Directory index full!
Mar 16 04:55:26 s10 kernel: [772429.761683] EXT4-fs warning (device md7):
ext4_dx_add_entry:1546: Directory index full!
[3]:
494_0cf1500e1ecbeecb3282b1e68b2df53b77d06665
494_40654eec2dd15e4065e49faa2ea226dd25191457
494_7340a2159a9e256038bbab81f8a86b1a13c034d4
494_a658dcec5fc6c93af7882b571a67dc6571e2e8d2
494_d9cca801e9cd966a23a0e05d7ca90d796fb13a63
494_0cf17d9ba63b0fa796850a01c7f551f37fa25acb
494_406590f1b7ca409f21173c8973d2f606025dd8e4
494_7340ace8f8a535a02f3a91e42d83fd942252c998
494_a658fe6cc4aedcbb98c0d99963a76326da5ec192
494_d9ccce88b83254e541c6f0fc07f0c3c95cdc46eb
[4]:
uname -a
Linux s10 2.6.36-1 #1 SMP Tue Nov 9 09:56:02 CET 2010 x86_64
Intel(R)_Core(TM)2_Quad__CPU___Q8200__@_2.33GHz PLD Linux
[5]:
tune2fs -l /dev/md7
tune2fs 1.41.11 (14-Mar-2010)
Filesystem volume name: s10_image_cacher
Last mounted on: /var/cache/abbon/image_cacher
Filesystem UUID: 963dd2f3-d0f6-41bd-9d80-baac7b78e216
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype
needs_recovery extent flex_bg sparse_super huge_file uninit_bg dir_nlink
extra_isize
Filesystem flags: signed_directory_hash
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 29298688
Block count: 117190656
Reserved block count: 5859532
Free blocks: 72813652
Free inodes: 23814062
First block: 1
Block size: 1024
Fragment size: 1024
Reserved GDT blocks: 256
Blocks per group: 8192
Fragments per group: 8192
Inodes per group: 2048
Inode blocks per group: 256
RAID stride: 512
RAID stripe width: 2048
Flex block group size: 16
Filesystem created: Sat Feb 26 09:19:07 2011
Last mount time: Fri May 13 12:11:21 2011
Last write time: Fri May 13 12:11:21 2011
Mount count: 1
Maximum mount count: 26
Last checked: Fri May 13 12:04:42 2011
Check interval: 15552000 (6 months)
Next check after: Wed Nov 9 11:04:42 2011
Lifetime writes: 252 GB
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 128
Journal inode: 8
Default directory hash: half_md4
Directory Hash Seed: 72905729-3b0b-4bb5-8a3a-6a0d88f5fa37
Journal backup: inode blocks
[6]:
df /dev/md7
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/md7 113491176 39425775 68205869 37%
df -i /dev/md7
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/md7 29298688 5354264 23944424 19%
--
Mateusz Korniak
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Strange (varying) limit on number files in directory ?
2011-05-13 11:36 Strange (varying) limit on number files in directory ? Mateusz Korniak
@ 2011-05-13 14:29 ` Andreas Dilger
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Dilger @ 2011-05-13 14:29 UTC (permalink / raw)
To: Mateusz Korniak; +Cc: linux-ext4@vger.kernel.org
On 2011-05-13, at 5:36 AM, Mateusz Korniak <mateusz-lists@ant.gliwice.pl> wrote:
> I am hitting strange number of files inside directory limitation.
> I am able to create only around 120k files.
> Number varies [1] as seems I am able to add files with some filenames but with
> other creation fails [2].
>
> Files have structure <small_ind><sha/md5sum> [3].
> All on linux box [4],[5], having plenty of frees space [6].
> Filesystem fscked - everything ok.
>
>
> [3]:
> 494_0cf1500e1ecbeecb3282b1e68b2df53b77d06665
> 494_40654eec2dd15e4065e49faa2ea226dd25191457
>
> [5]:
> tune2fs -l /dev/md7
> tune2fs 1.41.11 (14-Mar-2010)
>
> Block count: 117190656
>
> Block size: 1024
Limit is because you must have formatted the filesystem with 1023-byte blocksize. There is a 2-level limit on htree directories, and with the long filenames you are using you only get about 16 entries in each leaf block. With 1024-byte blocks there can be at most (1024-16)/8*(1024-8)/8*3/4= 192k entries with perfect hashing.
In order to exceed this limit you unfortunately need to format your fs with a larger blocksize (or fix htree to allow more than depth 2).
Andreas
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-13 14:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-13 11:36 Strange (varying) limit on number files in directory ? Mateusz Korniak
2011-05-13 14:29 ` Andreas Dilger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).