[Interest] NUMA and processing groups

Bo Thorsen bo at vikingsoft.eu
Tue Dec 22 15:22:20 CET 2015


Den 22-12-2015 kl. 12:05 skrev Etienne Sandré-Chardonnal:
> I recently came across the following problem : my application, which
> does heavy computing tasks distributed over multiple threads, uses
> QThread::idealThreadCount() for deciding the optimal number of threads
> on the system. One of my clients complained that the app was using only
> 50% of the cores on its system, and I found that this is due to the NUMA
> architecture on the machine, which makes system calls used by
> idealThreadCount return the number of cores in the current processing
> group, and not the full system.
>
> Is there any plan for implementing a NUMA API in Qt? As NUMA is the
> future of many core architectures, it would be very interesting to have
> a cross-platform API for this.

That's what they said in the nineties as well. Didn't happen so far. 
Although there are aspects of NUMA in all processors today, it seems the 
general consensus is that you need very specific cases for any affinity 
sensitive code to actually be faster.

That said, it's not great the the QThread ideal thread count isn't 
correct (assuming it isn't). If you want to investigate this issue and 
see if you can come up with a fix that doesn't break everything else...

If your system is special hardware, just set the number of threads manually.

Bo Thorsen,
Director, Viking Software.

-- 
Viking Software
Qt and C++ developers for hire
http://www.vikingsoft.eu



More information about the Interest mailing list