[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: file descriptors??



cas@taz.net.au (Craig Sanders)  wrote on 07.01.98 in <[🔎] Pine.LNX.3.96.980107103756.5460C-100000@siva.taz.net.au>:

> On 7 Jan 1998, Miquel van Smoorenburg wrote:
>
> > In article <[🔎] Pine.LNX.3.96.980107084321.5460B-100000@siva.taz.net.au>,
> > Craig Sanders <cas@taz.net.au> wrote:
> > >
> > >On Tue, 6 Jan 1998, Elie Rosenblum wrote:
> > >
> > >> And thus spake Craig Sanders, on Wed, Jan 07, 1998 at 01:52:06AM +1100:

> i've tried applying the "gt256 fd patch" but that causes some NFS
> problems (i use nfs to mount my debian mirror for upgrades) which would
> probably go away if netstd and netbase were recompiled with the new fd
> limit.  I feel that it's a bit unreasonable to expect debian users to
> recompile the entire system if they happen to be building a server (e.g.
> squid proxy or apache web server) that needs more than 256 fds.  Given
> that debian makes an excellent web server or proxy or internet gateway
> machine out of the box it's not an uncommon thing to want to do...

Well, with libc6, they don't have to, unles they need more than 1024 files  
per process. Kernel and maybe libc, but not the rest.

See this excerpt from /usr/include/gnu/types.h:

----

/* One element in the file descriptor mask array.  */
typedef unsigned long int __fd_mask;

/* Number of descriptors that can fit in an `fd_set'.  */
#define __FD_SETSIZE	1024

/* It's easier to assume 8-bit bytes than to get CHAR_BIT.  */
#define __NFDBITS	(8 * sizeof (__fd_mask))
#define	__FDELT(d)	((d) / __NFDBITS)
#define	__FDMASK(d)	(1 << ((d) % __NFDBITS))

/* fd_set for select and pselect.  */
typedef struct
  {
    /* XPG4.2 requires this member name.  */
    __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
  } __fd_set;


typedef int __key_t;

----

> you got any good ideas on what to do about the fd limits? is my
> assumption that increasing the per process limit will require
> re-compiling just about every package (e.g. squid, apache, netstd,
> netbase, libc6, ..... etc) correct or have i misunderstood something
> fundamental?

That depends on how far you want to increase it.


MfG Kai


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: