Re: Opening 5000 file descriptors in linux??

Christopher E. Brown (cbrown@denalics.net)
Mon, 13 Sep 1999 11:11:46 -0800 (AKDT)


On Mon, 13 Sep 1999, Arie Rudich wrote:

>
> "Christopher E. Brown" wrote:
>
> > The default limit is 1024 fh. ulimit -n will reset this. *note*,
> > a normal user CANNOT increase their own fh limit.
> >
> > After
> >
> > echo 32768 > /proc/sys/fs/file-max # increase default system wide from
> 4096
> > echo 131072 > /proc/sys/fs/inode-max # boost system wide inodes too
> >
> > ulimit -n 32768 #change roots fh limit
> >
> > I get 32285 opened...
> >
> > Whatever script calls your program should increase the default fh
> limit
> > before it starts the program as a normal user.
> >
> This works great.
>
> Is there any way to set the 'ulimit' in advance once for the system
> (like the 'echo's that can be put in the rc.local ) so that no 'root
> script' is needed?

Depends in your init setup, the /proc echos are global though.

The per user limits will be picked up by any child procs, so you
could set it in the script that calls all of your other start scripts.

I normally do the system wide stuff during while the system is going
through single user on its way to multi, and add the per user change
to the startup script for any particular program that needs it.

---
As folks might have suspected, not much survives except roaches,
and they don't carry large enough packets fast enough...
--About the Internet and nuclear war.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/