[Mono-devel-list] Remoting speedup using buffered streams

Lluis Sanchez lluis at ximian.com
Tue Dec 16 14:41:12 EST 2003


Hi,

This certainly shows a problem in the TcpChannel. I'll review the code.

Thanks!
Lluis.

On dg, 2003-11-30 at 06:11, Michel Dagenais wrote:
> I used Mono and Remoting this year as assignments for a Distributed
> Systems course and was disappointed with the Remoting performance as
> compared to other systems used in the past (e.g., CORBA). I tried to
> figure out why I was getting only 10 simple remote calls per second
> (client and server on the same machine mono 0.28, method without
> argument returning a 4 byte string). I finally realized that a large
> part of the communication for each call was done one byte at a time
> (Send/Receive on the socket).
> 
> I then tried a very simple modification, inserting a BufferedStream
> around the GetStream in Tcp Channels:
> 
> ./System.Runtime.Remoting.Channels.Tcp/TcpConnectionPool.cs:                   _stream = new BufferedStream(client.GetStream());
> ./System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.cs:                    _stream = new BufferedStream(_client.GetStream());
> 
> I now get about 1000 calls per second, a 100x speedup. I realize that
> mono is still not in the performance tuning phase. However, this may be
> of interest. Are there reasons for not using buffered streams that I
> don't see?
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list




More information about the Mono-devel-list mailing list