From owner-freebsd-net Wed Oct 10 10:39:17 2001 Delivered-To: freebsd-net@freebsd.org Received: from measurement-factory.com (measurement-factory.com [206.168.0.5]) by hub.freebsd.org (Postfix) with ESMTP id 01D9C37B406 for ; Wed, 10 Oct 2001 10:39:13 -0700 (PDT) Received: (from rousskov@localhost) by measurement-factory.com (8.9.3/8.9.3) id LAA79177; Wed, 10 Oct 2001 11:39:09 -0600 (MDT) (envelope-from rousskov) Date: Wed, 10 Oct 2001 11:39:09 -0600 (MDT) From: Alex Rousskov To: Nguyen-Tuong Long Le Cc: freebsd-net@FreeBSD.ORG Subject: Re: Connect(2) problem In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 On Wed, 10 Oct 2001, Nguyen-Tuong Long Le wrote: > Just our of curiosity, what is the use of > net.inet.ip.portrange.hifirst and net.inet.ip.portrange.hilast ? Even FreeBSD gurus/committers are unsure :-) http://people.freebsd.org/~adrian/sysctl.descriptions The answer is in "man ip". Alex. > On Tue, 9 Oct 2001, Alex Rousskov wrote: > > > > > Are you running out of ephemeral ports? See net.inet.ip.portrange > > sysctl or do your own port management. > > > > Alex. > > > > On Tue, 9 Oct 2001, Nguyen-Tuong Long Le wrote: > > > > > Hi all, > > > > > > 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. > > > > > > I used sysctl to bump up kern.maxfiles and kern.maxfilesperproc to > > > 16384. I also bumped up kern.ipc.somaxconn to 8192 on the server > > > side. I recompiled the kernel with option NMBCLUSTERS=65536 to > > > increase the number of mbufs. I guess that CPU is not the bottleneck > > > since I have the same problem regardless whether I use a 300 MHz or > > > a 1 GHz machine. > > > > > > Does anyone have any suggestion what kind of resources my client machine > > > runs out and how I can fix it? > > > > > > Thanks, > > > Long > > > > > > P.S. Please kindly email your reply to me since I am not on the list. > > > > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > > with "unsubscribe freebsd-net" in the body of the message > > > > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message