Nsjsp configured with, Sessionbasedloadbalancing, Turned on – HP Integrity NonStop H-Series User Manual
Page 316

•
TANDEM_RECEIVE_DEPTH
must be twice the value of
Maxlinks
. Normally, to handle
n
number of messages, you need
n
number of threads. In extreme cases, all the
n
requests
may timeout. While the same number of threads processing the timeout requests could still
be busy, you need the same
n
number of threads to process the new incoming requests.
Therefore, the number of threads that must be configured is (n + n = 2n).
•
The maximum number of connector threads,
maxThreads
must be equal to the value of
TANDEM_RECEIVE_DEPTH
.
For example:
The parameters
Maxlinks
,
TANDEM_RECEIVE_DEPTH
, and the connector threads are closely
linked to each other. These parameters are explained using examples. The following examples
assume that the
httpd
processes are configured to serve 100 simultaneous HTTP requests, and
all 100 HTTP requests are serviced by your Hibernate application deployed in NSJSP (that is,
there is no static content in the application). Also, the peak load that one single instance of NSJSP
can handle is 25.
Because
SessionBasedLoadBalancing
is turned OFF, all messages between
HTTPD
and
NSJSP
flow through TS/MP. The number of simultaneous messages that can be delivered to a
single instance of NSJSP is determined by the value of
Maxlinks
; set the value of
Maxlinks
to
25. NSJSP can now read 25 messages from its
$RECEIVE
queue simultaneously. In an extreme
case, all the 25 messages time out; there must be enough space in the
$RECEIVE
queue to
accommodate 25 more messages. Therefore,
$RECEIVE
must be opened with a
Receive Depth
(controlled by
TANDEM_RECEIVE_DEPTH
) of (25+25). Thus, you must set the value of
TANDEM_RECEIVE_DEPTH
to 50. The reason for setting
TANDEM_RECEIVE_DEPTH
to a value
of 50 can be explained as:
To handle 25 messages, you need 25 threads. In an extreme case where all the 25 requests time
out, you need another 25 threads to process the new incoming 25 requests because the threads
processing the timeout requests could still be busy. Therefore, the number of threads that must
be configured is (25+25 = 50).
NSJSP Configured with
SessionBasedLoadBalancing
Turned ON
•
The value of
Numstatic
must be [
(Peak Load)/(Max load one instance of NSJSP
can handle)]
.
•
The value of
Maxservers
must be
[(Peak Load)/(Max load one instance of
NSJSP can handle)]
. This ensures that no dynamic process is created, so that the session
object is not lost when there are many file system calls.
•
The value of
Maxlinks
must be set to the peak load that one instance of NSJSP is expected
to handle.
•
Arriving at a definite value for
TANDEM_RECEIVE_DEPTH
is difficult when NSJSP is
configured with
SessionBasedLoadBalancing
turned ON. Deciding an optimum value
for
TANDEM_RECEIVE_DEPTH
requires a good understanding of the application. The
following example provides an insight into making this decision.
•
The maximum number of connector threads,
maxThreads
must be equal to the value of
TANDEM_RECEIVE_DEPTH
.
For example:
In this example, it is evident how a single instance of NSJSP, although having
Maxlinks
set to
25, can serve all the 100 requests.
Because
SessionBasedLoadBalancing
is turned ON, all messages between
HTTPD
and
NSJSP
flow through TS/MP and file system calls. The number of simultaneous messages that can be
delivered to an instance of NSJSP is determined by the value of
Maxlinks
; set the value of
Maxlinks
to 25.
With
Maxlinks
set to 25, a single instance of NSJSP can handle 25 concurrent requests through
TS/MP, all being the first requests of web dialogs. The first call on a web dialog is always delivered
316
Configuring Hibernate Applications on NonStop Systems