From owner-freebsd-java@FreeBSD.ORG Thu Mar 18 01:38:49 2004 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 447C516A4CE for ; Thu, 18 Mar 2004 01:38:49 -0800 (PST) Received: from iota.root-servers.ch (iota.root-servers.ch [193.41.193.195]) by mx1.FreeBSD.org (Postfix) with SMTP id 3D24843D1F for ; Thu, 18 Mar 2004 01:38:48 -0800 (PST) (envelope-from gabriel_ambuehl@buz.ch) Received: (qmail 55041 invoked from network); 18 Mar 2004 09:38:46 -0000 Received: from 217-162-135-163.dclient.hispeed.ch (HELO ?10.2.2.3?) (217.162.135.163) by 0 with SMTP; 18 Mar 2004 09:38:46 -0000 Date: Thu, 18 Mar 2004 10:41:50 +0100 From: Gabriel Ambuehl Organization: BUZ Internet Services X-Priority: 3 (Normal) Message-ID: <708003903.20040318104150@buz.ch> To: Panagiotis Astithas In-Reply-To: <40596806.4000808@noc.ntua.gr> References: <011a01c40bc3$cd534050$0200a8c0@rescue> <40596806.4000808@noc.ntua.gr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: Nick Gieczewski cc: freebsd-java@freebsd.org Subject: Re[2]: java.net.SocketException: Too many open files X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: gabriel_ambuehl@buz.ch List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2004 09:38:49 -0000 Hello Panagiotis, Thursday, March 18, 2004, 10:12:38 AM, you wrote: > Nick Gieczewski wrote: >> I have written a small program that attempts to open 2,048 concurrent >> connections to the server in oder to reproduce this. On my FreeBSD >> box, the thread dies with the above exception at 500-600 open >> connections. When running the server application on Win32, on the >> other hand, I'm able to open all the 2,048 connections without a >> hitch. > Hello, > would you mind posting your small test program? It would help shed some > light I think. Maybe system resource limits are too low (IIRC, 4-STABLE has hard wired, relatively low limits)? Seems like the 2048 on Win are some arbitrary limit as well (didn't someone benchmark a tuned 4-STABLE with some 1,6 MILLION concurrent connections to a dummy server? So one would guess more than 2K connections should be possible when the system is configured properly). I think the default hoovers somewhere around 1024 file descriptors, so 500 to 600 is reasonable considering that the system and daemons will chew up a few of their own. My CURRENT box says: #sysctl -a | grep files kern.maxfiles: 7560 kern.maxfilesperproc: 6804 Best regards, Gabriel