Hi
I am also planning to forcibly make it to sleep for a few seconds after 50,000 files have gone through , will this add a tinge to make it a non crashable program.
This not the solution. This does nothing other than sleeping and again wasting your time instead of your CPU time.
Probabaly what you would require, is to change your algorithm if possible. Else change the way you read your files. ie read it in blocks so u would have little memory usage.
Show us your code that could help us in determining an optimal solution.
Also try to visit this page http://www.ccl4.org/~nick/P/Fast_Enough/ which can help you. Also dont forget see this node 422918 This has some expert comments that might help you
| [reply] |
Uhm, I fail to see what the problem is here. There's nothing wrong with a 100% CPU usage. In fact, 100% CPU usage is what you want. Anything less, and it means you've paid for expensive pieces of metal you aren't using. There's nothing wrong with cache usage either. In a modern OS, every process uses the cache. What you want is a lot of cache hits, and not a lot of cache misses. Unfortunally, Perl isn't very good in this department (due to 1) high memory usage, and 2) lots and lots of pointers). But that's the price you pay for the flexibility you get. | [reply] |
Threads may be your friend here. Also, I don't know your code (not that I'd be able to help if I did :) and I don't know enough about Perl's internals, but you must be certain there are no memory leaks. The behaviour you see when switching windows is to be expected on Windows.
Other solutions: faster PC or rewrite in a faster language.
How can you feel when you're made of steel? I am made of steel. I am the Robot Tourist. Robot Tourist, by Ten Benson
| [reply] |
You might find this interesting.
| [reply] |