parallel optimizations based on number of memory controllers vs cpus
Timon Gehr
timon.gehr at gmx.ch
Fri Mar 23 06:56:08 PDT 2012
On 03/23/2012 02:46 PM, Jay Norwood wrote:
> I believe the current std.parallelism default threadpool count is number
> of cpus-1, according to some documentation. When I was testing some
> concurrent vs threadpool parallel implementations I was seeing
> improvements on the concurrent operation up to about 14 threads. I
> didn't try to figure out how to change the threadpool.
>
> While reading this article I noticed someone who reported similar
> improvements up to 14 threads on memory related operations, and
> explained it by the number of memory controllers being the limiting
> issue. See his item number 4 where significant gains were made in memory
> processing up to 14 threads.
>
> So, I wonder if it wouldn't be good to have a couple of different
> built-in threadpool types ... one meant for memory operations, and one
> primarily for cpu crunching ... with different sizes.
>
> http://stackoverflow.com/questions/4260602/how-to-increase-performance-of-memcpy
>
On program startup, do:
ThreadPool.defaultPoolThreads(14); // or 13
More information about the Digitalmars-d
mailing list