accassar has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I have a situation where I have to write to 30,000 simultaneous files based on the contents of X files.
So I open the file:
I write to the file:open ${fileno}, ">>$filename";
The problem is - with so many simultaneous writes going to many different files my disks are thrashing. So what I want to do is increase the write buffer per file handle, and only flush when I either fill that buffer or have X lines in the buffer.printf ${fileno} "%s\n", $myline;
Back to
Seekers of Perl Wisdom