From owner-freebsd-net Fri Sep 28 20:30:17 2001 Delivered-To: freebsd-net@freebsd.org Received: from prism.flugsvamp.com (cb58709-a.mdsn1.wi.home.com [24.17.241.9]) by hub.freebsd.org (Postfix) with ESMTP id A7DB337B410 for ; Fri, 28 Sep 2001 20:26:12 -0700 (PDT) Received: (from jlemon@localhost) by prism.flugsvamp.com (8.11.0/8.11.0) id f8T3NYN09661; Fri, 28 Sep 2001 22:23:34 -0500 (CDT) (envelope-from jlemon) Date: Fri, 28 Sep 2001 22:23:34 -0500 (CDT) From: Jonathan Lemon Message-Id: <200109290323.f8T3NYN09661@prism.flugsvamp.com> To: le@cs.unc.edu, net@freebsd.org Subject: Re: FD_SETSIZE X-Newsgroups: local.mail.freebsd-net In-Reply-To: Organization: Cc: 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 you write: >Hi, > >I am wondering what is the side effects of increasing FD_SETSIZE >beyond 1024? Our group have a propiertary web server software that >handles a large number of sockets. While increasing the kern.maxfiles >and kern.maxfilesperproc gives our web server more connections, >select() seems to fail if the descriptor is beyond 1024. > >Can I just increase FD_SETSIZE and recompile the kernel? I saw >some magic numbers in kern/sys_generic.c and am not sure whether >there are some side effects. No need to recompile the kernel. Add a #define FD_SETSIZE to your program, *before* , and recompile your application. And you probably really want to check out kqueue(2). -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message