more useful options | |
PerlMonks |
Re^3: Threads memory consumptionby Random_Walk (Prior) |
on Dec 05, 2013 at 11:21 UTC ( [id://1065746]=note: print w/replies, xml ) | Need Help?? |
Without seeing more of your code its impossible to tell. I have seen multi threaded code eat all the memory when a large shared hash is first built containing all the work to be done, and the threads are then created. In this way each thread gets a copy of the hash, and your memory usage is terrible. Using a queue you use a lot less memory. If however you have some other code in there leaking memory, then changing the way you call threads is unlikely to solve it. Are you using strict and warnings? Do you declare all your variables in the smallest possible scope? Can you create a small test version of your code that shows this memory leaking behaviour? Cheers,
Pereant, qui ante nos nostra dixerunt!
In Section
Seekers of Perl Wisdom
|
|