From owner-freebsd-questions@FreeBSD.ORG Tue Feb 9 20:48:46 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0FB8106566B for ; Tue, 9 Feb 2010 20:48:46 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from asmtpout023.mac.com (asmtpout023.mac.com [17.148.16.98]) by mx1.freebsd.org (Postfix) with ESMTP id CB2278FC22 for ; Tue, 9 Feb 2010 20:48:46 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii Received: from cswiger1.apple.com ([17.209.4.71]) by asmtp023.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KXL00J1UDT5K830@asmtp023.mac.com> for freebsd-questions@freebsd.org; Tue, 09 Feb 2010 12:48:42 -0800 (PST) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=5.0.0-0908210000 definitions=main-1002090203 From: Chuck Swiger In-reply-to: <560f92641002091241h65d4fb70sa7daafca885a2b1d@mail.gmail.com> Date: Tue, 09 Feb 2010 12:48:41 -0800 Message-id: <021E6C4C-4EDD-4683-B2F0-0F2FCAE18FFF@mac.com> References: <560f92641002091241h65d4fb70sa7daafca885a2b1d@mail.gmail.com> To: Nerius Landys X-Mailer: Apple Mail (2.1077) Cc: FreeBSD Mailing List Subject: Re: Max UDP packet size + Java: weirdness X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Feb 2010 20:48:47 -0000 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