From owner-freebsd-questions Wed Sep 13 9:43:42 2000 Delivered-To: freebsd-questions@freebsd.org Received: from karon.dynas.se (karon.dynas.se [192.71.43.4]) by hub.freebsd.org (Postfix) with SMTP id 028CD37B424 for ; Wed, 13 Sep 2000 09:43:38 -0700 (PDT) Received: (qmail 36089 invoked from network); 13 Sep 2000 16:43:36 -0000 Received: from spirit.sto.dynas.se (HELO spirit.dynas.se) (172.16.1.10) by karon.sto.dynas.se with SMTP; 13 Sep 2000 16:43:36 -0000 Received: (qmail 8430 invoked from network); 13 Sep 2000 16:43:42 -0000 Received: from explorer.rsa.com (10.81.217.59) by spirit.dynas.se with SMTP; 13 Sep 2000 16:43:42 -0000 Received: (from mikko@localhost) by explorer.rsa.com (8.11.0/8.11.0) id e8DGhWC10184; Wed, 13 Sep 2000 09:43:32 -0700 (PDT) (envelope-from mikko) Date: Wed, 13 Sep 2000 09:43:32 -0700 (PDT) From: Mikko Tyolajarvi Message-Id: <200009131643.e8DGhWC10184@explorer.rsa.com> To: howardl@account.abs.net Cc: freebsd-questions@freebsd.org Subject: Re: How to get 16K open descriptors?? Newsgroups: local.freebsd-questions References: <200009130808.EAA99173@account.abs.net> X-Newsreader: NN version 6.5.6 (NOV) Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In local.freebsd-questions Howard Leadmon writes: > 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. >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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message