[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
If NT is the answer, you didn't understand the question. (NOTE: Stolen sig)
Debian/GNU Linux ... the maintainable operating system.
---------- Forwarded message ----------
Date: Sat, 7 Mar 1998 00:34:04 -0800 (PST)
From: George Bonser <email@example.com>
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 <firstname.lastname@example.org>
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
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
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
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
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
If necessary, raise the values in '/etc/rc.d/rc.M'.