Niall O Broin wrote:
>> #!/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 :-(
I'm using Mandrake 8.0/Cooker with kernel 2.4.3, and ReiserFS 3.6.25,
on a PII 450Mhz, 256MB RAM.
I've tried your Perl script, and so far it's still going, load average
hasn't reached
2.0, there is about 4megs RAM free, and the script is using 90% CPU.
It has taken about 10 mins to get to directory 105, thats 3440640
directories,
or 5734 directories per second, not bad eh.
>
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!