Re: > 15,000 Simultaneous Connections

Lincoln Dale (ltd@interlink.com.au)
Sun, 05 Sep 1999 21:35:13 -0700


At 07:47 PM 9/5/99 -0400, Jordan Mendelson wrote:
>Alright, I've done my research, ran a whole lot of tests, but I'm still not
>sure what the best way of going about this is under Linux.
>
>There are several different programs out there which require a large number
>of persistant connections. Most of them are messaging oriented having a small
>amount of actual data being transfered per socket, but a large number of
>sockets total.
..
>What would be the optimal paradigm for this?

in order to be able to handle large numbers of concurrent connections (open
sockets), there are really only two ways of doing it efficiently:

(1) single process using threads
(2) single process, event-driven queues

with (1), you have a slightly higher overhead than a well-written (2),
however you can scale to multiprocessor with no additional effort.

(2) will always be best, but is typically one of the hardest to code for.

>Does anyone have some hard numbers on which models can reach what levels?

i doubt it. it depends too much on (a) cpu, (b) cpu core clock speed, (c)
L2 cache ram size, (d) L2 cache ram speed, (e) ram speed, (f) bus speed, .....

>What are the limiting factors in reaching this level of simultaneous
>connections?

typically cpu.
(cpu core clock speed, speed in talking to ram).

you spend a lot of time cycling thru lists of fd's.
how you do that is dependent on your design.

>I think a HOWTO on this subject might be in order :)

i'm not sure this can be covered in a HOWTO document.
don't take this the wrong way, but if you have to ask how to code something
for efficiency in this manner, expecting to find samples in a HOWTO is
rather much a pipe dream.

cheers,

lincoln.

-
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/