Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Ma_Bo
Beginner
46 Views

ippsRSADecrypt leaves extra thread

I know ippsRSADecrypt uses pthread to speedup decription.But unless the whole program exits,ipp will leaves an useless thread for each calling process/thread.
For most ssl servers,each connection will be dispatched to a seperate thread.This will leaves a lot of uselses thread even RSA routine ends.


See below,the bold texts shows the conclusion above.

start rsa test.
[New Thread 0x1703b90 (LWP 15135)]
[New Thread 0x2445b90 (LWP 15136)]
[New Thread 0x6899b90 (LWP 15137)]
[New Thread 0x7691b90 (LWP 15138)]
[New Thread 0x662b90 (LWP 15140)]
[New Thread 0x5434b90 (LWP 15139)]
[New Thread 0xb8ab90 (LWP 15141)]
[New Thread 0x1904b90 (LWP 15142)]
[New Thread 0x2646b90 (LWP 15143)]
exit from testRsa.
[New Thread 0x2847b90 (LWP 15144)]
[Thread 0x1703b90 (LWP 15135) exited]
exit from testRsa.
exit from testRsa.
exit from testRsa.
[Thread 0x7691b90 (LWP 15138) exited]
[Thread 0x6899b90 (LWP 15137) exited]
[Thread 0x5434b90 (LWP 15139) exited]
exit from testRsa.
[Thread 0x2445b90 (LWP 15136) exited]

Program received signal SIGINT, Interrupt.
0x00818410 in __kernel_vsyscall ()
(gdb) info threads
11 Thread 0x2847b90 (LWP 15144) 0x00818410 in __kernel_vsyscall ()
10 Thread 0x2646b90 (LWP 15143) 0x00818410 in __kernel_vsyscall ()
9 Thread 0x1904b90 (LWP 15142) 0x00818410 in __kernel_vsyscall ()
8 Thread 0xb8ab90 (LWP 15141) 0x00818410 in __kernel_vsyscall ()
6 Thread 0x662b90 (LWP 15140) 0x00818410 in __kernel_vsyscall ()

* 1 Thread 0xb7fe86c0 (LWP 15132) 0x00818410 in __kernel_vsyscall ()

Test program is attached.
tttt.c

0 Kudos
2 Replies
Chao_Y_Intel
Employee
46 Views

Hi,

Ipp is threaded with OpenMP. OpenMP runtime may internally maintain the threading it used. If the application is threaded at the high level, you can link with static non threaded IPP library, it can disable IPP threading.

Thanks,
Chao

Ma_Bo
Beginner
46 Views

Thanks Chao.So i have to balance the overhead and perform increases of openMP when there are many threads.
Reply