Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do I get more than 1024 open Files ?

5 views
Skip to first unread message

Reiner Mayers

unread,
Jun 1, 1999, 3:00:00 AM6/1/99
to

Hello,

does anyone know how to recompile linux with options set for ca. 4000
open files. I need that for a large Samba Server.

thanks
Reiner
<reiner...@main-rheiner.de>


Brett Neely

unread,
Jun 1, 1999, 3:00:00 AM6/1/99
to
Hi,

In /proc/sys/kernel, there are two 'files' of interest: file-max and
inode-max. By echoing new values into these 'files', you can increase
the number of open files allowed. I'm not sure where you can get more
information on this besides the kernel source code. I understand that
the value in inode-max is usually 3 or 4 times greater than the file-max
value.

If you want to make the change permanent, you should write a script
which is called at bootup which makes these changes for you.

--
Brett Neely, Technical Support Engineer, Linuxcare, Inc.
415.354.4878 x269 tel, 415.701.7457 fax
bne...@linuxcare.com, http://www.linuxcare.com
Linuxcare. At the center of Linux.

Colin Watson

unread,
Jun 2, 1999, 3:00:00 AM6/2/99
to
In article <3753DF00...@linuxcare.com>,
Brett Neely <bne...@linuxcare.com> wrote:

> Reiner Mayers wrote:
>
> > does anyone know how to recompile linux with options set for ca. 4000
> > open files. I need that for a large Samba Server.
>

> Hi,
>
> In /proc/sys/kernel, there are two 'files' of interest: file-max and
> inode-max. By echoing new values into these 'files', you can increase
> the number of open files allowed. I'm not sure where you can get more
> information on this besides the kernel source code. I understand that
> the value in inode-max is usually 3 or 4 times greater than the file-max
> value.

They're in /proc/sys/fs - there's reasonably good documentation on
this in Documentation/proc.txt off the kernel source tree (at least in
my 2.2 series kernel):

From the above file:

The value in file-max denotes the maximum number of file handles
that the Linux kernel will allocate. When you get a lot of error
messages about running out of file handles, you might want to raise
this limit. The default value is 4096. To change it, just write the
new number into the file:

# cat /proc/sys/fs/file-max
4096
# echo 8192 > /proc/sys/fs/file-max
# cat /proc/sys/fs/file-max
8192

[...]

The value in inode-max denotes the maximum number of inode
handlers. This value should be 3 to 4 times larger than the value
in file-max, since stdin, stdout, and network sockets also need an
inode struct to handle them. If you regularly run out of inodes,
you should increase this value.

--
Colin Watson [cjw44 at cam.ac.uk]
Trinity College, Cambridge, and Computer Science [riva.ucam.org]
"Aber einer erwacht von Mitternacht,
Und er kommt vom Aufgang der Sonne." - _Elijah_, Mendelssohn

0 new messages