In the past, I've had to do this for turnkey servers that would occasionally,
but undesirably run out of file handles during their busiest time. Since
modifying /proc/... doesn't physically change anything on the filesystem (like
the kernel image), the change disappears on the next boot. Putting it in
/etc/rc.d/rc.local makes the change more permenant and doesn't require a kernel
rebuild.
--Bruce
Quoting "Patrick J. O'Rourke" <[EMAIL PROTECTED]>:
>
> > For the whole system, its very easy:
> >
> > echo 4096 >/proc/sys/fs/file-max
>
> You can also use the sysctl(8) command:
>
> sysctl -w fs.file-max=131072
>
> > Note that you'll have to do that at boot-time to (probably in
> > /etc/rc.d/rc.local).
>
> Just curious, but why would you have to do this at boot time? As far as
> I can see you can increase it whenever (from get_empty_filp() in
> fs/file_table.c):
>
> :
> :
> /*
> * Allocate a new one if we're below the limit.
> */
> if (nr_files < max_files) {
> f = kmem_cache_alloc(filp_cache, SLAB_KERNEL);
> if (f) {
> nr_files++;
> goto new_one;
> }
> /* Big problems... */
> printk("VFS: filp allocation failed\n");
> } else if (max_files > old_max) {
> printk("VFS: file-max limit %d reached\n", max_files);
> old_max = max_files;
> }
> :
> :
>
> Pat
>
> --
> Patrick O'Rourke
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
>
-------------------------------------------------
This mail sent through IMP: brucedawson.ne.mediaone.net
**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************