0

I'm running an old performance test client written in WinForm long ago.

We have many devices working with Synchronous TCP connection against a server. The Performance test is designed to simulate the work of multiple such devices working concurrently by activating a dll which simulates a single device..

So far it was working ok, but now when I increased the amount of concurrent threads (to 150), I realize that the application cannot spawn so many threads.

After reading this and this I understand that the way the performance application is working (connection per thread) is wrong, and that it should be async. but there is now way to change the dll i'm invoking.

Is there any way I can use up more threads in the current condition, ie - keeping the TCP synchronous?

Community
  • 1
  • 1
Mithir
  • 2,355
  • 2
  • 25
  • 37
  • How did you determine that "application cannot spawn so many threads"? Do you understand completely what the performance test is doing while "activating a dll"? Can you give more insight? Everybody is on the async/event driven/actors/reactors bandwagon these days, because everybody is envisioning themselves writing the next Facebook. Yes thread-per-connection "doesn't scale well" but the inflection point is at thousands, tens of thousands threads per core. Not yours 150. – Pavel Zdenek Jun 10 '12 at 20:21
  • I was wrong writing that the application cannot spawn so many threads. it does spawn the threads it just cannot scale while making synchronous TCP calls. ie - one TCP connection over a test request may take 100ms, when I open 150 threads together, some get stuck on TcpClient constructor (doing the connection). makes sense? – Mithir Jun 11 '12 at 05:15
  • What is that TcpClient? Is that part of your DLL API? Making a connection from within a constructor sounds highly suspicious. I am afraid you will have to post some simplified code and the DLL API too. – Pavel Zdenek Jun 11 '12 at 21:24

0 Answers0