Re: 2.2.x FD's.

Stephen C. Tweedie (sct@redhat.com)
Thu, 15 Apr 1999 15:30:01 +0100 (BST)


Hi,

On Thu, 15 Apr 1999 22:32:46 +1000 (EST), Chris Keladis
<chris@twilight.tpgi.com.au> said:

> Hi Stephen,
> Firstly, thank you for your accurate description below.

> Just two other questions, to expand a little.

> 1) How can i increase the system-wide FD limit? (with the ac patch, not using
> ulimit)

The system-wide limit for _total_ fds is in /proc/sys/fs as usual.

There is no system-wide default for new processes. You always need to
use the ulimit. This is quite deliberate: glibc and many applications
may fail randomly if you have too many fds. In particular, there is a
lot of code around which uses the maximum file rlimit to set up select
tables, but the FD_SET is only capable of holding 1024 fds. You _will_
get odd problems if you raise the rlimit system-wide. In particular,
libc rpc is known to fail if the rlimit is above 1024.

> 2) Do i need to still tweak /proc/sys/fs/inode-max and /proc/sys/fs/file-max,
> and if so, how would i work out suitable values?

Yes. These values are mainly there as safety-nets: there should be no
problems if you raise them too high, so increase them to (say) double
the number of fds you expect open at any one time. You might want to
increase the inode max a little more for caching.

Cheers,
Stephen.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/