Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6731 Discussions

100% CPU Utilization Without ippSetNumThreads(1) 6.0

We have a multi threaded image processing aplication that has been using IPP 5.1 for a couple of years now. With 5.1 and everything cranking away on a core2duo machine we run at about 30% CPU utilization. A call to ippGetNumThreads reveals that the number of thread is 2. When we attempted to upgrade to 5.2 a long time ago and now to 6.0 our CPU utilization goes to 100%. Upon further research a call to ippSetNumThreads(1) get us back around 30% CPU utilization. I can comprehend why having multiple threads trying to run theseIPP multithreaded functions could cause problems, but I can't understand why it worked fine in 5.1 with threads greater then 1 but doesn't work in later versions? Are there any other options for machines with more cores rather then restriciting it to 1 thread, for example instead of using the default where number of threads equals number of cores we use number of cores / 2?
0 Kudos
1 Reply

There are about 10 000 function in IPP in total. Not each function is threaded and those which are threaded might be threaded not for all architectures but only where it make sense from performance or algorithmpoint of view. Additionally some conditions used to start threads, like amount of data to process.
When you call ippSetNumThreads(N) you only allow IPP to use N threads for those functions which are threaded. If threading implemented efficiently then about 100% of multi-core processor will be busy and it should finish job with N times faster, this is expected.

You may check which functions are threaded in IPP documentation (there should be ThreadedFunctionsList.txt file in documentation folder).

0 Kudos