Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Sep 2000 00:08:37 -0400 (EDT)
From:      Howard Leadmon <howardl@account.abs.net>
To:        Mikko Tyolajarvi <mikko@dynas.se>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: How to get 16K open descriptors??
Message-ID:  <200009140408.AAA84248@account.abs.net>
In-Reply-To: <200009131643.e8DGhWC10184@explorer.rsa.com> from Mikko Tyolajarvi at "Sep 13, 2000 09:43:32 am"

next in thread | previous in thread | raw e-mail | index | archive | help

> >  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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009140408.AAA84248>