[Mono-dev] Remoting and thread pool limits

Robert Jordan robertj at gmx.net
Sat Dec 15 10:12:54 EST 2007


Hi,

pablosantosluac wrote:
> Hi,
> 
> I've found the following difference working with .NET and Mono remoting. In 
> .NET when the remoting ThreadPool reaches the pool's maximum (25 threads per 
> process), it is able to continue creating new threads. In fact, you can end 
> up having a remoting server with hundreds of threads.
> 
> In mono the behaviour is different. Once the limit is reached it starts 
> refusing connections.

This is unrelated to mono's remoting thread pool. You have probably
ran your tests on Windows, where mono indeed fails with a GC failure
when too many threads are created because the GC has a hard coded
max thread count limit.

On Linux (x86_64, Mono 1.2.6) I can finish the tests:

Linux Mono client -> Linux Mono server (same machine)

poseidon [~/foo] $ mono client/bin/Debug/client.exe 
tcp://localhost:8084/remote
1 - Time 1206 ms
5 - Time 2045 ms
10 - Time 3575 ms
20 - Time 8174 ms
40 - Time 12055 ms
50 - Time 8185 ms
200 - Time 46150 ms


MS.NET client -> Linux Mono server (different machines)

troll:/cygdrive/u/foo/client/bin/Debug $ ./client.exe 
tcp://poseidon:8084/remote
1 - Time 1297 ms
5 - Time 2000 ms
10 - Time 3515 ms
20 - Time 6016 ms
40 - Time 11031 ms
50 - Time 6016 ms
200 - Time 94375 ms


The numbers don't look very well, though. I promise to look at
this when you file a bug report so that it doesn't get
overlooked.

Robert




More information about the Mono-devel-list mailing list