Nsasj server and ts/mp, Maxlinks, Linkdepth – HP Integrity NonStop H-Series User Manual
Page 96: Numstatic and maxservers, Knobs in nsasj configuration, Number of threads, Bean pool size

NSASJ Server and TS/MP
As already stated NSASJ Server is configured as a TS/MP serverclass. The following explains the
serverclass configuration parameters:
MAXLINKS
This is the maximum number of links that can be granted to an instance of the serverclass. A link
is established (or an existing link re-used) when the Post Master establishes a connection with the
serverclass. So this means a maximum of MAXLINKS number of simultaneous connections can be
established per serverclass instance. As already stated, a JI connection results in two I/O channels,
C2S and S2C. Theoretical maximum value of MAXLINKS is RECEIVE-DEPTH/2 which is 2000.
NOTE:
RECEIVE-DEPTH is divided by two as for each connection JI establishes two I/O channels.
For all practical purposes, the value of MAXLINKS is far less than 2000 as there are other factors
such as number of request processing threads, number of instances of a bean that limits the maximum
number of connections that can be handled simultaneously.
LINKDEPTH
As a thumb rule, LINKDEPTH must be equal to MAXLINKS/X, where X is the number of CPUs on
which Post Master processes are running. This allows the Post Masters on the different CPUs to get
an equal share of the NSASJ Server instance while allowing TS/MP for better distribution of load
across the NSASJ Server instances.
NUMSTATIC and MAXSERVERS
Due to the large startup times ranging from a few tens of seconds to a couple of minutes depending
on the nature of applications deployed, it is recommended not to have any dynamic servers
configured. This means the value of MAXSERVERS = NUMSTATIC.
Knobs in NSASJ configuration
There are some configuration parameters in domain.xml that need to match the TS/MP serverclass
configuration.
Number of threads
The EJB3 subsystem configuration has a configuration element by name remoting. This element
is used to enable remote invocations of EJBs. One of the attributes of this element is
thread-pool-name
. This attribute points to the thread-pool configuration to get threads to process
remote invocations. The number of threads that the thread-pool allows to spawn is directly related
to the number of concurrent requests a particular instance is configured to process. This is the value
of MAXLINKS. The thread-pool’s max-threads must be of the same value as MAXLINKS. If the
number of threads is any less than MAXLINKS, the remote invocation requests get queued within
the container and no MEASURE entity can be used to detect this queuing.
Bean pool size
To process stateless beans, the container fetches an instance from a pool of beans. A configuration
with fewer beans in the pool than the number of concurrent requests to be processed (MAXLINKS)
can lead to requests getting queued within the container and goes undetected by any of the
MEASURE entities and counters. The pool can be configured using the element
bean-instance-pools
. The attribute max-pool-size indicates the maximum number of
instances to keep in the pool. Before acquiring a new instance the pool waits for a certain duration
to check if any bean becomes free. This time is indicated by the
instance-acquisition-timeout
. Set the acquisition time to 1 millisecond in cases where
queuing is not desirable.
96
Internal description of NSASJ components