ThreadPool and IPP decryption

ThreadPool and IPP decryption

imagem de CP H.


I have the following issue -

When decrypting files, IPPs is spawning multiple worker threads and never clearing/releasing these threads. I end up with hundreds or thousands of threads. Details below:

Written in C#, I am hosting a remoting service. This remoting service simply accepts a filename and decrypts the file using Ipps (release 5.3, 6.1, doesn't matter..). I have a client application that is calling this remoting service with multiple simultaneous requests. Ipps is set to use 8 threads. When the service gets busier, the number of threads increases.. and increases.. Eventually, it'll get into 1000+. I believe this is happening because .Net uses a thread pool to handle the remoting requests. Since the threads are basically reused, the Ipps worker threads never get released. Even if I close the client application, the threads do not get released.

In process explorer, I have thousands of threads like 'libguid40.dll!_kmp_launch_worker', or 'libiomp5md_....' if I'm using 6.1.6.

If I run the exact same code as in the example above in a single standalone application, there is no issue - the Ipps worker threads get released as soon as my thread finishes. It appears that it's the thread pool/remoting that is causing the threads to never get released.

I know that I can set the number of threads to one. That helps - the threads still grow, but theyr'e growing one at a time instead of 7 or 8 at a time. And, the performance isn't as good.

Can anyone tell me more precisely why this is happening and what a workaround might be?

Many Thanks!

Download Untitled.png77.59 KB
2 posts / 0 new
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.
imagem de Chuck De Sylva (Intel)

Looks like you are calling openmp in your implementation. You may be getting hung up trying to create native openmp threads in a managed environment. Can you provide a simple example of how you are making your calls in C#?

Faça login para deixar um comentário.