From: Ben Hoskings <ben@jeeves.gotdns.org>
To: linux-kernel@vger.kernel.org
Subject: Re: Ext3 File System "Too many files" with snort
Date: Wed, 14 Jul 2004 13:37:24 +1000 [thread overview]
Message-ID: <200407141337.24890.ben@jeeves.gotdns.org> (raw)
In-Reply-To: <20040709190823.GC11106@artselect.com>
On Sat, 10 Jul 2004 05:08, Pete Harlan wrote:
> Reiser3 lets a directory have more than 32000 subdirectories already.
> I ran into this problem two weeks ago on an ext3 filesystem and found
> Reiser didn't have the problem. My reiser3 directory had 1million+
> subdirs before I killed my test program.
>
> I believe it still has a similar limit on the number of hard links,
> but it doesn't implement ".." as a hard link.
>
> --Pete
I wrote a little test program the other day as well, and experimented with the
same thing. For interest's sake, my results were as follows.
Interesting to note the differences in time that the operations took. Also,
although the creation on reiserfs is extremely quick, the unlinking seems to
be a lot more expensive -- deleting those 1m directories took well over 10
minutes.
Ben
/* output *******************************************************/
$ mount | grep create-dirs
/dev/hda7 on /mnt/create-dirs type ext3 (rw)
$ time ./create-dirs /mnt/create-dirs/ 40000
--- output removed ---
Bailed out at i = 31997.
real 0m50.412s
user 0m0.292s
sys 0m43.010s
$ mount | grep create-dirs
/dev/hda7 on /mnt/create-dirs type reiserfs (rw)
$ time ./create-dirs /mnt/create-dirs/ 40000
--- output removed ---
Created 40000 dirs. All done.
real 0m2.211s
user 0m0.149s
sys 0m2.041s
$ mount | grep create-dirs
/dev/hda7 on /mnt/create-dirs type reiserfs (rw)
$ time ./create-dirs /mnt/create-dirs/ 1000000
--- output removed ---
Created 1000000 dirs. All done.
real 1m1.159s
user 0m3.677s
sys 0m54.872s
/* create-dirs.c *******************************************************/
#include <cstdio>
#include <cstdlib>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#define LEN 64
int main(int argc, char **argv)
{
int i, max, ret;
char path[LEN];
if (argc != 3)
{
printf("Two arguments: /path/for/dirs/, number_of_dirs.\n");
return 1;
}
max = atoi(argv[2]);
if (max < 1)
{
printf("Bad number of dirs.\n");
return 1;
}
for (i = 0; i < max; i++)
{
snprintf(path, LEN, "%s/%d", argv[1], i);
if (i % 100 == 0)
printf("\n%d\t", i);
ret = mkdir(path, 0755);
if (ret != 0)
{
printf("\nBailed out at i = %d.\n", i);
return 1;
}
printf(".");
fflush(stdout);
}
printf("Created %d dirs. All done.\n", max);
}
next prev parent reply other threads:[~2004-07-14 3:37 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-09 19:01 Ext3 File System "Too many files" with snort jmerkey
2004-07-09 19:08 ` Pete Harlan
2004-07-14 3:37 ` Ben Hoskings [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-07-10 6:00 jmerkey
2004-07-10 8:38 ` Dave Jones
2004-07-09 23:11 jmerkey
2004-07-09 19:20 jmerkey
2004-07-10 5:07 ` Hans Reiser
2004-07-10 8:33 ` Dave Jones
2004-07-10 17:37 ` Hans Reiser
2004-07-10 17:44 ` Christoph Hellwig
2004-07-10 17:57 ` Hans Reiser
2004-07-10 18:54 ` Christoph Hellwig
2004-07-10 19:23 ` Hans Reiser
2004-07-12 10:20 ` Paolo Ciarrocchi
2004-07-12 12:11 ` Jesper Juhl
2004-07-12 23:05 ` Bernd Eckenfels
2004-07-18 7:22 ` Hans Reiser
2004-07-10 19:11 ` Francois Romieu
2004-07-09 18:51 jmerkey
2004-07-09 18:30 jmerkey
2004-07-09 18:44 ` Hans Reiser
2004-07-09 22:26 ` Andreas Dilger
2004-07-09 18:30 jmerkey
2004-07-09 16:36 jmerkey
2004-07-09 17:04 ` Dave Jones
2004-07-08 17:51 jmerkey
2004-07-08 18:21 ` Andreas Dilger
2004-07-11 14:55 ` Michelle Konzack
2004-07-11 17:16 ` Andreas Dilger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200407141337.24890.ben@jeeves.gotdns.org \
--to=ben@jeeves.gotdns.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox