From owner-freebsd-hackers@FreeBSD.ORG Mon May 5 06:20:32 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EDF3E37B401 for ; Mon, 5 May 2003 06:20:32 -0700 (PDT) Received: from mail016.syd.optusnet.com.au (mail016.syd.optusnet.com.au [210.49.20.174]) by mx1.FreeBSD.org (Postfix) with ESMTP id 96C5443F85 for ; Mon, 5 May 2003 06:20:31 -0700 (PDT) (envelope-from simon@synatech.com.au) Received: from co3021625-a.mckinn1.vic.optushome.com.au (c17681.mckinn1.vic.optusnet.com.au [210.49.221.35])h45DKUv11099 for ; Mon, 5 May 2003 23:20:30 +1000 Received: by co3021625-a.mckinn1.vic.optushome.com.au (Postfix, from userid 1001) id 78B3B14A82; Mon, 5 May 2003 23:20:29 +1000 (EST) Date: Mon, 5 May 2003 23:20:29 +1000 From: Simon Lai To: freebsd-hackers@freebsd.org Message-ID: <20030505232029.A46013@pobox.com.> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: sjlai@synatech.com.au Subject: 180,000 kevents - out of memory errors X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: sjlai@synatech.com.au List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2003 13:20:33 -0000 Hi, I want to watch approx 200,000 sockets using kevent, but I get an ENOMEM error when adding kevent structures to the kqueue. The machine in question has 1.5GB RAM and can happily accept 270,000 TCP connections, but I need kevent to manage that many sockets, select() being a little too slow. I want to add one kevent struct to the queue for each connection. Currently I can only queue around 80,000 - 90,000 kevents, with this config - maxfiles=250000 nmbclusters=35000 nmbufs=210000 with this config I can make 180,000 connections and queue 180,000 kevents - maxfiles=200000 nmbclusters=40000 nmbufs=240000 what should I do to improve the number of kevents I can queue? regs Simon