Skip to contentSkip to conversation

reiserfs max file test

DISCUSSION Dan Sheffner 2 participants 2 messages Apr 10, 2006 – Apr 11, 2006

lore
Share & tools
lore
#0 lore raw

Hello All,

I'm trying to find out the number of files that reiserfs can support in a single folder. I know that you web site says about 1.2 million files without collision, but I have written a small program to create files in order and so far I have been able to create about 10 million files in one directory. Can you explain collision more? Here is the program I used below to test my theory. I echo out hello 10 times to each file to give some size. My linux distro is GENTOO 2006.0 version and I'm running kernel 2.16.15

#!/bin/bash

LIMIT=10000000 # Upper limit of 10 million files
echo
echo "creating $LIMIT files for test"
a=0

while [ $a -le "$LIMIT" ]
do
echo $a
a=$(($a+1))
touch /home/thesheff17/installServer/file/file$a.txt echo "HELLO" >> /home/thesheff17/installServer/file/file$a.txt echo "HELLO" >> /home/thesheff17/installServer/file/file$a.txt echo "HELLO" >> /home/thesheff17/installServer/file/file$a.txt echo "HELLO" >> /home/thesheff17/installServer/file/file$a.txt echo "HELLO" >> /home/thesheff17/installServer/file/file$a.txt echo "HELLO" >> /home/thesheff17/installServer/file/file$a.txt echo "HELLO" >> /home/thesheff17/installServer/file/file$a.txt echo "HELLO" >> /home/thesheff17/installServer/file/file$a.txt echo "HELLO" >> /home/thesheff17/installServer/file/file$a.txt echo "HELLO" >> /home/thesheff17/installServer/file/file$a.txt echo "HELLO" >> /home/thesheff17/installServer/file/file$a.txt done

Below is the find command that tells me how many files are in the directory.

production / # find /home/thesheff17/installServer/file/ \! -type d | wc -l 10000001
production / #

#1 lore raw

Hello

Quoted 8 lines · Dan Sheffner

Hello All,

I'm trying to find out the number of files that reiserfs can support in a single folder. I know that you web site says about 1.2 million files without collision, but I have written a small program to create files in order and so far I have been able to create about 10 million files in one directory. Can you explain collision more?

Everything depends on names of files you create. Reiserfs calculates a key for each directory entry based on a file name. Currently a directory can not have more than 128 names which identical keys. Probably in your test names are such that the problem did not come up yet on that amount of files.

Quoted 38 lines

Here is the program I used below to test my theory. I echo out hello 10 times to each file to give some size. My linux distro is GENTOO 2006.0 version and I'm running kernel 2.16.15

#!/bin/bash

LIMIT=10000000 # Upper limit of 10 million files
echo
echo "creating $LIMIT files for test"
a=0

while [ $a -le "$LIMIT" ]
do
echo $a
a=$(($a+1))
touch /home/thesheff17/installServer/file/file$a.txt echo "HELLO" >> /home/thesheff17/installServer/file/file$a.txt echo "HELLO" >> /home/thesheff17/installServer/file/file$a.txt echo "HELLO" >> /home/thesheff17/installServer/file/file$a.txt echo "HELLO" >> /home/thesheff17/installServer/file/file$a.txt echo "HELLO" >> /home/thesheff17/installServer/file/file$a.txt echo "HELLO" >> /home/thesheff17/installServer/file/file$a.txt echo "HELLO" >> /home/thesheff17/installServer/file/file$a.txt echo "HELLO" >> /home/thesheff17/installServer/file/file$a.txt echo "HELLO" >> /home/thesheff17/installServer/file/file$a.txt echo "HELLO" >> /home/thesheff17/installServer/file/file$a.txt echo "HELLO" >> /home/thesheff17/installServer/file/file$a.txt done

Below is the find command that tells me how many files are in the directory.

production / # find /home/thesheff17/installServer /file/ \! -type d | wc -l
10000001
production / #