I did some more testing with a small example having the same structure as the communication layer of my application.
Results with this test are: about 1MB/s with Jini+RMI data rate and about 1,3MB/s with a Tcp stream connection, which is more what you would expect... So I think the connection itself is fine and I'm suspecting other components to cause the slowdown in combination with a TCP connection. Regards, Silas On Monday 20 September 2010 09:24:15 Silas De Munck wrote: > Yes I did set the TcpNoDelay to true. > > I also played a bit with the buffer sizes and it doesn't seem to make a > difference. > > As this is a siginificant code base (a distributed discrete event > simulator), it's not easy to show you some code, but I'll try to create a > small example showing my problem. > > Thanks for your help already! > > Silas > > On Friday 17 September 2010 20:19:35 Tim Blackman wrote: > > Did you call Socket.setTcpNoDelay with true? This buffeting has a big > > impact if you didn't. > > > > NIO probably won't help -- the JDK uses it underneath anyway. > > > > Also standard RMI is much faster than JERI in my experience. > > > > - Tim > > > > On Sep 17, 2010, at 7:28 AM, Silas De Munck <silas.demu...@ua.ac.be> wrote: > > > Hello, > > > > > > In the context of a distributed discrete event simulation, I need to be > > > able to send objects at a high rate between program instances on > > > different hosts. Initially I implemented this using remote calls to an > > > object instance living on the other side. This performs fairly well, > > > but because essentially I only need a one-way stream-connection with > > > asynchronous sending, I thought using the RMI mechanism for this was > > > not the best solution. Therefore I added a TCP implementation using > > > Sockets and ObjectStreams. > > > > > > Now comparing the RMI and the socket implementation, the results are > > > somewhat strange. I expected the sockets to perform better because of > > > the reduced overhead, but this isn't the case. My (naive) socket > > > implementation only reaches about 25% of the througput rate of the RMI > > > implementation. > > > > > > Does RMI use a different (faster) serialization implementation, > > > compared to the serialization used with ObjectInput/Output-stream? > > > Are there any other differences that could explain the performance > > > difference? > > > > > > Any pointers on where to start investigate this issue would be very > > > much appreciated. > > > > > > Regards, > > > > > > Silas -- Silas De Munck PhD Student Computational Modeling and Programming (COMP) University of Antwerp Middelheimlaan 1 2020 Antwerpen, Belgium G2.07, Department of Computer Science and Mathematics e-mail: silas.demu...@ua.ac.be