"The Linux Gazette...making Linux just a little more fun!"


(?) The Answer Guy (!)


By James T. Dennis, tag@lists.linuxgazette.net
Starshine Technical Services, http://www.starshine.org/


(?) Max Open Files and Inodes: Use The Entries under /proc

From 4th Dimension Webmaster on Thu, 31 Dec 1998

(?) Hi , i have a DUAL 400MHz Pentium 2 processor which runs 400+ processes. In kernel 2.0.x i had to increase max processes in tasks.h, and nr_files and nr_inodes in fs.h.

I tried kernel 2.1.131, it was much more efficient with the dual processors and everything ran more smooth, except one problem. there is no "nr_inodes" in fs.h. So when ever i hit around 400 processes , it was out of file descriptors and couldnt spawn any other processes. If you know how to over come this problem please let me know.

(!) You should be able to just 'echo' the desired values into the proper nodes under the /proc filesystem.
Those would be something like:
/proc/sys/kernel/file-max
/proc/sys/kernel/file-nr
/proc/sys/kernel/inode-max
/proc/sys/kernel/inode-nr
... though I just snarfed those in while running a 2.0.x. I'll need to fetch a 2.1.132 and start a new round of tests on that kernel.
In any event --- the nodes should be under /proc somewhere -- and you can just use 'echo' with standard shell redirection to put new values into these at run-time.
Somewhere on the 'net there is a FAQ or HOWTO that describes this and gives sample values. I think the max inodes should be about 3 times the max open files. Anyway, take a look through the Kernel mailing list FAQ at:
http://www.tux.org/lkml.html


Copyright © 1999, James T. Dennis
Published in The Linux Gazette Issue 37 February 1999


[ Answer Guy Index ] 1 2 3 4 5 6 7 8 9 10
11 12 14 15 16 17 18 19 21 22
23 28 29 30 31 32 33 34 37 38
39 41 42 43 44 45 46 47 48 49



[ Table Of Contents ] [ Front Page ] [ Previous Section ] [ Next Section ]