I would suggest profiling the code to see where the slowness is coming from.  Perhaps you can do some caching or other optimizations to decrease the sizes of the hashes you're building in memory.  For instances, if you're building a bunch of hashes serially, consider using Storable to cache each to disk before beginning the next one.  If you must keep them all in memory at the same time, then you'd need to try something else.
<br><br><div><span class="gmail_quote">On 5/9/07, <b class="gmail_sendername">Jim Jacobus</b> &lt;<a href="mailto:JJacobus@ponyx.com">JJacobus@ponyx.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Is there any way to limit, from within the Perl script, the amount of<br>memory or CPU a Perl process utilizes? I&#39;ve got a script on a Redhat<br>Linux system that crunches a lot of data. Script and output are ok,<br>
but the process can take up to 30 minutes wall clock time. As a<br>result the system appears to slow down considerably until the the<br>script finishes. I tried adding a few WAIT commands in the script,<br>but it didn&#39;t help much. The system reads some really large files,
<br>parses the info and stores it in some hashes for later processing. So<br>I&#39;m using I/o, memory and CPU. It would be good if I could lower the<br>process priority of the script when it&#39;s running so the O/S could
<br>give more weight to other processes.<br><br>_______________________________________________<br>Chicago-talk mailing list<br><a href="mailto:Chicago-talk@pm.org">Chicago-talk@pm.org</a><br><a href="http://mail.pm.org/mailman/listinfo/chicago-talk">
http://mail.pm.org/mailman/listinfo/chicago-talk</a><br></blockquote></div><br>