in reply to Re: Taking advantage of multi-processor architecture
in thread Taking advantage of multi-processor architecture
Actually depending on how IO intensive the work is you may find that it's advantageous to split into more processes (or threads) than you have physical processors. If one of the workers becomes blocked waiting on IO the OS will be able to schedule another which can get useful work done while the first one's waiting for its data.
One application of this trick is if you're using GNU make to tell it to run n+1 jobs on an n processor box (e.g. make -j 3 on a dual CPU machine). While compiles are usually CPU bound, there's usually enough IO slack that it'll finish a little faster than if you'd just run -j 2.
|
|---|