DatagramChannel performance issue
Martin Thompson
mjpt777 at gmail.com
Mon Sep 3 15:26:47 UTC 2018
> On Mon, 3 Sep 2018 at 08:39, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> I don't think we have other examples in the core libraries to point.
> DatagramSocketImpl just needs a direct buffer for the socket address
> which the new native receive method will populate with the source address.
Is that a direct ByteBuffer?
> Which operating system is this? You may want to run it with
> -Djava.net.preferIPv4Stack=true to see if it makes a difference (as IPv6
> targets, even if it's an IPv4-mapped IPv6 address, as IPv6 targets
> involves additional code).
The posted results are for Linux (Ubuntu 18.04 LTS). I've also tested
on Windows 10 and the ratios are similar.
I tested with -Djava.net.preferIPv4Stack=true. The single source case
is similar. The dual source case does see a reduction in latency of a
few hundred nanoseconds.
Thanks,
Martin...
More information about the nio-dev
mailing list