Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 09 Feb 2010 12:48:41 -0800
From:      Chuck Swiger <cswiger@mac.com>
To:        Nerius Landys <nlandys@gmail.com>
Cc:        FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: Max UDP packet size + Java: weirdness
Message-ID:  <021E6C4C-4EDD-4683-B2F0-0F2FCAE18FFF@mac.com>
In-Reply-To: <560f92641002091241h65d4fb70sa7daafca885a2b1d@mail.gmail.com>
References:  <560f92641002091241h65d4fb70sa7daafca885a2b1d@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Feb 9, 2010, at 12:41 PM, Nerius Landys wrote:
> First, I noticed that I was able to send data that is 9216 in length
> between 2 FreeBSD 7.1 hosts ("far apart" in network distance) running
> Sun JDK 1.5.0_16-p9 (compiled myself from /usr/ports/java/jdk15).
[ ... ]
> For my particular application, I would really benefit from being able
> to send large UDP packets.  Does anyone know how to increase the max
> allowed size of UDP packets in a Java program?  I assume it's
> something outside of the Java program, in the system or kernel or
> whatnot.

You've encountered:

% sysctl net.inet.udp.maxdgram
net.inet.udp.maxdgram: 9216

However, increasing it will guarantee that you will exceed even normal jumbo frame size and thus depend upon IP fragmentation / reassembly for the traffic.  I don't consider that to be a good idea, but it might be OK for local traffic....

Regards,
-- 
-Chuck




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?021E6C4C-4EDD-4683-B2F0-0F2FCAE18FFF>