Messages in this thread |  | | Date | Mon, 9 Dec 1996 17:48:50 +0200 | From | (Oskar Pearson) | Subject | Re: FD Limits |
| |
Hi
> Here is a patch of mine to do just what you want. I think it > is very important to put this patch into the kernel as most modern OS'es > (Solaris, OSF/1, etc..) have higher limits of at least 1024 per process. As far as I am aware this will not work at 1024 filedescriptors?
I have put a page on the Web for this at http://www.linux.org.za/tweak.html
This has been working on our cache server for weeks without problems (except for a power problem), and opens and closes in the region of 3/4 -> 1 million filedescriptors per day.
Enjoy!
> diff -ur linux-2.0.20-dist/include/linux/fs.h linux-2.0.20-mine/include/linux/fs.h > --- linux-2.0.20-dist/include/linux/fs.h Fri Sep 13 06:07:08 1996 > +++ linux-2.0.20-mine/include/linux/fs.h Fri Sep 13 20:46:16 1996 > @@ -29,7 +29,7 @@ > > /* Fixed constants first: */ > #undef NR_OPEN > -#define NR_OPEN 256 > +#define NR_OPEN 1024 > > #define NR_SUPER 64 > #define BLOCK_SIZE 1024 > diff -ur linux-2.0.20-dist/include/linux/limits.h linux-2.0.20-mine/include/linux/limits.h > --- linux-2.0.20-dist/include/linux/limits.h Wed Jul 17 08:10:03 1996 > +++ linux-2.0.20-mine/include/linux/limits.h Fri Sep 13 20:43:31 1996 > @@ -1,12 +1,12 @@ > #ifndef _LINUX_LIMITS_H > #define _LINUX_LIMITS_H > > -#define NR_OPEN 256 > +#define NR_OPEN 1024 > > #define NGROUPS_MAX 32 /* supplemental group IDs are available */ > #define ARG_MAX 131072 /* # bytes of args + environ for exec() */ > #define CHILD_MAX 999 /* no limit :-) */ > -#define OPEN_MAX 256 /* # open files a process may have */ > +#define OPEN_MAX 1024 /* # open files a process may have */ > #define LINK_MAX 127 /* # links a file may have */ > #define MAX_CANON 255 /* size of the canonical input queue */ > #define MAX_INPUT 255 /* size of the type-ahead buffer */
|  |