npm-tcpip-v6.so parameters

We’re running into some problems with more than a few dozen TCP socket
connections, each handled by a separate thread (using the threadpool
library). Before we get into the details, we’re curious about some of
the TCP/IP stack parameters that may affect this. For example,
recv_ctxt and threads don’t give much guidance as to what they do.

If you want to have a few hundred incoming connections, each serviced by
a thread, should that present any problems? (The hardware is a 2.4GHz
P4 with lots of spare memory.) And should the TCP/IP stack parameters
need to be tuned in any way?

Thanks,

lew

‘recv_ctxt’ is the size of a write() mesage that can be handled
without addition MsgRead() calls.

‘threads’ represents the number of outstanding blocking io
operations the stack can handle. For example if a client
does a blocking read() and no data is available, the thread
in the stack is in use until the read unblocks.

-seanb

Lewis Donzis <lew@nospam.donzis.com> wrote:

We’re running into some problems with more than a few dozen TCP socket
connections, each handled by a separate thread (using the threadpool
library). Before we get into the details, we’re curious about some of
the TCP/IP stack parameters that may affect this. For example,
recv_ctxt and threads don’t give much guidance as to what they do.

If you want to have a few hundred incoming connections, each serviced by
a thread, should that present any problems? (The hardware is a 2.4GHz
P4 with lots of spare memory.) And should the TCP/IP stack parameters
need to be tuned in any way?

Thanks,

lew

“Sean Boudreau” <seanb@node25.ott.qnx.com> wrote in message
news:b5pqo5$k0v$1@nntp.qnx.com

‘recv_ctxt’ is the size of a write() mesage that can be handled
without addition MsgRead() calls.

Makes sense.

‘threads’ represents the number of outstanding blocking io
operations the stack can handle. For example if a client
does a blocking read() and no data is available, the thread
in the stack is in use until the read unblocks.

Ah, that was the problem, and increasing the threads solved it. Other than
memory consumption, do you see any problem with increasing this to several
thousand? For example, is there a limit on the number of sockets a process
can have open? One of our servers spawns a thread for every client
connection, and each waits in a blocking read. Total data traffic is not
very heavy, but that server could have a thousand or more client connections
open.

Thanks for your help,

lew