Re: More FD's in 2.0.33

Shane Anderson (shane.anderson@infrasol.com)
Tue, 24 Mar 1998 19:59:00 -0600


On 25 Mar 98 at 10:33, Dancer wrote:

> If you change the size of an fd_set in the kernel, you need to recompile
> anything that uses select(), otherwise you stand a good chance of
> blowing away the application's stack, IIRC.
>
> D
>
> Shane Anderson wrote:
> >
> > I'm looking for the *RIGHT* way to get more open files in 2.0.33.
> > I've downloaded Michael O'Reilly's patch, but it had problems with
> > portmapper (on RedHat 5.0 w/ all the latest updates) crapping
> > out--apparently due to bad file descriptors, which I think was due to
> > the dynamic allocation done in this patch. So, since then I've tried
> > to just change the #define's that I believe matter, namely:
> >
> > NR_OPEN in limits.h
> > OPEN_MAX in limits.h
> > __FD_SETSIZE in posix_types.h
> > __FD_SETSIZE in gnu/types.h
> >
> > And then if I put this in rc.local:
> >
> > echo 32768 > /proc/sys/kernel/inode-max
> > echo 8192 > /proc/sys/kernel/file-max
> >
> > Is this the Right Way? I'm still having trouble w/ portmapper (and
> > hence rpc.nfsd & rpc.mountd) At the moment I'm staring w/ a clean
> > 2.0.33 again and would like some real advice on # of open files
> > before I screw around too much more.
> >
> > Thanks!
> >
> > -= shane.anderson@infrasol.com ======== Infrared Solutions, Inc. =-
> --
> Did you read the documentation AND the FAQ?
> If not, I'll probably still answer your question, but my patience will
> be limited, and you take the risk of sarcasm and ridicule.

Inspired by this helpful tip, I searched diligently through the
HOWTO index on LDP, and under the Kernel-HOWTO I find:

7.14 Increasing limits

The following few example commands may be helpful to those wondering
how to increase certain soft limits imposed by the kernel:

echo 4096 > /proc/sys/kernel/file-max
echo 12288 > /proc/sys/kernel/inode-max
echo 300 400 500 > /proc/sys/vm/freepages

which doesn't exactly answer my question. I'm worried about
per-process file limits as well as system wide limits. It also
doesn't explain quite what the vm/freepages thing is about, or even
if I should care when worrying about file-descriptor limits. I also
looked in the Linux FAQ and searched for 'file' hoping for file
descriptors, increasing # of file's, etc... Nothing related. I also
searched for 'file limit', 'file descriptor', and so forth using the
Excite search on LDP. Nothing relating to my question. So, if you'd
kindly either point me to 'the documentation' or the relevant part of
the FAQ which answers my question, I'd greatly appreciate it.

So my real worry here is using Linux as a file-server for 50 or so
machines, which easily open 128+ files each during the day. So maybe
my per process limit at 256 is ok, using smbd (1 per client.) I just
want to make sure that this is the Right Thing (tm).

Thanks! :)

-= shane.anderson@infrasol.com ======== Infrared Solutions, Inc. =-

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu