RE: Max tcp connections

David Schwartz (davids@webmaster.com)
Thu, 11 Nov 1999 16:54:22 -0800


> > > echo 65536 > /proc/sys/fs/inode-max
> > > and then, for the process in question,
> > > ulimit -n 32768
> > > - Dan
> >
> > Since you can neither select nor poll on 32,768 sockets, it would be
> > somewhat difficult to use this man.
>
> You can poll on 32768 sockets if you wish. You will probably hit
> performance
> issues if it is under any kind of load

I have tried with Linux-2.3.26 and it always blows up on me when I attempt
to poll on more than 16,386 sockets. Something about unable to allocate
kernel memory. I haven't tried attempting to do 10,000 in one thread and
10,000 in another.

As for hitting performance issues under load, I don't believe this --
unless Linux's poll implementation is very bad. Under load, poll will never
block, so all it should require is a single linear traverse through the list
of file descriptors, tinkering with one byte each to indicate status. No
memory should need to be allocated, since it's all provided by the user. No
wait queues should need to be touched.

DS

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/