Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Sep 2000 09:43:32 -0700 (PDT)
From:      Mikko Tyolajarvi <mikko@dynas.se>
To:        howardl@account.abs.net
Cc:        freebsd-questions@freebsd.org
Subject:   Re: How to get 16K open descriptors??
Message-ID:  <200009131643.e8DGhWC10184@explorer.rsa.com>
References:  <200009130808.EAA99173@account.abs.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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




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