[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SEUL: A minor suggested kernel mod




The statement that writes to the /proc filesystem will need to be in a
different file because SEUL will be using the SysV init style but
otherwise, these changes cleared up some major problems with me on 
Corsica.  They were forwarded to me from a guy over on Monolith that got
it from the kernel list.

I highly suggest this change.  256 files are simply not enough on a busy
system.

George Bonser 
If NT is the answer, you didn't understand the question. (NOTE: Stolen sig)
http://www.debian.org
Debian/GNU Linux ... the maintainable operating system.

---------- Forwarded message ----------
Date: Sat, 7 Mar 1998 00:34:04 -0800 (PST)
From: George Bonser <grep@shorelink.com>
To: grep@oriole.sbay.org
Subject: [ST] Mercury -- and why its so overloaded. (fwd)


On Tue, 3 Mar 1998, George Bonser wrote:

> 
> Aveek, I am having some load-related problems on Corsica that I have been 
> troubleshooting while I have her here at home. One thing that I am noticing 
> seems to be a limitation of the Linux kernel.  I seem to have processes
> dying with "file table overflow" as if there are too many open files.
> 
> Have you noticed anything along these lines? 

Yes George, and I fixed that, among other things :)
Here's what I found, thanks to Bernhard for pointing me in the right
direction. Enjoy! #include std-disclaimer

   Date: Fri, 16 Aug 1996 16:14:47 -0400 (EDT)
   From: David Schwartz <davids@wiznet.net>
   Cc: linux-kernel@vger.rutgers.edu
   Subject: Re: Number of FD's available to a process
   
   The following might be of use to you and others attempting the same:
   
   In Linux 2.0.x, you can raise the 256 file descriptors per process
   limit to 1024 with the following changes:
   
   WARNING: Please be very careful. If you don't know how to compile
   and install a Linux kernel and don't know the proper precautions to
   take
   first, DON'T DO THIS.
   
   In /usr/include/linux/fs.h change NR_OPEN from 256 to 1024.
   
   In /usr/include/linux/limits.h, change NR_OPEN to 1024 and OPEN_MAX
   to 1024.
   
   In /usr/include/linux/posix_types.h, change __FD_SETSIZE to 1024.
   (Later versions of Linux may already have this change made.)
   
   In /usr/include/gnu/types.h, change __FD_SETSIZE to 1024.
   
   In /etc/rc.d/rc.M add the following two lines:
   /bin/echo "2048" > /proc/sys/kernel/file-max
   /bin/echo "4096" > /proc/sys/kernel/inode-max
   
   In /usr/src/linux type: 'make clean; make dep; make zlilo' (Or
   whatever rebuilts the kernel completely on your system.)
   
   Reboot with the new kernel and, from bash, do a 'ulimit -a' and make
   sure 'open files' reads 1024. You may also compile the test program
   included
   below and run it. It should read 1024 for both limits.
   
   Recompile any applications that need to select on more than 256
   files. (Applications that don't try to use more than 256 files at a
   time
   will not notice any changes and do not need to be recompiled.)
   
   Once you get your real applications running using all those file
   descriptors, you should check '/proc/sys/kernel/file-nr' and
   '/proc/sys/kernel/inode-nr' a few times to make sure you have enough
   room.
   If necessary, raise the values in '/etc/rc.d/rc.M'.
   
   David Schwartz
   davids@wiznet.net
   
   -------------
   
   #include <sys/types.h>
   #include <fcntl.h>
   #include <stdio.h>
   
   void main(void)
   {
   int k=3;
   while((dup(0))!=-1) k++;
   printf("Opens=%d Fdsize=%d\n",k,sizeof(fd_set)*8);
   }