NIO.2 and GC activity

Alan Bateman Alan.Bateman at Sun.COM
Wed May 20 00:23:15 PDT 2009


Leon Finker wrote:
> FYI, I did some performance testing across two machines (Windows Vista over
> Wi-Fi connection) with single outstanding read and multiple outstanding
> reads and writes on a socket. For single case I did this in Java NIO2 and
> .NET. The code between the two is basically identical. The performance is
> about the same. For multiple case I only did this in .NET since Java NIO2
> prevents me from doing this. I see ~25% increase in data throughput in
> multiple reads and writes case. And I did not even try to optimize the code
> for re-sequencing multiple outstanding receives (just took a coarse grained
> lock to protect shared state). This is with single client connection to a
> server. I don't know if there will be any gains in Java NIO2, but it would
> be nice to test it. If there is, then I would vote for removing the check
> for multiple outstanding reads.
>   
Do you know the size of send/receive buffer in both cases?

-Alan.



More information about the nio-dev mailing list