Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: cpu usage

by Xilman (Hermit)
on May 17, 2010 at 08:15 UTC ( [id://840293] : note . print w/replies, xml ) Need Help??


in reply to cpu usage

There are two separate issues here. The first is that the script is taking 100% of the cpu. The other is that the system is slowing down. Without knowing more details about your script it is difficult to give concrete advice.

If the slowdown arises from scheduling your script in addition to the other processes you wish to run, you could try running it at lower scheduling priority. Either use "START /LOW ..." or reset the scheduling priority with the task manager. Type "START /?" in a command window for more assistance.

If the slowdown arises from paging and/or swapping, you either need to add more RAM to your system or rewrite the script to use less memory. Without knowing more details about your script ...

Paul