Re: 248 a magic number?

Oskar Pearson (oskar@is.co.za)
Fri, 23 May 1997 17:54:09 +0200


Hi

> I don't think this is going to help any....as I've already tried compiling
> nwserv to allow more users on.
>
> Some have said that I must be running out of fd's, and to check
> /proc/$PID/fd for the nwserv process....it's only got 9 fd's...for example:
>
> [root@common fd]# ps aux |grep nwserv
> root 215 0.0 0.5 932 356 ? S May 14 3:14 /sbin/nwserv
>
> [root@common fd]# ls /proc/215/fd
> 0 1 2 3 4 5 6 7 8 9
>
> Also, each of the nwconn processes (that handle each user that logs in via
> mars) have varying amounts of fd's in varying amounts of
> contiguous/non-contiguous numbers..but none of them seem to have ALL 256 at
> once....for example:

There is an overall filehandle/inode limit.

If you type 'cat /proc/sys/kernel/file-nr' it tells you the maximum concurrent
open filehandles.
'cat /proc/sys/kernel/inode-nr' will tell you the total inodes used.

It's very easy to change this:
cat /etc/rc.d/rc.local
#!/bin/sh
#Increase systemwide filehandle max
/bin/echo 4096 >/proc/sys/kernel/file-max
/bin/echo 12288 > /proc/sys/kernel/inode-max

this says "allow 4096 files to be open concurrently" and "allow
12288 inodes to be used"

You probably have the default file limit of 256.
Thus if each user opens 4 filehandles it's going to run out.

Oskar