From owner-freebsd-questions Wed Sep 13 21: 8:54 2000 Delivered-To: freebsd-questions@freebsd.org Received: from account.abs.net (account.abs.net [207.114.5.70]) by hub.freebsd.org (Postfix) with ESMTP id 7653A37B422 for ; Wed, 13 Sep 2000 21:08:48 -0700 (PDT) Received: (from howardl@localhost) by account.abs.net (8.9.3/8.9.3+RBL+DUL+RSS) id AAA84248; Thu, 14 Sep 2000 00:08:37 -0400 (EDT) (envelope-from howardl) From: Howard Leadmon Message-Id: <200009140408.AAA84248@account.abs.net> Subject: Re: How to get 16K open descriptors?? In-Reply-To: <200009131643.e8DGhWC10184@explorer.rsa.com> from Mikko Tyolajarvi at "Sep 13, 2000 09:43:32 am" To: Mikko Tyolajarvi Date: Thu, 14 Sep 2000 00:08:37 -0400 (EDT) Cc: freebsd-questions@freebsd.org X-Mailer: ELM [version 2.4ME+ PL72 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=UNKNOWN-8BIT Content-Transfer-Encoding: 8bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > Anyone here ever gotten FreeBSD 4.1 to work with more than 8K open > >file descriptors?? It seems that even if I define FD_SETSIZE to 16384 > >when I build the kernel, when I look at the limits I see: > > [...] > > >So seem to be running into 8232 as a magic number for some reason, but > >haven't figured out where this limit is being set. The need for this > >is an IRC Chat Server, and currently if I allow over 8K clients things > >start to crash and burn fast. > > If you rewrite the server to use poll() or, better yet, kqueue() it > won't be affected by FD_SETSIZE. Actually I have the ircd set to use poll(), but I guess the poll function is still regulated by the max open files setting, as if I exceed the that number of users (or close to it) then all heck breaks loose. I know for a fact it's using poll, as running top you can see the ircd in the poll state most times. As for kqueue(), well I know the Undernet coders are adding support for this to the next release of the ircu code. As thats supposed to be more efficient, I look forward to seeing how it will run.. > >If anyone knows how to get past this limit it would be appreciated.. > > There are two global parameters that limit the total number of descriptors > on the system, and the total number of descriptors per process. Check > with: > > # sysctl kern.maxfiles > # sysctl kern.maxfilesperproc > > You can raise them manually with the -w flag, for example: > > # sysctl -w kern.maxfiles=16000 > > Put "kern.maxfiles=16000" (etc) in /etc/sysctl.conf to make it happen > at boot. Then up with the hard/soft limits of the process in > question, making sure it won't use upp all descriptors for the entire > system. > > $.02, > /Mikko > -- > Mikko Työläjärvi_______________________________________mikko@rsasecurity.com > RSA Security Thanks Mikko, that was to easy.. :-) I was always told to adjust that with changing FD_SETSIZE, but needless to say there is a different way to do this apparently under FBSD 4.1. I tried the above and it shows the updated settings, so I will up my max client counts and see how it goes... --- Howard Leadmon - howardl@abs.net - http://www.abs.net ABSnet Internet Services - Phone: 410-361-8160 - FAX: 410-361-8162 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message