in reply to Re^2: How can I limit the number of Cores in multi-process programming
in thread How can I limit the number of Cores in multi-process programming
It sounds strange that you want to multithread for more speed, but then turn around and want to use less CPU % (so it takes longer again?).
Do you have busy loops wasting CPU cycles or something? If so, use a sleep or a select(undef,undef,undef,0.01 to reduce the polling rate and drop the CPU usage to <1%.
You can try a nap of a few milliseconds per iteration on your big long running loops as well if they're hogging resources, but if the loop is doing productive things, letting it finish is usually a good idea ;).
|
---|
In Section
Seekers of Perl Wisdom