From: Niall O Broin (niall at domain linux.ie)
Date: Tue 08 May 2001 - 18:30:03 IST
On Tue, May 08, 2001 at 03:03:28PM +0100, Paul Jakma wrote:
> Last time i tried Reiserfs was an extremely easy way to bring a box
> down. try the following in a scratch dir:
>
> for i in `seq 0 1024` ; do for j in `seq 0 32768` ; do mkdir $i ;
> touch $i/$j ; done ; done
>
> ext2, while extremely slow as the number of dirs and files gets
> large, survived. reiserfs panic'ed the box. IIRC correctly from l-k,
> reiserfs has problems with being easily provoked into using too much
> memory.
What kernel/Reiser version was that ? I have it running here and it's
ticking along nicely, on the box I'm writing this on (750MHz Athlon, 256M
RAM). Mind you, bash is not what I'd call fast - it started nearly 20 minutes ago,
and it's only on its 5th directory. I did rewrite it slightly as
for i in seq 0 1024;do mkdir $i;for j in seq 0 32768;
do touch $i/$j;done;echo $i;done
just to give me a hint as to what was happening, and because it didn't seem
sensible to generate 32M "cannot make directory" errors. As it was so slow,
I wrote the same loop in Perl as
#!/usr/bin/perl
for $dir (0..1024) {
mkdir $dir, oct"777";
for $file (0..32768) {
open FILE, ">$dir/$file";
close FILE
}
print "$dir\n"
}
It started 10 minutes later than the bash version, but had made 297
directories when both processes failed just now. The box didn't panic,
although with the perl version running the load was around 2.5, with top
showing the perl program taking 95% of the CPU, and the failure was simply
because I ran out of space on the device :-(
Regards,
Niall
P.S. This was with 2.2.18 with ReiserFS version 3.5.29
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:10:13 GMT