From owner-freebsd-questions@FreeBSD.ORG Thu Oct 19 17:14:28 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DDAB816A416 for ; Thu, 19 Oct 2006 17:14:28 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.175]) by mx1.FreeBSD.org (Postfix) with ESMTP id D802643D4C for ; Thu, 19 Oct 2006 17:14:03 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from mac.com (smtpin05-en2 [10.13.10.150]) by smtpout.mac.com (Xserve/8.12.11/smtpout05/MantshX 4.0) with ESMTP id k9JHAsjx024871; Thu, 19 Oct 2006 10:10:54 -0700 (PDT) Received: from [17.214.13.96] (a17-214-13-96.apple.com [17.214.13.96]) (authenticated bits=0) by mac.com (Xserve/smtpin05/MantshX 4.0) with ESMTP id k9JHAqOK017947; Thu, 19 Oct 2006 10:10:53 -0700 (PDT) In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Chuck Swiger Date: Thu, 19 Oct 2006 10:10:51 -0700 To: ke han X-Mailer: Apple Mail (2.752.2) X-Brightmail-Tracker: AAAAAA== X-Brightmail-scanned: yes Cc: freebsd-questions Questions list Subject: Re: FreeBSD 6.1 max sockets 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: Thu, 19 Oct 2006 17:14:28 -0000 On Oct 19, 2006, at 8:24 AM, ke han wrote: > So my desire is two things: > 1 - good event handling for knowing which sockets have new data. I > assume kqueue is the way to go here? kqueue would be a fine choice, otherwise the typical mechanism involves using select(). > 2 - I need to know what my limits are on max number of sockets. If > my system is a 64-bit install on a server with 8GB RAM, I need to > know how many sockets I can handle. Also, what options do I have > to tune this? socket buffer size? Any kernel parameters needed to > tune? See the sysctl kern.ipc.maxsockets. You can change this and related settings by adjusting loader.conf (see /boot/defaults/loader.conf and "man tuning" about "LOADER TUNABLES")... -- -Chuck