Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

tbb high cpu usage problem

cinar_e_
Beginner
509 Views

Hi,

I use several tbb components in an application; parallel_for, flow graph, concurrent queue (consumed by a pthread). I work with tbb-2018_U3-20180728.

During the tests i realized high cpu usage for my application. (i dont use task_scheduler_init) All of the cpus are utilized and consume around 10-15%. When i checked a sample thread, here is the stack trace:

(gdb) bt

#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38

#1  0x00007f3a73d0acd2 in tbb::internal::futex_wait (comparand=2, futex=0x7f3a6e47d0ac) at /ci-run/centos7/src/tbb/./include/tbb/machine/linux_common.h:60

#2  tbb::internal::binary_semaphore::P (this=0x7f3a6e47d0ac) at /ci-run/centos7/src/tbb/./src/tbb/semaphore.h:206

#3  rml::internal::thread_monitor::commit_wait (c=<synthetic pointer>..., this=0x7f3a6e47d0a0) at /ci-run/centos7/src/tbb/./src/rml/include/../server/thread_monitor.h:259

#4  tbb::internal::rml::private_worker::run (this=0x7f3a6e47d080) at /ci-run/centos7/src/tbb/./src/tbb/private_server.cpp:277

#5  0x00007f3a73d0acf9 in tbb::internal::rml::private_worker::thread_routine (arg=<optimized out>) at /ci-run/centos7/src/tbb/./src/tbb/private_server.cpp:223

#6  0x00007f3a70a986db in start_thread (arg=0x7f39d6bfa700) at pthread_create.c:463

#7  0x00007f3a707c188f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

 

What might be the cause of this problematic high CPU usage? What do i miss with tbb usage?

regards.

0 Kudos
0 Replies
Reply