Re: Kernel: File Table Overflow

Jim Bourne (jbourne@island.net)
Wed, 4 Feb 1998 10:25:53 -0800 (PST)


On Mon, 2 Feb 1998, Perry Harrington wrote:

> Please ignore, I found what I needed. For those who are interested:

Hi,
We had the same problem on both our mail and ftp servers.

In the proc(5) man page it says it allows you to adjust file-max and
inode-max through /proc/sys/kernel. On a redhat linux system, you can put
the lines:

# adjust max files
echo 4096 > /proc/sys/kernel/file-max
# adjust max inodes
echo 16386 > /proc/sys/kernel/inode-max

in the file /etc/rc.d/rc.local to up these numbers at boot.

I'm not sure but I think open files per process can be adjusted by setting
the limits for that process. We have found that it is not the number of
files/inodes per process that was topping out (such as a web server with
many logfiles open at once) but the total max number of files open system
wide which was causing problems.

If I remember from BSD, there is specific memory requirements if you
increase levels such as these. Is there the same requirements with Linux?

Regards,
James Bourne

>
> include/linux/fs.h
> Changed NR_OPEN to 1024 from 256 (open number of files per process)
> Changed NR_INODE to 16386 from 3072 (number of total inodes)
> Changed NR_FILE to 4096 from 1024 (number of total file descriptors)
>
> include/linux/limits.h
> Changed NR_OPEN to 1024 from 256 (open number of files per process)
> Changed NR_FILE to 1024 from 256 (number of file descriptors per process)
>
> include/linux/tasks.h
> Changed NR_TASKS to 2048 from 512 (max number of tasks)
> Changed MIN_TASKS_LEFT_FOR_ROOT to 20 from 4 (enuff tasks to let root in, in a bad situation)
>
> --Perry
>
> >
> > We have a *busy* mail server (PPro 200/128MB) running the 2.0.30 Kernel
> > and are getting "File Table Overflow" periodically. I figure that we
> > need to up the maximum file descriptors, so I grepped the source tree
> > and did not find any defines like that (except UNIX_MAX_FD in net/).
> > I wanted to tweak this for the 2.0.33 Kernel before putting it into
> > production. What is the define for the maximum number of File descriptors,
> > and where can I find more kernel tunables?
> >
> > Thanks,
> > Perry
> >
> > --
> > Perry Harrington Linux rules all OSes. APSoft ()
> > email: perry@apsoft.com Think Blue. /\
> >
>
>
> --
> Perry Harrington Linux rules all OSes. APSoft ()
> email: perry@apsoft.com Think Blue. /\
>

--
James Bourne           |            E-Mail:             jbourne@island.net
System Administrator   |            WWW:             http://www.island.net
Island Internet Inc.   |            Linux - The choice of a GNU generation

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