Re: Out of filedescriptors

From: Oskar Pearson <oskar@dont-contact.us>
Date: Fri, 22 Nov 1996 15:07:24 +0200 (GMT)

Hello

> } > Does anyone has experiance in how to increase the maximum number of
> } > open filedescriptors from 256 to 2048. I know this has to be some cha=
> nges =
> } > in kernel sources and recompilation.
> For a 2.0.x kernel it can be changed by modding the sysctl file in =
> /proc/sys/kernel
>
> you should just be able to do
> echo 2048 >/proc/sys/kernel/file-max
> and there should be no need for a recompile.

file-max sets the maximum "SYSTEM WIDE" number of open files. This is normally
somewhere in the region of 1024. The problem is that your libc and general
fopen functions won't allow you open more that the values of OPEN_MAX and
FD_SETSIZE IN A SINGLE PROCESS.... This isn't changeable through the /proc
interface...

> However the libraries need to allocate a large enough structure for fdset=
>
> - which *could* be done by having you allocating a bigger chunk and =
But it doesn't ;)

> It would be possible to have squid (or other code) read
> /proc/sys/kernel/file-max and then build an fdset of appropriate size and
> use that.... this obviously stops working if you don't compile in proc
> support, but surely no one is that sick!

The whole point is that it isn't the squid code that should do this, but
your libraries. I am also not sure as to if the kernel allocates a buffer
for a "filehandle-list" for each process, which would be dependant on
recompiling the kernel.

        Oskar

=============================================
'experience made art, but inexperience luck.'
=============================================
Received on Fri Nov 22 1996 - 05:07:47 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:33:36 MST