On Sat, 21 Jan 2023, John Ference wrote:

*NB. Questions: What's the underlying behavior? Is this intended?*

I can't reproduce this.  I get:

   ,.10{.res
 0.117785
 0.113945
 0.116619
0.0783475
 0.114737
0.0741682
0.0747921
0.0674546
0.0765281
0.0777421
   ,._10{.res
0.0718152
0.0694659
0.0721551
0.0667192
0.0680241
 0.070355
0.0709015
0.0657318
 0.064728
 0.066456

That the first few timings are slower is to be expected, as the CPU is warming up. But there doesn't seem to be any periodic bias such as you see.

One idea (and I am just spitballing here): you have an amd cpu (I am assuming, given that you have 6 threads), and amd cpus have numa cache, which might somehow bias the work distribution. Whereas I have an intel cpu, and those have uma cache. (Or, if it's a newer intel cpu, could be big.little screwing things up.)

NB. Why wouldn't each pool use its own threads for multi-threaded primitives?

Different workloads can be bottlenecked by different things. If you are bottlenecked by i/o, you might want to have more threads than cores. But if you are bottlenecked by compute or memory, having more threads than cores just adds overhead. So you might have, e.g., threadpool 1 for i/o and threadpool 0 for compute, with appropriate numbers of threads in each.

Something I want to do (but haven't implemented yet) is to let each pool pick which threadpool it punts its work to. So e.g. you could have 4 threadpools: i/o for numa node 0, compute for numa node 0, i/o for numa node 1, compute for numa node 1.

NB. What's the point of creating a second pool with multiple threads, rather than separate pools?

What do you mean by this?

NB. How is resource contention between pools adjudicated?

Which resources?

 -E

P.S. very sorry for not responding yet to your earlier email--I have been tied up, but haven't forgotten it!
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to