On Tue, 5 Feb 2002, Kevin McDermott wrote:
> If I increase /proc/sys/fs/file-max and /proc/sys/fs/inode-max, does this
> change take effect immediately, and does it increase the number of files
> available to non ulimited applications immediately?

file-max: Yes.
inode-max: eh? (is that a 2.2-ism?)

BTW, I had a somewhat ailing, overloaded server the other day and was
getting the "VFS: file-max limit %d reached" messages. I changed the value
of /proc/sys/fs/file-max seemed to fixed it. I also donned my BOfH hat and
started killing off old/redundant user's task (hey what's life without
some fun ;)

I had a quick scan through some kernel source (grep is a wonderful thing)

kernel/sysctl.c: line 280 onwards:
> static ctl_table fs_table[] = {
[...]
>         {FS_MAXFILE, "file-max", &files_stat.max_files, sizeof(int),
>          0644, NULL, &proc_dointvec},

and fs/file_table.c: line 61 onwards:
>         if (files_stat.nr_files < files_stat.max_files) {
[...]
>         } else if (files_stat.max_files > old_max) {
>                 printk(KERN_INFO "VFS: file-max limit %d reached\n", 
>files_stat.max_files);
>                 old_max = files_stat.max_files;
>         }

old_max is initalised to 0. I think its just a way of preventing multiple 
KERN_INFO messages being generated.

Cheers,

Paul.

------------------------------------------------------------------------------
Paul Millar                            yo-yo, n. :
Particle Physics Theory Group              Something that is occasionally
Department of Physics and Astronomy        up but normally down.
University of Glasgow,                     (see also Computer)
Glasgow G12 8QQ,                                       [EMAIL PROTECTED]
Scotland                                               +44 (0)141 330 4717
------------------------------------------------------------------------------

--------------------------------------------------------------------
http://www.lug.org.uk                   http://www.linuxportal.co.uk
http://www.linuxjob.co.uk               http://www.linuxshop.co.uk
--------------------------------------------------------------------

Reply via email to