From owner-freebsd-net Wed Oct 10 8:46:55 2001 Delivered-To: freebsd-net@freebsd.org Received: from wall.polstra.com (wall-gw.polstra.com [206.213.73.130]) by hub.freebsd.org (Postfix) with ESMTP id 65C1237B405 for ; Wed, 10 Oct 2001 08:46:46 -0700 (PDT) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.11.3/8.11.3) with ESMTP id f9AFkd805323; Wed, 10 Oct 2001 08:46:39 -0700 (PDT) (envelope-from jdp@wall.polstra.com) Received: (from jdp@localhost) by vashon.polstra.com (8.11.6/8.11.0) id f9AFkcd86407; Wed, 10 Oct 2001 08:46:38 -0700 (PDT) (envelope-from jdp) Date: Wed, 10 Oct 2001 08:46:38 -0700 (PDT) Message-Id: <200110101546.f9AFkcd86407@vashon.polstra.com> To: net@freebsd.org From: John Polstra Cc: le@cs.unc.edu Subject: Re: Connect(2) problem In-Reply-To: References: Organization: Polstra & Co., Seattle, WA Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org In article , Nguyen-Tuong Long Le wrote: > > I have a software that simulates web clients and servers to create > network congestion (for the purpose of doing research in network > congestion). In our experiment, a client opens an HTTP connection > to a server, fetches a number of objects, and then closes the > connection. A problem I seem to have right now is that a client > machine cannot simulate more than 3000 connections. When my client > machine simulates more than 3000 connections, it's able to open > a socket but then connect(2) fails with errno 35 (Resource > temporarily unavailable). Another interesting notice is that the > connect(2) system call blocks for a few miliseconds before it > fails although fcntl(2) was used to make the socket non-blocking. > The OS version I am using is FreeBSD 4.3-release. In addition to the suggestion from Alex Rousskov, adding these lines to "/boot/loader.conf" may help: kern.ipc.maxsockets="8192" kern.ipc.nmbclusters="32768" John -- John Polstra John D. Polstra & Co., Inc. Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message