Operating System - HP-UX
1844022 Members
2616 Online
110226 Solutions
New Discussion

Re: Max nproc and Max TCP/IP connections

 
SOLVED
Go to solution
Lynn Hsu_2
Frequent Advisor

Max nproc and Max TCP/IP connections

Hi,
I have couple of questions hope that you can help. Our machine is HP rp5470 running HPUX 11.11 with 2 x 875mhz CPUS, 4GB RAM, storage is EMC Cx500.

1. what is the max "nproc" for such system?
A doc mentions this is RAM related. Current we set nproc to 2400.

2. What is the max TCP/IP connections allowed for such system? How to check and possible to increase it?

Thanks in advance,

Lynn
12 REPLIES 12
Michael Steele_2
Honored Contributor
Solution

Re: Max nproc and Max TCP/IP connections

For nproc

Minimum
10
Maximum
Memory limited
Default
20+(8 * maxusers)

For max TCP/IP using ndd:

tcp_conn_request_max:

Maximum number of outstanding inbound connection requests.
[1, - ] Default: 20 connections
Support Fatherhood - Stop Family Law
Darrel Louis
Honored Contributor

Re: Max nproc and Max TCP/IP connections

Lynn

Select a value for nproc that is sufficient to provide enough processes for every user at any given time when the maximum normal number of users are logged in.

Bill Hassels answer:
http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=961156

NDD:
ndd -get /dev/tcp tcp_conn_request_max
to get the current value (likely 4096)

The value can be set online aswell:
ndd -set /dev/tcp tcp_conn_request_max

You will have to add the entry to nddconf someting like:

TRANSPORT_NAME[4]=tcp
NDD_NAME[4]=tcp_conn_request_max
NDD_VALUE[4]=

where [4] is a unique identifier within the file.

Also read the following:
ftp://ftp.cup.hp.com/dist/networking/briefs/annotated_ndd.txt

Darrel
Bill Hassell
Honored Contributor

Re: Max nproc and Max TCP/IP connections

nproc is limited to the maximum value for a process ID, about 30,000. You can set nproc to 30000 and run 29000 small processes (like sleep) in 4Gb of RAM. This is of course fairly impractical. If you need to run more than 2000 processes at the same time, then double your current nproc value.

TCP/IP does not define the required resources. A TCP/IP connection could be telnet, rcp, ftp, NFS, NTP, many other services. Your most important kernel parameter for a large number of network connections is nfile and the pty settings for npty, nstrpty, nstrtel (set them all to the same value, about 20% more than your expected simultaneous connections)


Bill Hassell, sysadmin
rick jones
Honored Contributor

Re: Max nproc and Max TCP/IP connections

tcp_conn_request_max has virtually nothing to do with the maximum number of simultaneous TCP connections. only the number of connections that can be queued to any one listen socket waiting for applications to call accept().

in addition to the system-wide limits on file descriptors being involved in the maximum number of tcp connections, one should also consider the per-process limits maxfiles and maxfiles_lim (or is that maxfile, I can never remember)

I'm a triffle worried about the juxtaposition of those questions - it makes it sound like you may be running something that has a process per connection?
there is no rest for the wicked yet the virtuous have no pillows
James R. Ferguson
Acclaimed Contributor

Re: Max nproc and Max TCP/IP connections

Hi Lynn:

For 11.11 Kernel parameters you should find this useful:

http://docs.hp.com/en/TKP-90202/index.html

Regards!

...JRF...
Lynn Hsu_2
Frequent Advisor

Re: Max nproc and Max TCP/IP connections

Thanks everyone for your valuable input.
To answer Rick Jones question -
yes, indeed, this is our credit card authorization server. Each card swipped is
a connection/process on the HP server. We want to know what's the max tcp/ip (thr internet connection) connections that our L3000 server can handle as well as nproc.

Lynn
rick jones
Honored Contributor

Re: Max nproc and Max TCP/IP connections

Are we talking about forking a process for each card swipe? Yikes. Does it _have_ to be that way?
there is no rest for the wicked yet the virtuous have no pillows
Lynn Hsu_2
Frequent Advisor

Re: Max nproc and Max TCP/IP connections

Ricky,
Each card swipe is a pid. It's from a
legacy application. Currently, we have to reset ports to kill connections to relief
high # of PID (some connections do not disconnect from server). This can impact the customers. Need a better solution.

Thanks,

Lynn
rick jones
Honored Contributor

Re: Max nproc and Max TCP/IP connections

What are the clients? PCs? These connections that do not disconnect from the server are in what state? ESTABLISHED? FIN_WAIT_2? Something else?

It may be enough to make sure that keepalives are enabled and the tcp_keepalive_interval and perhaps tcp_keepalive_detached_interval are shrunk.
there is no rest for the wicked yet the virtuous have no pillows
Lynn Hsu_2
Frequent Advisor

Re: Max nproc and Max TCP/IP connections

Rick,
Here are the #s:
# ndd -get /dev/tcp tcp_time_wait_interval
60000
# ndd -get /dev/tcp tcp_conn_request_max
4096
# ndd -get /dev/tcp tcp_ip_notify_interval
10000
# ndd -get /dev/tcp tcp_keepalive_interval
7200000
# ndd -get /dev/tcp tcp_keepalives_kill
1
# ndd -get /dev/tcp tcp_keepalive_detached_interval
120000

Do you see anything here can be adjust?

Lynn
Lynn Hsu_2
Frequent Advisor

Re: Max nproc and Max TCP/IP connections

Rick,
The clients are all kinds devices - PCs,converters, routers. Here are the #s on HP server:

# ndd -get /dev/tcp tcp_time_wait_interval
60000
# ndd -get /dev/tcp tcp_conn_request_max
4096
# ndd -get /dev/tcp tcp_ip_notify_interval
10000
# ndd -get /dev/tcp tcp_keepalive_interval
7200000
# ndd -get /dev/tcp tcp_keepalives_kill
1
# ndd -get /dev/tcp tcp_keepalive_detached_interval
120000

Do you see anything here can be adjust?

Lynn
rick jones
Honored Contributor

Re: Max nproc and Max TCP/IP connections

That all depends - does the application make a setsockopt() to set SO_KEEPALIVE? if so then you could consider dropping tcp_keepalive_interval.

You suggested the server app waits for the client to close - I take it the server may receive more than one query per connection from the client? If not, you could in theory just have the server call close() after sending its reply - assuming you don't need an implicit/explicit verification the client received the data you owuld get from the client's FIN triggering the read return of zero.
there is no rest for the wicked yet the virtuous have no pillows